> What did you have in mind when trying to modify
> Fl_Menu_Item::test_shortcut? Do we know something there that
> we don't know in Fl_Menu_Item::find_shortcut? Just looking
> for clues of how to solve this and if you have already come
> up with half a plan I might as well continue on that thought...
Well, the "plan" (using the term loosely...) went like this;
- Figure out if we are in a submenu or not (somehow) maybe by using
m->submenu() or similar.
- If we are in a submenu, modify Fl::e_state to ensure that FL_ALT is
asserted *before* we call Fl::test_shortcut().
- Restore Fl::e_state to what it was before we modified it...
Note that this is a bit of a hack, Fl::e_state ought to be a protected
member of Fl, but as it happens it is not...
So...
int old_state = Fl::e_state;
Fl::e_state |= FL_ALT;
Fl::test_shortcut(...);
Fl::e_state = old_state;
BUT: Probably with some appropriate "#ifdef WIN32" guards around it to
stop it spilling into the other platform builds...
The idea being to make sure that in fl_shortcut.cxx, whenever we call
Fl::test_shortcut(...) for a submenu, the FL_ALT modifier will always
*appear* to be set, and then maybe everything will be OK.
Perhaps...
SELEX Galileo Ltd
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-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev