/* This is a test of how the browser draws lines. This is a second line. This is a third. That was a blank line above this. @r@_Right justify @c@_Center justify @_Left justify @bBold text @iItalic text @b@iBold Italic @fFixed width @f@bBold Fixed @f@iItalic Fixed @f@i@bBold Italic Fixed @lLarge @l@bLarge bold @sSmall @s@bSmall bold @s@iSmall italic @s@i@bSmall italic bold @uunderscore @C1RED @C2Green @C4Blue You should try different browser types: Fl_Browser Fl_Select_Browser Fl_Hold_Browser Fl_Multi_Browser */ #include #include #include #include #include #include #include #include #include #include #include #include fl_Select_Browser browser; fl_Button top, bottom, middle, visible, swap, sort; fl_Choice btype; fl_Int_Input field; void b_cb(fl_Widget o, void* user_data) { printf("callback, selection = %d, event_clicks = %d\n", Fl_Browser_value((fl_Browser)o), Fl_event_clicks()); } void show_cb(fl_Widget o, void* user_data) { int line = atoi(Fl_Int_Input_value(field)); if (!line) { puts("Please enter a number in the text field\nbefore clicking on the buttons."); return; } if (o == top) Fl_Select_Browser_set_topline(browser,line); else if (o == bottom) Fl_Select_Browser_bottomline(browser,line); else if (o == middle) Fl_Select_Browser_middleline(browser,line); else Fl_Select_Browser_make_visible(browser,line); } void swap_cb(fl_Widget w, void* user_data) { int a = -1, b = -1; int t = 0; for ( ;t