Re: [fltk.bugs] [LOW] STR #2574: events for invisible widgets
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current I also thought about a 2nd flag to remember the state before the widget was hidden, but unfortunately this wouldn't work in a reliable way. Example: mywidget-deactivate(); mywidget-hide(); mywidget-activate(); mywidget-show(); What would be the widget's active() state after this sequence? Note that these instruction may not be consecutive. Instead, we must assume that *all* instructions would be triggered by individual button callbacks in an arbitrary order. Conclusion: We /must/ not change the active() flag in show/hide, because they (i.e. INACTIVE and INVISIBLE) are completely independent of each other! -- To the docs[1]: An invisible widget never gets redrawn and does not get events. This obviously contradicts the above mentioned docs of the INVISIBLE flag, but both are somewhat incorrect. What they should say is: An invisible widget never gets redrawn and does not get *normal mouse and keyboard* events. It can, however, get *some* events like FL_SHOW etc.. The same applies to the INVISIBLE flag. As a workaround to solve the OP's problem I would propose to move the widget/group outside the window (and its enclosing group) range, so that it doesn't get redrawn because of clipping and can still receive shortcut events. If this doesn't work (why?), then the way to go would be to register global shortcuts instead. Corvid, could you please test one or both suggestions and report whether they solve your problem, so that we can close this STR? ... unless someone has a better idea, of course. -- [1] http://www.fltk.org/doc-1.3/classFl__Widget.html#ab572c6fbc922bf3268b72cf9e2939606 Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2527: right shift key generates left shift key event in keyboard demo
[STR Closed w/Resolution] Link: http://www.fltk.org/str.php?L2527 Version: 2.0-current Fix Version: 2.0-current (r8535) Link: http://www.fltk.org/str.php?L2527 Version: 2.0-current Fix Version: 2.0-current (r8535) ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [LOW] STR #2574: events for invisible widgets
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current Yep, that /might/ do the trick, but then we'd have to propagate FL_SHORTCUT events all the way down the widget tree, even if one Fl_Group further up in the tree doesn't have this flag set. So, in fact it should be called accepting shortcut events even if *invisible_r()*. This would probably violate the FL idea in FLTK. OTOH, we could also require that *all* (Fl_Group) widgets in the hierarchy need this flag to *pass* the FL_SHORTCUT event down to other widgets, but this would make creating the groups somewhat difficult. Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
[fltk.bugs] [HIGH] STR #2597: FLUID generates wrong source code to initialize menu labels.
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Link: http://www.fltk.org/str.php?L2597 Version: 1.3-current Since gettext() was moved from static structure into special function, there is a bug in counting of quantity of array lines (fluid/Fl_Menu_Type.cxx:467, variable nItem). Author forgot about dummy strings like as {0,0,0...} which separate submenus within the menu array. Thus, runtime cycle of initializing menu will be completed before all labels will be assigned via gettext(). To fix this bug I propose small patch: --- a\Fl_Menu_Type.cxx 2011-03-28 23:36:09.196969400 +0400 +++ b\Fl_Menu_Type.cxx 2011-03-28 23:37:04.062107500 +0400 @@ -466,7 +466,10 @@ void Fl_Menu_Type::write_code2() { const char *mName = mi-menu_name(i); for (Fl_Type* q = next; q q-is_menu_item(); q = q-next) { if (((Fl_Menu_Item_Type*)q)-label()) nLabel++; -nItem++; +int thislevel = q-level; if (q-is_parent()) thislevel++; +int nextlevel = +(q-next q-next-is_menu_item()) ? q-next-level : next-level+1; +nItem += 1+(thislevel-nextlevel); } if (nLabel) { write_c(%sif (!%s_i18n_done) {\n, indent(), mName); I have taken that method of counting from here: fluid/Fl_Menu_Type.cxx:242. There is one more problem, at the moment the text strings inside the menu array have no mark like _() or gettext(). Do you understand? Automatization tools like as xgettext or poEdit can't extract these strings from the source code. Any ideas? Link: http://www.fltk.org/str.php?L2597 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs