Allow configuring visible focus on Mac

Add wxWindow::EnableVisibleFocus() for changing focus ring behavior on
macOS (currently not implemented elsewhere, although GTK+ has a
discouraged option to do it).
This commit is contained in:
Václav Slavík
2020-08-31 10:38:39 +02:00
parent 58c94d9ec0
commit 9f66b03c5c
4 changed files with 25 additions and 0 deletions

View File

@@ -540,6 +540,22 @@ public:
*/
virtual void SetCanFocus(bool canFocus);
/**
Enables or disables visible indication of keyboard focus.
By default, controls behave in platform-appropriate way and show focus
in the same way native applications do. In some very rare circumstances
it may be desirable to change the default (notably multiline text
controls don't normally have a focus indicator on Mac), which this
method allows. It should only be used if you have a good understanding
of the native platform's guidelines and user expectations.
This method is only implemented on Mac.
@since 3.1.5
*/
virtual void EnableVisibleFocus(bool enable);
/**
This sets the window to receive keyboard input.