> Hello!
> How do I implement a show/hide menu callback in FLTK?
> As far I made a function buildMenuBar which is called from main().
> Now, I have attributed a callback, cbMenuBarToggle, to my menuBar object.
> In cbMenuBarToggle(Widget *, void *menu) i have this:
> {
>     MenuBar *menuBar = (MenuBar *) menu;
>
>     if(menuBar) {
>         menuBar->hide();
>
>         menuBarState = false;
>     } else {
>         menuBar->show();
>
>         menuBarState = true;
>     }
> }
>
> menuBarState is defined as static bool of course.
>
> But I suppose I must also hide() and show() the window if I want to see the 
> menuBar again, right?

Uuuups!
Sorry for my stupid mistake everyone. :-)

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to