Hello all,

My app has a menubar (File, Edit, View, etc.). Below that I have a Fl_Group
of Fl_Buttons acting as a Toolbar.

Now I am adding a context menu (right-click) to a Fl_Scroll. The context
menu contents is identical to the View submenu.

I thought I would hack this in quickly by overriding the Fl_Scroll's handle
and on a FL_PUSH and when Fl::event_button3() is true call do_callback().
The callback for my derived Fl_Scroll calls this function:


void canvas_context()
{
   const Fl_Menu_Item *item = layers_image->popup(
      Fl::event_x(), Fl::event_y());

   if(item)
      item->do_callback(canvas);
}

layers_image is a submenu within the View submenu. The context menu does
appear and when I select one of the menuitems the appropriate actions do
occur.

My problem is that the toolbar buttons, that would be covered up when View
is selected, sometimes get their value set to 1.

For example, I have:
 View
   Layers
      LayerA
      LayerB

When I select View, the pull down menu showing the Layers submenu covers up
two toolbar buttons. Now, if I bring up the context menu, I do see LayerA
and LayerB. If I select LayerB, then the toolbar button that would be
covered up if View was pulled down, gets is value set to 1.

Has anyone come across this behaviour before? I am using fltk 1.1.x-r5940.


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

Reply via email to