|
|
I confess I'm lost about what's the purpose of Fl_Widget::visible_focus(int) .
-
Its name suggests it's related to the widget being drawn with a dotted line when it's focused.
That's indeed the case if you apply ->visible_focus(0) to a Fl_Toggle_Button widget for example :
with this, the dotted line disappears when the button gets redrawn atfer having been pressed.
-
Its documentation mentions something entirely different, that this function modifies the keyboard focus navigation.
-
Its effect mixes both aspects, as seen modifying test/input.cxx with
b->visible_focus(0);
added after
b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_CHANGED"); (line # 120)
- Run first the unmodified input prog, put focus to the top text field, click mouse on "FL_WHEN_CHANGED": the button contains the dotted line, and the top text field has lost focus;
- Run the modified input prog, put focus and click mouse as above : the clicked button has no dotted line but the focus stays in the top text field which receives text that you may type-in then. Clearly, the focus stays unchanged because of the test done inside Fl::focus(Fl_Widget*) being discussed here.
Do we want Fl_Widget::visible_focus(int) to have both these effects?
Do we need something that prevents focus being transmitted to a widget, knowing that
the widget's handle method returning 0 to the FL_FOCUS event does that already ?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/366/1011115421@github.com>
[ Direct Link to Message ] | |
|
| |