In fltk1 / fluid, if I create the following conceptual hierarchy
UserInterface : WidgetClass (set to Fl_Double_Window)
m_menuGroup : Group
m_menuBar : Menu_Bar
m_fileMenu : Submenu
m_quitMenuItem : MenuItem
I can't pass 'this' in the m_quitMenuItem callback userdata because
it will appear in the Fl_Menu_Item array declaration where it can't
be resolved.
Therefore I think I need to work back through the widget hierarchy
from the widget passed to the static callback in order to get find
the UserInterface instance so I can call its member functions.
But I'm not where I think I am because there appear to be additional
levels in the hierarchy and use of Fl_Menu_ too.
If I set m_quitMenuItem's callback to onFileQuit, what should Fl_???
be in he onFileQuit(Fl_???* widget) declaration, and how many parent()
and other calls do I need to get back to UserInterface ?
Been banging my head on this one too long to see anything clearly :-(
Cheers
Duncan
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk