1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:07:44 +00:00

Base: Move GML Widget documentation to subsubsection

This is not only convenient, but also a subsection testcase :^)
This commit is contained in:
kleines Filmröllchen 2022-12-14 17:24:11 +01:00 committed by Andrew Kaster
parent ad6cbc4192
commit 3df2eb66be
44 changed files with 43 additions and 43 deletions

View file

@ -0,0 +1,19 @@
## Name
GML Breadcrumb Bar Widget
## Description
Defines a GUI bread crumb toolbar widget.
## Synopsis
`@GUI::Breadcrumbbar`
## Examples
```gml
@GUI::Breadcrumbbar {
name: "breadcrumbbar"
}
```

View file

@ -0,0 +1,34 @@
## Name
## Description
Defines a GUI Button widget.
## Synopsis
`@GUI::Button`
## Examples
```gml
@GUI::Button {
name: "normal_button"
text: "Button"
}
@GUI::Button {
name: "disabled_normal_button"
text: "Disabled"
enabled: false
}
```
## Registered Properties
| Property | Type | Possible values | Description |
| ------------ | ------ | --------------- | ----------------------------------------------------------------------------------------------------- |
| button_style | enum | Normal, Coolbar | Sets the style of the button |
| text | string | Any string | Sets the label text |
| checked | bool | true or false | Whether the button is checked; this only applies to checkable subclasses |
| checkable | bool | true or false | Whether the button can be checked; this only applies to checkable subclasses |
| exclusive | bool | true or false | Whether the button's check state is exclusive to its group; this only applies to checkable subclasses |

View file

@ -0,0 +1,19 @@
## Name
GML Calendar Widget
## Description
Defines a GUI calendar widget.
## Synopsis
`@GUI::Calendar`
## Examples
```gml
@GUI::Calendar {
name: "calendar"
}
```

View file

