Skip to content

Commit bc8f13b

Browse files
authored
Docs for v0.5.4 (#38)
* Add full screen mode docs * Add maximize docs * Add maximized/minimized docs
1 parent 40987ce commit bc8f13b

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

resources/views/docs/1/the-basics/windows.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ You can use the ID to reference the window in other methods, such as `Window::cl
3838
### Closing Windows
3939

4040
To close a window, you may use the `Window::close()` method.
41-
You may pass a unique identifier to the `close()` method to specify which window to close.
41+
42+
You may pass a unique identifier to the `close()` method to specify which window to close.
43+
4244
If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route.
4345

4446
```php
@@ -60,6 +62,50 @@ Window::resize(400, 300);
6062
Window::resize(400, 300, 'settings');
6163
```
6264

65+
### Minimizing and Maximizing
66+
67+
There are convenience methods that allow you to minimize and maximize windows.
68+
69+
#### Minimize a Window
70+
71+
To maximize a window, you may use the `Window::minimize()` method.
72+
73+
You may pass the window ID to the `minimize()` method to specify which window to minimize.
74+
75+
If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route.
76+
77+
```php
78+
Window::open('secondary');
79+
80+
// Later...
81+
82+
Window::minimize('secondary');
83+
```
84+
85+
#### Maximize a Window
86+
87+
To maximize a window, you may use the `Window::maximize()` method.
88+
89+
You may pass the window ID to the `maximize()` method to specify which window to maximize.
90+
91+
If you do not specify a window ID, NativePHP will try to detect the window ID automatically based on the current route.
92+
93+
```php
94+
Window::open('secondary');
95+
96+
// Later...
97+
98+
Window::maximize('secondary');
99+
```
100+
101+
Of course, you may also wish to open windows in a minimized or maximized state. You can achieve this simply by chaining the
102+
`minimized()` and `maximized()` methods to your `Window::open()` call:
103+
104+
```php
105+
Window::open()
106+
->maximized();
107+
```
108+
63109
### Retrieving the Current Window
64110

65111
You may use the `Window::current()` method to retrieve the currently focused window.
@@ -191,6 +237,7 @@ Window::open()
191237
### Movable Windows
192238

193239
By default, all windows created with the `Window` facade are movable.
240+
194241
You may use the `movable()` method to disable moving.
195242

196243
```php
@@ -211,6 +258,22 @@ Window::open()
211258
->closable(false);
212259
```
213260

261+
### Full Screen Windows
262+
263+
By default, all windows created with the `Window` facade are fullscreen-able, meaning that they can enter Full Screen Mode.
264+
265+
You may use the `fullscreenable()` method to disable this feature.
266+
267+
```php
268+
Window::open()->fullscreenable(false);
269+
```
270+
271+
If you wish, you may open a window in full screen mode using the `fullscreen()` method.
272+
273+
```php
274+
Window::open()->fullscreen();
275+
```
276+
214277
### Window Shadow
215278

216279
By default, all windows created with the `Window` facade have a shadow. You may use the `hasShadow()` method to disable the shadow.

0 commit comments

Comments
 (0)