Re: [fltk/fltk] Clarify documentation of Fl_Widget::visible_focus() (Issue #366)
Albrecht Schlosser
Jun 06, 2023
@leenzhu Thanks for your comment and suggestion. I see your issue and agree that we might want to add another method that just inhibits drawing the focus rectangle (likely only per widget) but does not change the keyboard focus behavior. This should be investigated further.
You wrote:
Both Fl::focus(Fl_Widget*) and Fl_Widget::visible_focus() will disable the keybord navigation.
This statement doesn't seem to be correct (typo or copy/paste error?):
Fl::focus(Fl_Widget*) sets the widget that (currently) has the keyboard focus (gets keyboard events). This does not change keyboard navigation behavior.
Note that we can't change the behavior of Fl::visible_foucs() because of backwards compatibility, hence this method will always do both, enable/disable keyboard navigation and enable/disable drawing the focus rectangle.
However, we can add new methods (either global: Fl::any_name() or per widget: Fl_Widget::any_name()) to enable and disable drawing the focus rectangle (replace any_name with a new method name).
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/366/1578238841@github.com>
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.