@ -0,0 +1,36 @@
## Name
GML Checkbox Widget
## Description
Defines a GUI checkbox widget.
## Synopsis
`@GUI::CheckBox`
## Examples
```gml
@GUI::CheckBox {
name: "top_checkbox"
text: "Checkbox"
}
@GUI::CheckBox {
name: "bottom_checkbox"
text: "Disabled"
enabled: false
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-------------------|--------|-------------------|--------------------------------------------------------------------|
| autosize | bool | true or false | Determines if auto-sized |
| 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)

View file

@ -0,0 +1,32 @@
## Name
GML Color Input Widget
## Description
Defines a GUI color input widget.
## Synopsis
`@GUI::ColorInput`
## Examples
```gml
@GUI::ColorInput {
name: "font_colorinput"
placeholder: "Color dialog"
}
@GUI::ColorInput {
placeholder: "Disabled"
enabled: false
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|--------------------|--------|-----------------|---------------------------------------------------------|
| color_picker_title | string | Any string | Sets the title of the input |
| has_alpha_channel | bool | true or false | Whether to include the alpha channel in color selection |

View file

@ -0,0 +1,32 @@
## Name
GML Combo Box Widget
## Description
Defines a GUI combo box widget. Another name for this would be a dropdown or select.
## Synopsis
`@GUI::ComboBox`
## Examples
```gml
@GUI::ComboBox {
name: "msgbox_icon_combobox"
model_only: true
}
@GUI::ComboBox {
name: "msgbox_buttons_combobox"
model_only: true
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-------------|--------|-----------------|------------------------------|
| placeholder | string | Any string | Editor placeholder |
| model_only | bool | true or false | Only allow values from model |

View file

@ -0,0 +1,32 @@
## Name
GML Frame Widget
## Description
Defines a GUI frame widget. Frames can contain other GUI widgets.
## Synopsis
`@GUI::Frame`
## Examples
```gml
@GUI::Frame {
name: "tip_frame"
min_width: 340
min_height: 160
layout: @GUI::HorizontalBoxLayout {
margins: [0, 16, 0, 0]
}
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-----------|---------|--------------------------------------------------------------|--------------------|
| thickness | integer | 64-bit integer | Sets the thickness |
| shadow | enum | Plain, Raised, Sunken | Sets the shadow |
| shape | enum | NoFrame, Box, Container, Panel, VerticalLine, HorizontalLine | Sets the shape |

View file

@ -0,0 +1,25 @@
## Name
GML Group Box Widget
## Description
Defines a GUI group box widget. Used to contain widgets in a border with a title.
## Synopsis
`@GUI::GroupBox`
## Examples
```gml
@GUI::GroupBox {
title: "Appearance"
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|----------|--------|-----------------|----------------|
| title | string | Any string | Sets the title |

View file

@ -0,0 +1,20 @@
## Name
GML Horizontal Progress Bar Widget
## Description
Defines a GUI horizontal progress bar widget.
## Synopsis
`@GUI::HorizontalProgressbar`
## Examples
```gml
@GUI::HorizontalProgressbar {
name: "horizontal_progressbar"
fixed_height: 20
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Horizontal Separator Widget
## Description
Defines a horizontal separator widget. Creates a horizontal line separating elements.
## Synopsis
`@GUI::HorizontalSeparator`
## Examples
```gml
@GUI::HorizontalSeparator {
fixed_height: 2
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Horizontal Slider Widget
## Description
Defines a GUI horizontal slider widget.
## Synopsis
`@GUI::HorizontalSlider`
## Examples
```gml
@GUI::HorizontalSlider {
}
```

View file

@ -0,0 +1,19 @@
## Name
GUI Horizontal Splitter Widget
## Description
Defines a GUI horizontal splitter widget.
## Synopsis
`@GUI::HorizontalSplitter`
## Examples
```gml
@GUI::HorizontalSplitter {
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Icon View Widget
## Description
Defines a GUI icon view widget.
## Synopsis
`@GUI::IconView`
## Examples
```gml
@GUI::IconView {
}
```

View file

@ -0,0 +1,26 @@
## Name
GML Image Widget
## Description
Defines a GUI image widget.
## Synopsis
`@GUI::ImageWidget`
## Examples
```gml
@GUI::ImageWidget {
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|----------------|------|-----------------|-------------------------------------|
| auto_resize | bool | true or false | Set if the image should auto-resize |
| should_stretch | bool | true or false | Set if the image should stretch |

View file

@ -0,0 +1,30 @@
## Name
GML Label Widget
## Description
Defines a GUI label widget.
## Synopsis
`@GUI::Label`
## Examples
```
@GUI::Label {
text: "Copying files..."
text_alignment: "CenterLeft"
font_weight: "Bold"
fixed_height: 32
name: "files_copied_label"
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-----------------|----------------|-----------------------------------------------------------------------------|----------------------------|
| text_alignment | text_alignment | Center, CenterLeft, CenterRight, TopLeft, TopRight, BottomLeft, BottomRight | Sets alignment of the text |
| text_wrapping | text_wrapping | | | | |

View file

@ -0,0 +1,19 @@
## Name
GML Link Label Widget
## Description
Defines a GUI link label widget.
## Synopsis
`@GUI::LinkLabel`
## Examples
```gml
@GUI::LinkLabel {
}
```

View file

@ -0,0 +1,19 @@
## Name
GML List-view Widget
## Synopsis
`@GUI::ListView`
## Description
Defines a GUI list view widget.
## Examples
```gml
@GUI::ListView {
name: "list_view"
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Multi-view Widget
## Description
Defines a GUI multi view widget.
## Synopsis
`@GUI::MultiView`
## Examples
```gml
@GUI::MultiView {
}
```

View file

@ -0,0 +1,21 @@
## Name
GML Opacity Slider Widget
## Description
Defines a GUI opacity slider widget.
## Synopsis
`@GUI::HorizontalOpacitySlider`
`@GUI::VerticalOpacitySlider`
## Examples
```gml
@GUI::HorizontalOpacitySlider {
name: "opacity_slider"
tooltip: "Opacity Slider"
}
```

View file

@ -0,0 +1,21 @@
## Name
GML Password Box Widget
## Description
Defines a GUI password box widget.
## Synopsis
```gml
@GUI::PasswordBox
```
## Examples
```gml
@GUI::PasswordBox {
}
```

View file

@ -0,0 +1,32 @@
## Name
GML Progress Bar Widget
## Description
Defines a GUI progress bar widget.
## Synopsis
```gml
@GUI::Progressbar
```
## Examples
```gml
@GUI::Progressbar {
fixed_height: 22
name: "progressbar"
min: 0
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|----------|--------|-----------------------------------|--------------------------------------------|
| text | string | Any string | Sets progress text |
| format | enum | NoText, Percentage, ValueSlashMax | Sets the format of the progress indication |
| min | int | Any 64 bit integer | Sets the minimum progress value |
| max | int | Any 64 bit integer | Set the maximum progress value |

View file

@ -0,0 +1,26 @@
## Name
GML Radio Button Widget
## Description
Defines a GUI radio button widget.
## Synopsis
`@GUI::RadioButton`
## Examples
```gml
@GUI::RadioButton {
name: "top_radiobutton"
text: "Radio 1"
checked: true
}
@GUI::RadioButton {
name: "bottom_radiobutton"
text: "Radio 2"
}
```

View file

@ -0,0 +1,34 @@
## Name
GML Scrollable Container Widget
## Description
Defines a GUI scrollable container widget.
Unlike other container widgets, this one does not allow multiple child widgets to be added, and thus also does not support setting a layout.
## Synopsis
`@GUI::ScrollableContainerWidget`
Content declared as `content_widget` property.
## Examples
```gml
@GUI::ScrollableContainerWidget {
content_widget: @GUI::Widget {
[...]
}
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|------------------------------------|---------------|------------------------|---------------------------------------------|
| ~~layout~~ | | none | Does not take layout |
| scrollbars_enabled | bool | true or false | Status of scrollbar |
| should_hide_unnecessary_scrollbars | bool | true or false | Whether to hide scrollbars when unnecessary |
| content_widget | widget object | Any Subclass of Widget | The Widget to be displayed in the Container |

View file

@ -0,0 +1,24 @@
## Name
GML Scrollbar Widget
## Description
Defines a GUI scrollbar widget.
## Synopsis
`@GUI::Scrollbar`
## Examples
```gml
@GUI::Scrollbar {
name: "enabled_scrollbar"
fixed_height: 16
fixed_width: -1
min: 0
max: 100
value: 50
}
```

View file

@ -0,0 +1,25 @@
## Name
GML Slider Widget
## Description
Defines a GUI slider widget.
## Synopsis
`@GUI::Slider`
## Examples
```gml
@GUI::Slider {
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|----------------|------|---------------------|---------------------------|
| knob_size_mode | enum | Fixed, Proportional | Sets the slider knob size |

View file

@ -0,0 +1,28 @@
## Name
GML Spin Box Widget
## Description
Defines a GUI spin box widget. This is a number input with buttons to increment and decrement the value.
## Synopsis
`@GUI::SpinBox`
## Examples
```gml
@GUI::SpinBox {
name: "thickness_spinbox"
min: 0
max: 2
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|----------|-------|--------------------|----------------------------------------------|
| min | int | Any 64 bit integer | Minimum number the spin box can increment to |
| max | int | Any 64 bit integer | Maximum number the spin box can increment to |

View file

@ -0,0 +1,19 @@
## Name
GML Stack Widget
## Description
Defines a GUI stack widget.
## Synopsis
`@GUI::StackWidget`
## Examples
```gml
@GUI::StackWidget {
}
```

View file

@ -0,0 +1,26 @@
## Name
GML Status Bar Widget
## Description
Defines a GUI status bar widget.
## Synopsis
`@GUI::Statusbar`
## Examples
```gml
@GUI::Statusbar {
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-------------|--------|--------------------|---------------------------------|
| text | string | Any string | Sets the text of the status bar |
| label_count | int | Any 64 bit integer | Sets the label count |

View file

@ -0,0 +1,38 @@
## Name
GML Tab Widget
## Description
Defines a GUI tab widget.
## Synopsis
`@GUI::TabWidget`
## Examples
```gml
@GUI::TabWidget {
uniform_tabs: true
@GUI::Widget {
title: "First tab"
}
@GUI::Widget {
title: "Second tab"
}
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|--------------------|----------------|-----------------------------------------------------------------------------|--------------------------------------|
| container_margins | margins | | Margins for the tab content |
| reorder_allowed | bool | true or false | Allow changing the order of the tabs |
| show_close_buttons | bool | true or false | Show a close button on each tab |
| show_tab_bar | bool | true or false | Whether to display the tabs |
| text_alignment | text_alignment | Center, CenterLeft, CenterRight, TopLeft, TopRight, BottomLeft, BottomRight | Set the alignment of tab text |
| tab_position | tab_position | Top, Bottom, Left, Right | Set the tab position |
| uniform_tabs | bool | true or false | Give all tabs the same width |

View file

@ -0,0 +1,20 @@
## Name
GML Table View Widget
## Description
Defines a GUI table view widget.
## Synopsis
`@GUI::TableView`
## Examples
```gml
@GUI::TableView {
name: "cursors_tableview"
font_size: 12
}
```

View file

@ -0,0 +1,25 @@
## Name
GML Text Box Widget
## Description
Defines a GUI text box widget.
## Synopsis
`@GUI::TextBox`
## Examples
```gml
@GUI::TextBox {
placeholder: "Text box"
mode: "Editable"
}
@GUI::TextBox {
text: "Disabled"
enabled: false
}
```

View file

@ -0,0 +1,28 @@
## Name
GML Text Editor Widget
## Description
Defines a GUI text editor widget.
## Synopsis
`@GUI::TextEditor`
## Examples
```gml
@GUI::TextEditor {
name: "text_editor"
placeholder: "Text editor"
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-------------|--------|---------------------------------|-----------------|
| text | string | Any string | Set text |
| placeholder | string | Any string | Set placeholder |
| mode | enum | Editable, ReadOnly, DisplayOnly | Set editor mode |

View file

@ -0,0 +1,32 @@
## Name
GML Toolbar Widget
## Description
Defines a GUI toolbar widget.
When `collapsible` is set to `true`, the toolbar can be resized below the size of its items.
Any items that do not fit the current size, will be placed in an overflow menu.
To keep groups (i.e. Buttons/items separated by Separators) together, and move them to the overflow menu as one, set the `gouped` property.
## Synopsis
`@GUI::Toolbar`
## Examples
```gml
@GUI::Toolbar {
name: "toolbar"
collapsible: true
grouped: true
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-------------|------|-----------------|---------------------------------------------------------------------------------------|
| collapsible | bool | true or false | If items that do not fit should be placed in an overflow menu |
| grouped | bool | true or false | If items should be moved to the overflow menu in groups, separated by Separator items |

View file

@ -0,0 +1,23 @@
## Name
GML Toolbar Container Widget
## Description
Defines a GUI toolbar container widget.
## Synopsis
`@GUI::ToolbarContainer`
## Examples
```gml
@GUI::ToolbarContainer {
name: "toolbar_container"
@GUI::Toolbar {
name: "toolbar"
}
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Tray Widget
## Description
Defines a GUI tray widget.
## Synopsis
`@GUI::Tray`
## Examples
```gml
@GUI::Tray {
}
```

View file

@ -0,0 +1,20 @@
## Name
GML Tree View Widget
## Description
Defines a GUI tree view widget.
## Synopsis
`@GUI::TreeView`
## Examples
```gml
@GUI::TreeView {
name: "tree_view"
fixed_width: 200
}
```

View file

@ -0,0 +1,19 @@
## Name
GML URL Box Widget
## Description
Defines a GUI url box widget.
## Synopsis
`@GUI::UrlBox`
## Examples
```gml
@GUI::UrlBox {
}
```

View file

@ -0,0 +1,23 @@
## Name
GML Value Slider Widget
## Description
Defines a GUI value slider widget.
## Synopsis
`@GUI::ValueSlider`
## Examples
```gml
@GUI::ValueSlider {
name: "value_slider"
min: 0
max: 100
value: 100
tooltip: "Value Slider"
}
```

View file

@ -0,0 +1,20 @@
## Name
GML Vertical Progress Bar Widget
## Description
Defines a GUI vertical progress bar widget.
## Synopsis
`@GUI::VerticalProgressbar`
## Examples
```gml
@GUI::VerticalProgressbar {
name: "vertical_progressbar_left"
fixed_width: 36
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Vertical Separator Widget
## Description
Defines a GUI vertical separator.
## Synopsis
`@GUI::VerticalSeparator`
## Examples
```gml
@GUI::VerticalSeparator {
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Vertical Slider Widget
## Description
Defines a GUI vertical slider widget.
## Synopsis
`@GUI::VerticalSlider`
## Examples
```gml
@GUI::VerticalSlider {
}
```

View file

@ -0,0 +1,19 @@
## Name
GML Vertical Splitter Widget
## Description
Defines a GUI vertical splitter widget.
## Synopsis
`@GUI::VerticalSplitter`
## Examples
```gml
@GUI::VerticalSplitter {
}
```