mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Base: Move GML documentation into subsection
That was the whole point of this endeavour :^)
This commit is contained in:
parent
f824a67b3b
commit
ad6cbc4192
Notes:
sideshowbarker
2024-07-17 06:38:11 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: ad6cbc4192
Pull-request: https://github.com/SerenityOS/serenity/pull/16495
Reviewed-by: https://github.com/ADKaster ✅
54 changed files with 89 additions and 92 deletions
|
@ -1,80 +0,0 @@
|
|||
## Name
|
||||
|
||||
GUI Markup Language (GML)
|
||||
|
||||
## Description
|
||||
|
||||
GML is Serenity's graphic user interface (GUI) markup language. GML files are human-readable text files and have no easily detectable filemagic. The format is strongly influenced by QML, the Qt Modeling Language.
|
||||
|
||||
It allows you to easily define GUI interfaces for your applications. It is easy to learn and use in C++.
|
||||
|
||||
You can easily add GML files to your project in Hack Studio either using
|
||||
|
||||
`Project > New > GML File`
|
||||
|
||||
Or right clicking on a folder in the TreeView and using
|
||||
|
||||
`New > GML File`
|
||||
|
||||
## See also
|
||||
|
||||
- [gml-format(1)](help://man/1/gml-format) formats your GML files.
|
||||
- [GML Playground(1)](help://man/1/GMLPlayground) is an interactive GML creation tool.
|
||||
|
||||
### List of GML manpages
|
||||
|
||||
- [Using GML](help://man/5/GML-Usage)
|
||||
- [GML syntax](help://man/5/GML-Syntax)
|
||||
- Extending GML
|
||||
- [Define properties](help://man/5/GML-Define-property)
|
||||
- [Define widgets](help://man/5/GML-Define-widget)
|
||||
- GML object and property reference
|
||||
- [Core::Object](help://man/5/GML-CoreObject)
|
||||
- [UI Dimensions](help://man/5/GML-UI-Dimensions)
|
||||
- Layouts
|
||||
- [HorizontalBoxLayout](help://man/5/GML-Layout-HorizontalBoxLayout)
|
||||
- [VerticalBoxLayout](help://man/5/GML-Layout-VerticalBoxLayout)
|
||||
- Widgets
|
||||
- [Breadcrumbbar](help://man/5/GML-Widget-Breadcrumbbar)
|
||||
- [Button](help://man/5/GML-Widget-Button)
|
||||
- [Calendar](help://man/5/GML-Widget-Calendar)
|
||||
- [CheckBox](help://man/5/GML-Widget-CheckBox)
|
||||
- [ColorInput](help://man/5/GML-Widget-ColorInput)
|
||||
- [ComboBox](help://man/5/GML-Widget-ComboBox)
|
||||
- [Frame](help://man/5/GML-Widget-Frame)
|
||||
- [GroupBox](help://man/5/GML-Widget-GroupBox)
|
||||
- [HorizontalProgressbar](help://man/5/GML-Widget-HorizontalProgressbar)
|
||||
- [HorizontalSeparator](help://man/5/GML-Widget-HorizontalSeparator)
|
||||
- [HorizontalSlider](help://man/5/GML-Widget-HorizontalSlider)
|
||||
- [HorizontalSplitter](help://man/5/GML-Widget-HorizontalSplitter)
|
||||
- [IconView](help://man/5/GML-Widget-IconView)
|
||||
- [ImageWidget](help://man/5/GML-Widget-ImageWidget)
|
||||
- [Label](help://man/5/GML-Widget-Label)
|
||||
- [ListView](help://man/5/GML-Widget-ListView)
|
||||
- [MultiView](help://man/5/GML-Widget-MultiView)
|
||||
- [OpacitySlider](help://man/5/GML-Widget-OpacitySlider)
|
||||
- [PasswordBox](help://man/5/GML-Widget-PasswordBox)
|
||||
- [Progressbar](help://man/5/GML-Widget-Progressbar)
|
||||
- [RadioButton](help://man/5/GML-Widget-RadioButton)
|
||||
- [ScrollableContainerWidget](help://man/5/GML-Widget-ScrollableContainerWidget)
|
||||
- [Scrollbar](help://man/5/GML-Widget-Scrollbar)
|
||||
- [Slider](help://man/5/GML-Widget-Slider)
|
||||
- [SpinBox](help://man/5/GML-Widget-SpinBox)
|
||||
- [StackWidget](help://man/5/GML-Widget-StackWidget)
|
||||
- [Statusbar](help://man/5/GML-Widget-Statusbar)
|
||||
- [TableView](help://man/5/GML-Widget-TableView)
|
||||
- [TabWidget](help://man/5/GML-Widget-TabWidget)
|
||||
- [TextBox](help://man/5/GML-Widget-TextBox)
|
||||
- [TextEditor](help://man/5/GML-Widget-TextEditor)
|
||||
- [Toolbar](help://man/5/GML-Widget-Toolbar)
|
||||
- [ToolbarContainer](help://man/5/GML-Widget-ToolbarContainer)
|
||||
- [Tray](help://man/5/GML-Widget-Tray)
|
||||
- [TreeView](help://man/5/GML-Widget-TreeView)
|
||||
- [UrlBox](help://man/5/GML-Widget-UrlBox)
|
||||
- [ValueSlider](help://man/5/GML-Widget-ValueSlider)
|
||||
- [VerticalProgressbar](help://man/5/GML-Widget-VerticalProgressbar)
|
||||
- [VerticalSeparator](help://man/5/GML-Widget-VerticalSeparator)
|
||||
- [VerticalSlider](help://man/5/GML-Widget-VerticalSlider)
|
||||
- [VerticalSplitter](help://man/5/GML-Widget-VerticalSplitter)
|
||||
- [Widget](help://man/5/GML-Widget)
|
||||
|
|
@ -1 +0,0 @@
|
|||
GML-Introduction.md
|
79
Base/usr/share/man/man5/GML.md
Normal file
79
Base/usr/share/man/man5/GML.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
## Name
|
||||
|
||||
GUI Markup Language (GML)
|
||||
|
||||
## Description
|
||||
|
||||
GML is Serenity's graphic user interface (GUI) markup language. GML files are human-readable text files and have no easily detectable filemagic. The format is strongly influenced by QML, the Qt Modeling Language.
|
||||
|
||||
It allows you to easily define GUI interfaces for your applications. It is easy to learn and use in C++.
|
||||
|
||||
You can easily add GML files to your project in Hack Studio either using
|
||||
|
||||
`Project > New > GML File`
|
||||
|
||||
Or right clicking on a folder in the TreeView and using
|
||||
|
||||
`New > GML File`
|
||||
|
||||
## See also
|
||||
|
||||
- [gml-format(1)](help://man/1/gml-format) formats your GML files.
|
||||
- [GML Playground(1)](help://man/1/GMLPlayground) is an interactive GML creation tool.
|
||||
|
||||
### List of GML manpages
|
||||
|
||||
- [Using GML](help://man/5/GML/Usage)
|
||||
- [GML syntax](help://man/5/GML/Syntax)
|
||||
- Extending GML
|
||||
- [Define properties](help://man/5/GML/Define-property)
|
||||
- [Define widgets](help://man/5/GML/Define-widget)
|
||||
- GML object and property reference
|
||||
- [Core::Object](help://man/5/GML/CoreObject)
|
||||
- [UI Dimensions](help://man/5/GML/UI-Dimensions)
|
||||
- Layouts
|
||||
- [HorizontalBoxLayout](help://man/5/GML/Layout-HorizontalBoxLayout)
|
||||
- [VerticalBoxLayout](help://man/5/GML/Layout-VerticalBoxLayout)
|
||||
- Widgets
|
||||
- [Breadcrumbbar](help://man/5/GML/Widget-Breadcrumbbar)
|
||||
- [Button](help://man/5/GML/Widget-Button)
|
||||
- [Calendar](help://man/5/GML/Widget-Calendar)
|
||||
- [CheckBox](help://man/5/GML/Widget-CheckBox)
|
||||
- [ColorInput](help://man/5/GML/Widget-ColorInput)
|
||||
- [ComboBox](help://man/5/GML/Widget-ComboBox)
|
||||
- [Frame](help://man/5/GML/Widget-Frame)
|
||||
- [GroupBox](help://man/5/GML/Widget-GroupBox)
|
||||
- [HorizontalProgressbar](help://man/5/GML/Widget-HorizontalProgressbar)
|
||||
- [HorizontalSeparator](help://man/5/GML/Widget-HorizontalSeparator)
|
||||
- [HorizontalSlider](help://man/5/GML/Widget-HorizontalSlider)
|
||||
- [HorizontalSplitter](help://man/5/GML/Widget-HorizontalSplitter)
|
||||
- [IconView](help://man/5/GML/Widget-IconView)
|
||||
- [ImageWidget](help://man/5/GML/Widget-ImageWidget)
|
||||
- [Label](help://man/5/GML/Widget-Label)
|
||||
- [ListView](help://man/5/GML/Widget-ListView)
|
||||
- [MultiView](help://man/5/GML/Widget-MultiView)
|
||||
- [OpacitySlider](help://man/5/GML/Widget-OpacitySlider)
|
||||
- [PasswordBox](help://man/5/GML/Widget-PasswordBox)
|
||||
- [Progressbar](help://man/5/GML/Widget-Progressbar)
|
||||
- [RadioButton](help://man/5/GML/Widget-RadioButton)
|
||||
- [ScrollableContainerWidget](help://man/5/GML/Widget-ScrollableContainerWidget)
|
||||
- [Scrollbar](help://man/5/GML/Widget-Scrollbar)
|
||||
- [Slider](help://man/5/GML/Widget-Slider)
|
||||
- [SpinBox](help://man/5/GML/Widget-SpinBox)
|
||||
- [StackWidget](help://man/5/GML/Widget-StackWidget)
|
||||
- [Statusbar](help://man/5/GML/Widget-Statusbar)
|
||||
- [TableView](help://man/5/GML/Widget-TableView)
|
||||
- [TabWidget](help://man/5/GML/Widget-TabWidget)
|
||||
- [TextBox](help://man/5/GML/Widget-TextBox)
|
||||
- [TextEditor](help://man/5/GML/Widget-TextEditor)
|
||||
- [Toolbar](help://man/5/GML/Widget-Toolbar)
|
||||
- [ToolbarContainer](help://man/5/GML/Widget-ToolbarContainer)
|
||||
- [Tray](help://man/5/GML/Widget-Tray)
|
||||
- [TreeView](help://man/5/GML/Widget-TreeView)
|
||||
- [UrlBox](help://man/5/GML/Widget-UrlBox)
|
||||
- [ValueSlider](help://man/5/GML/Widget-ValueSlider)
|
||||
- [VerticalProgressbar](help://man/5/GML/Widget-VerticalProgressbar)
|
||||
- [VerticalSeparator](help://man/5/GML/Widget-VerticalSeparator)
|
||||
- [VerticalSlider](help://man/5/GML/Widget-VerticalSlider)
|
||||
- [VerticalSplitter](help://man/5/GML/Widget-VerticalSplitter)
|
||||
- [Widget](help://man/5/GML/Widget)
|
|
@ -12,7 +12,7 @@ Widgets understand all properties defined by their parents. Such as `x`, `y`, `n
|
|||
|
||||
## `REGISTER_*` macros
|
||||
|
||||
There is one REGISTER macro for every generic property type, a list of which can be found in [GML Syntax(5)](help://man/5/GML-Syntax#Properties). If you need special behavior for one single property, it is usually enough to re-use one of the property types and do extra handling in the setter and getter.
|
||||
There is one REGISTER macro for every generic property type, a list of which can be found in [GML Syntax(5)](help://man/5/GML/Syntax#Properties). If you need special behavior for one single property, it is usually enough to re-use one of the property types and do extra handling in the setter and getter.
|
||||
|
||||
The general syntax of the macros is as follows:
|
||||
|
||||
|
@ -37,4 +37,4 @@ REGISTER_ENUM_PROPERTY(
|
|||
|
||||
## See also
|
||||
|
||||
- [GML Define widget(5)](help://man/5/GML-Define-widget)
|
||||
- [GML Define widget(5)](help://man/5/GML/Define-widget)
|
|
@ -47,4 +47,4 @@ OutOfProcessWebView::OutOfProcessWebView()
|
|||
|
||||
## See also
|
||||
|
||||
- [GML Define property(5)](help://man/5/GML-Define-property)
|
||||
- [GML Define property(5)](help://man/5/GML/Define-property)
|
|
@ -18,4 +18,4 @@ Defines a horizontal GUI box layout. This is a layout object that lays out widge
|
|||
|
||||
## See also
|
||||
|
||||
- [Layout](help://man/5/GML-Layout)
|
||||
- [Layout](help://man/5/GML/Layout)
|
|
@ -18,4 +18,4 @@ Defines a vertical GUI box layout. This is a layout object that lays out widgets
|
|||
|
||||
## See also
|
||||
|
||||
- [Layout](help://man/5/GML-Layout)
|
||||
- [Layout](help://man/5/GML/Layout)
|
|
@ -15,5 +15,5 @@ Abstract base class for layout objects, not used directly. Common properties of
|
|||
|
||||
## See also
|
||||
|
||||
- [HorizontalBoxLayout](help://man/5/GML-Layout-HorizontalBoxLayout)
|
||||
- [VerticalBoxLayout](help://man/5/GML-Layout-VerticalBoxLayout)
|
||||
- [HorizontalBoxLayout](help://man/5/GML/Layout-HorizontalBoxLayout)
|
||||
- [VerticalBoxLayout](help://man/5/GML/Layout-VerticalBoxLayout)
|
|
@ -34,7 +34,7 @@ Each widget (or `Core::Object`, more generally) begins with `@`, with the name o
|
|||
|
||||
As seen above, C-style single line comments with `//` are possible.
|
||||
|
||||
Inside an object, we declare the properties of the object as well as all of its children. The children are other widgets, specified plainly, while the properties take the form `key: value`. For almost all properties, the value is a JSON value, and each property expects a different kind of value. The documentation for each widget object contains information about the supported properties, their possible values, and what the properties do. Quite some properties are common to all widgets, see [GML-Widget(5)](help://man/5/GML-Widget).
|
||||
Inside an object, we declare the properties of the object as well as all of its children. The children are other widgets, specified plainly, while the properties take the form `key: value`. For almost all properties, the value is a JSON value, and each property expects a different kind of value. The documentation for each widget object contains information about the supported properties, their possible values, and what the properties do. Quite some properties are common to all widgets, see [GML/Widget(5)](help://man/5/GML/Widget).
|
||||
|
||||
```gml
|
||||
// A 20x200 coolbar button with text.
|
||||
|
@ -90,7 +90,7 @@ A property's `value` is required to be either a JSON value or another object. Ob
|
|||
Among the supported JSON values, these types can be further distinguished:
|
||||
|
||||
- `int`: Regular JSON integer, note that JSON floats are not currently used.
|
||||
- `ui_dimension`: either positive integers, that work just like `int`, or special meaning values as JSON strings; see [UI Dimensions](help://man/5/GML-UI-Dimensions)
|
||||
- `ui_dimension`: either positive integers, that work just like `int`, or special meaning values as JSON strings; see [UI Dimensions](help://man/5/GML/UI-Dimensions)
|
||||
- `bool`: Regular JSON boolean, may be enclosed in quotes but this is discouraged.
|
||||
- `string`: JSON string, also used as a basis for other types.
|
||||
- `readonly_string`: String-valued property that cannot be changed from C++ later.
|
||||
|
@ -230,4 +230,3 @@ GML files can be found in the SerenityOS source tree with the `*.gml` extension.
|
|||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -33,4 +33,4 @@ Defines a GUI checkbox widget.
|
|||
| checkbox_position | String | "Left" or "Right" | Place the checkbox itself on either the left or right of its label |
|
||||
|
||||
## See also
|
||||
- [GML Button](help://man/5/GML-Widget-Button)
|
||||
- [GML Button](help://man/5/GML/Widget-Button)
|
Loading…
Add table
Add a link
Reference in a new issue