And here is the fluid test program. Open and "Write Code" in Fluid, then use:
fltk-config --compile testinputchoice.cxx
# data file for the Fltk User Interface Designer (fluid)
version 1.0300
header_name {.h}
code_name {.cxx}
class UserInterface {open
} {
Function {UserInterface()} {open
} {
Fl_Window win {open
xywh {570 279 250 220} type Double visible
} {
Fl_Input_Choice {} {
label {input choice:}
callback {display->value(o->value());} open
xywh {65 20 115 25} align 5
} {
MenuItem {} {
label {item A}
callback {display->value("A");}
xywh {0 0 36 21}
}
MenuItem {} {
label {item B}
callback {display->value("B");}
xywh {10 10 36 21}
}
}
Fl_Menu_Button {} {
label menu open
xywh {65 65 115 25}
} {
MenuItem {} {
label {item A}
callback {display->value("A");}
xywh {10 10 36 21}
}
MenuItem {} {
label {item B}
callback {display->value("B");}
xywh {20 20 36 21}
}
}
Fl_Output display {
label {output:} selected
xywh {65 185 115 25} align 5
}
}
}
}
Function {main(int argc, char **argv)} {open return_type int
} {
code {UserInterface ui;
ui.win->show(argc, argv);
return(Fl::run());} {}
}
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev