mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
Base+Manpages: Add basic GML documentation
First draft of GML documentation, just to get things started.
This commit is contained in:
parent
d01d754b83
commit
58a865f349
51 changed files with 1242 additions and 0 deletions
36
Base/usr/share/man/man5/GML-Define-widget.md
Normal file
36
Base/usr/share/man/man5/GML-Define-widget.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
## Name
|
||||
|
||||
Library or Application Defined Widgets
|
||||
|
||||
## Description
|
||||
|
||||
Some applications and libraries find it useful to define their own **LibGUI** widgets.
|
||||
|
||||
## Examples
|
||||
|
||||
```gml
|
||||
@Web::OutOfProcessWebView {
|
||||
name: "web_view"
|
||||
min_width: 340
|
||||
min_height: 160
|
||||
visible: false
|
||||
}
|
||||
```
|
||||
|
||||
They are defined using `REGISTER_WIDGET()`, just as they are in **LIbGUI**.
|
||||
|
||||
```cpp
|
||||
REGISTER_WIDGET(Web, OutOfProcessWebView)
|
||||
|
||||
...
|
||||
|
||||
OutOfProcessWebView::OutOfProcessWebView()
|
||||
{
|
||||
set_should_hide_unnecessary_scrollbars(true);
|
||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
|
||||
create_client();
|
||||
}
|
||||
|
||||
...
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue