> What is the exact syntax? Thanks.
Just tried this, and it turns out to be pretty easy in practice, I
think. See attached fluid file (probably the wrong version of fluid for
you but the ideas hold.)
------------------------
# data file for the Fltk User Interface Designer (fluid)
version 1.0110
header_name {.h}
code_name {.cxx}
decl {\#include <stdio.h>} {}
Function {} {open
} {
Fl_Window main_win {
label {Menu Test} open
xywh {436 261 322 253} type Double visible
} {
Fl_Menu_Bar mb1 {open
xywh {0 0 576 20}
} {
Submenu sub1 {
label File open
xywh {0 0 62 20}
} {
MenuItem item1 {
label {Item 1}
callback {// item 1 callback
puts("item 1");
fflush(stdout);}
xywh {5 5 30 20}
}
MenuItem item2 {
label {Item 2}
callback {// item 2 callback
puts("item 2");
fflush(stdout);}
xywh {10 10 30 20}
}
MenuItem item3 {
label {Item 3}
callback {// item 3 callback
puts("item 3");
fflush(stdout);}
xywh {20 20 30 20}
}
MenuItem item4 {
label {Item 4}
callback {// item 4 callback
puts("item 4");
fflush(stdout);}
xywh {30 30 30 20}
}
MenuItem item5 {
label {Item 5}
callback {// item 5 callback
puts("item 5");
fflush(stdout);}
xywh {40 40 30 20}
}
}
}
Fl_Button {} {
label Quit
callback {main_win->hide();}
xywh {245 205 64 35}
}
Fl_Button {} {
label {Try Callback (nice)}
callback {// test mb callback
item3->do_callback(0);} selected
xywh {50 55 165 35}
}
Fl_Button {} {
label {Try 2 (Nasty)}
callback {// test mb callback
cb_item2(0,0);}
xywh {50 110 165 35}
}
}
}
---------------------------------
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk