# data file for the Fltk User Interface Designer (fluid) version 1.0300 header_name {.h} code_name {.cxx} decl {const int TEN = 10;} {private local } decl {const int TWENTY = 20;} {private local } decl {const int THIRTY = 30;} {private local } Function {make_window()} { comment {new/code/function-method} open } { code {std::cout << "make_window()";} {} Fl_Window win_app { label {MY WINDOW} callback cb_win_callback open xywh {348 238 320 243} type Single resizable visible } { Fl_Input inp_code { label {Data:} user_data {"input"} callback cb_code xywh {60 36 75 24} } Fl_Button btn_code { label {Get data} callback cb_btn_get_code xywh {15 70 70 25} } Fl_Output out_code { label {Read-only data} xywh {210 70 75 25} } Fl_Menu_Bar {} {open xywh {0 0 320 20} } { Submenu {} { label File callback cb_win_callback open xywh {0 0 62 20} } { MenuItem {} { label Quit callback cb_win_callback xywh {0 0 30 20} } } } Fl_Group {} {open xywh {50 117 155 68} } { Fl_Round_Button {} { label ten user_data 10 callback cb_radio xywh {50 117 155 18} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button {} { label twenty user_data 20 callback cb_radio xywh {50 140 155 20} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button {} { label thirty user_data 30 callback cb_radio xywh {50 165 155 20} type Radio down_box ROUND_DOWN_BOX } } } } Function {cb_code(Fl_Widget* inp_, void*userdata)} {open } { code {std::cout << "cb_code\\n" << (char const*)userdata;} {} } Function {cb_btn_get_code(Fl_Widget* inp_, void* userdata_)} { comment {callback from "Get data" button} open return_type {static void} } { code {char const* text = inp_code->value(); out_code->value( text );} {} } Function {cb_win_callback(Fl_Widget* inp_, void* userdata_)} { comment {callback from window "X" button} open selected return_type {static void} } { code {std::cout << "X button clicked -- exiting the program\\n"; exit( 0 );} {} } Function {cb_radio(Fl_Widget* btn, void* userdata)} {open return_type {static void} } { code {std::cout << "radio" << (int)userdata << '\\n';} {} } Function {} {open } { code {Fl_Window* win = make_window(); win->show();} {} }