1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:05:08 +00:00
serenity/Base/usr/share/man/man5/GML-Widget.md
electrikmilk 58a865f349 Base+Manpages: Add basic GML documentation
First draft of GML documentation, just to get things started.
2022-03-03 14:59:00 -08:00

50 lines
5 KiB
Markdown

# Widget
Defines a GUI widget.
```gml
@GUI::Widget {
fixed_width: 250
fixed_height: 215
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
}
}
```
## Registered Properties
| Property | Type | Possible values | Description |
|-----------------------------|-------------|----------------------------------------------------|------------------------------------------------|
| x | int | | |
| y | int | | |
| visible | bool | | |
| focused | bool | | |
| enabled | bool | | |
| tooltip | string | | |
| min_size | size | | |
| max_size | size | | |
| width | int | | |
| height | int | | |
| min_width | int | | |
| min_height | int | | |
| max_width | int | | |
| max_height | int | | |
| fixed_width | int | | |
| fixed_height | int | | |
| fixed_size | size | | |
| shrink_to_fit | bool | | |
| font | string | | |
| font_size | int | | |
| font_weight | font_weight | | |
| font_type | enum | FixedWidth, Normal | |
| foreground_color | color | | |
| foreground_role | string | | |
| background_color | color | | |
| background_role | string | | |
| fill_width_background_color | bool | | |
| layout | widget | @GUI::VerticalBoxLayout, @GUI::HorizontalBoxLayout | |
| relative_rect | rect | | |
| focus_policy | enum | ClickFocus, NoFocus, TabFocus, StrongFocus | |
| margins | | | |