macOS: Allow setting some fullscreen style options

When using the native fullscreen API by enabling EnableFullScrenView()
allow using hiding (or showing) menu and/or toolbar. An additional style
parameter has been added to EnableFullScrenView() to allow customizing
which style is applied when the user presses the fullscreen button
instead of a call to ShowFullScreen().

Closes #22180.
This commit is contained in:
Tobias Taschner
2022-03-11 13:29:03 +01:00
committed by Vadim Zeitlin
parent 9b2f55833e
commit 0a8bba971c
9 changed files with 44 additions and 11 deletions

View File

@@ -649,6 +649,10 @@ public:
@param enable
If @true (default) make the zoom button toggle full screen;
if @false the button does only toggle zoom.
@param style
This parameter sets which elements will be hidden when the
user presses the full screen button. See ShowFullScreen()
for possible values. It is available since wxWidgets 3.1.6.
@return @true if the button behaviour has been changed, @false if running
under another OS.
@@ -658,6 +662,8 @@ public:
and entering and exiting the mode is animated.
If the button is not present the old way of switching to full screen
is used.
Only @c ::wxFULLSCREEN_NOTOOLBAR and @c ::wxFULLSCREEN_NOMENUBAR will be
used when using the fullscreen API (other values are ignored).
@onlyfor{wxosx}
@@ -665,7 +671,7 @@ public:
@since 3.1.0
*/
virtual bool EnableFullScreenView(bool enable = true);
virtual bool EnableFullScreenView(bool enable = true, long style = wxFULLSCREEN_ALL);
/**
Depending on the value of @a show parameter the window is either shown