From 2608ddd3a02041b64cace19da1961f0ab2e60b1e Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Wed, 7 Aug 2024 22:58:14 +0100 Subject: [PATCH 1/3] Add full screen mode docs --- resources/views/docs/1/the-basics/windows.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/resources/views/docs/1/the-basics/windows.md b/resources/views/docs/1/the-basics/windows.md index a7b3d0f7..907becc9 100644 --- a/resources/views/docs/1/the-basics/windows.md +++ b/resources/views/docs/1/the-basics/windows.md @@ -191,6 +191,7 @@ Window::open() ### Movable Windows By default, all windows created with the `Window` facade are movable. + You may use the `movable()` method to disable moving. ```php @@ -211,6 +212,22 @@ Window::open() ->closable(false); ``` +### Full Screen Windows + +By default, all windows created with the `Window` facade are fullscreen-able, meaning that they can enter Full Screen Mode. + +You may use the `fullscreenable()` method to disable this feature. + +```php +Window::open()->fullscreenable(false); +``` + +If you wish, you may open a window in full screen mode using the `fullscreen()` method. + +```php +Window::open()->fullscreen(); +``` + ### Window Shadow By default, all windows created with the `Window` facade have a shadow. You may use the `hasShadow()` method to disable the shadow. From 6c92cb14035cf4d240564bf17fdf5b67843bd9ca Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Fri, 23 Aug 2024 23:07:19 +0100 Subject: [PATCH 2/3] Add maximize docs --- resources/views/docs/1/the-basics/windows.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/views/docs/1/the-basics/windows.md b/resources/views/docs/1/the-basics/windows.md index 907becc9..3c21eaf8 100644 --- a/resources/views/docs/1/the-basics/windows.md +++ b/resources/views/docs/1/the-basics/windows.md @@ -38,7 +38,9 @@ You can use the ID to reference the window in other methods, such as `Window::cl ### Closing Windows To close a window, you may use the `Window::close()` method. -You may pass a unique identifier to the `close()` method to specify which window to close. + +You may pass a unique identifier to the `close()` method to specify which window to close. + If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route. ```php @@ -212,6 +214,20 @@ Window::open() ->closable(false); ``` +#### Maximize a Window + +To maximize a window, you may use the `Window::maximize()` method. + +You may pass the window ID to the `maximize()` method to specify which window to maximize. + +If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route. + +```php +Window::open('secondary'); + +Window::maximize('secondary'); +``` + ### Full Screen Windows By default, all windows created with the `Window` facade are fullscreen-able, meaning that they can enter Full Screen Mode. From fe008537a302550aec6a796df0009f63626d37d3 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Sat, 24 Aug 2024 11:11:35 +0100 Subject: [PATCH 3/3] Add maximized/minimized docs --- resources/views/docs/1/the-basics/windows.md | 58 +++++++++++++++----- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/resources/views/docs/1/the-basics/windows.md b/resources/views/docs/1/the-basics/windows.md index 3c21eaf8..3a337e08 100644 --- a/resources/views/docs/1/the-basics/windows.md +++ b/resources/views/docs/1/the-basics/windows.md @@ -62,6 +62,50 @@ Window::resize(400, 300); Window::resize(400, 300, 'settings'); ``` +### Minimizing and Maximizing + +There are convenience methods that allow you to minimize and maximize windows. + +#### Minimize a Window + +To maximize a window, you may use the `Window::minimize()` method. + +You may pass the window ID to the `minimize()` method to specify which window to minimize. + +If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route. + +```php +Window::open('secondary'); + +// Later... + +Window::minimize('secondary'); +``` + +#### Maximize a Window + +To maximize a window, you may use the `Window::maximize()` method. + +You may pass the window ID to the `maximize()` method to specify which window to maximize. + +If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route. + +```php +Window::open('secondary'); + +// Later... + +Window::maximize('secondary'); +``` + +Of course, you may also wish to open windows in a minimized or maximized state. You can achieve this simply by chaining the +`minimized()` and `maximized()` methods to your `Window::open()` call: + +```php +Window::open() + ->maximized(); +``` + ### Retrieving the Current Window You may use the `Window::current()` method to retrieve the currently focused window. @@ -214,20 +258,6 @@ Window::open() ->closable(false); ``` -#### Maximize a Window - -To maximize a window, you may use the `Window::maximize()` method. - -You may pass the window ID to the `maximize()` method to specify which window to maximize. - -If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route. - -```php -Window::open('secondary'); - -Window::maximize('secondary'); -``` - ### Full Screen Windows By default, all windows created with the `Window` facade are fullscreen-able, meaning that they can enter Full Screen Mode.