mirror of
				https://github.com/slint-ui/slint.git
				synced 2025-11-03 21:24:17 +00:00 
			
		
		
		
	docs: Remove builtin_ prefix from files in builtins dir
This commit is contained in:
		
							parent
							
								
									f7de5d4602
								
							
						
					
					
						commit
						1f877887cd
					
				
					 12 changed files with 66 additions and 65 deletions
				
			
		| 
						 | 
					@ -57,7 +57,7 @@ export component HelloWorld inherits Window {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
then you can use the following code in you `main` function to show the [`Window`](../slint/builtin_elements.html#window)
 | 
					then you can use the following code in you `main` function to show the [`Window`](../slint/src/builtins/elements.html#window)
 | 
				
			||||||
and change the text:
 | 
					and change the text:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```cpp
 | 
					```cpp
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,12 +62,12 @@ is compiled to native code.
 | 
				
			||||||
   :maxdepth: 4
 | 
					   :maxdepth: 4
 | 
				
			||||||
   :caption: Builtins
 | 
					   :caption: Builtins
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   src/builtins/builtin_callbacks.md
 | 
					   src/builtins/callbacks.md
 | 
				
			||||||
   src/builtins/builtin_elements.md
 | 
					   src/builtins/elements.md
 | 
				
			||||||
   src/builtins/builtin_enums.md
 | 
					   src/builtins/enums.md
 | 
				
			||||||
   src/builtins/builtin_functions.md
 | 
					   src/builtins/functions.md
 | 
				
			||||||
   src/builtins/builtin_namespaces.md
 | 
					   src/builtins/namespaces.md
 | 
				
			||||||
   src/builtins/builtin_structs.md
 | 
					   src/builtins/structs.md
 | 
				
			||||||
   src/builtins/widgets.md
 | 
					   src/builtins/widgets.md
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. toctree::
 | 
					.. toctree::
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,7 +23,7 @@ These properties are valid on all visible items and can be used to specify const
 | 
				
			||||||
### Miscellaneous
 | 
					### Miscellaneous
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`cache-rendering-hint`** (_in_ _bool_): When set to `true`, this provides a hint to the renderer to cache the contents of the element and all the children into an intermediate cached layer. For complex sub-trees that rarely change this may speed up the rendering, at the expense of increased memory consumption. Not all rendering backends support this, so this is merely a hint. (default value: `false`)
 | 
					-   **`cache-rendering-hint`** (_in_ _bool_): When set to `true`, this provides a hint to the renderer to cache the contents of the element and all the children into an intermediate cached layer. For complex sub-trees that rarely change this may speed up the rendering, at the expense of increased memory consumption. Not all rendering backends support this, so this is merely a hint. (default value: `false`)
 | 
				
			||||||
-   **`dialog-button-role`** (_in_ _enum [`DialogButtonRole`](builtin_enums.md#dialogbuttonrole)_): Specify that this is a button in a `Dialog`.
 | 
					-   **`dialog-button-role`** (_in_ _enum [`DialogButtonRole`](enums.md#dialogbuttonrole)_): Specify that this is a button in a `Dialog`.
 | 
				
			||||||
-   **`opacity`** (_in_ _float_): A value between 0 and 1 (or a percentage) that is used to draw the element and its children with transparency. 0 is fully transparent (invisible), and 1 is fully opaque. (default value: 1)
 | 
					-   **`opacity`** (_in_ _float_): A value between 0 and 1 (or a percentage) that is used to draw the element and its children with transparency. 0 is fully transparent (invisible), and 1 is fully opaque. (default value: 1)
 | 
				
			||||||
-   **`visible`** (_in_ _bool_): When set to `false`, the element and all his children will not be drawn and not react to mouse input (default value: `true`)
 | 
					-   **`visible`** (_in_ _bool_): When set to `false`, the element and all his children will not be drawn and not react to mouse input (default value: `true`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,7 @@ These properties are valid on all visible items and can be used to specify const
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Use the following `accessible-` properties to make your items interact well with software like screen readers, braille terminals and other software to make your application accessible.
 | 
					Use the following `accessible-` properties to make your items interact well with software like screen readers, braille terminals and other software to make your application accessible.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`accessible-role`** (_in_ _enum [`AccessibleRole`](builtin_enums.md#accessiblerole)_): The role of the element. This property is mandatory to be able to use any other accessible properties. It should be set to a constant value. (default value: `none` for most elements, but `text` for the Text element)
 | 
					-   **`accessible-role`** (_in_ _enum [`AccessibleRole`](enums.md#accessiblerole)_): The role of the element. This property is mandatory to be able to use any other accessible properties. It should be set to a constant value. (default value: `none` for most elements, but `text` for the Text element)
 | 
				
			||||||
-   **`accessible-checkable`** (_in_ _bool_): Whether the element is can be checked or not.
 | 
					-   **`accessible-checkable`** (_in_ _bool_): Whether the element is can be checked or not.
 | 
				
			||||||
-   **`accessible-checked`** (_in_ _bool_): Whether the element is checked or not. This maps to the "checked" state of checkboxes, radio buttons, and other widgets.
 | 
					-   **`accessible-checked`** (_in_ _bool_): Whether the element is checked or not. This maps to the "checked" state of checkboxes, radio buttons, and other widgets.
 | 
				
			||||||
-   **`accessible-description`** (_in_ _string_): The description for the current element.
 | 
					-   **`accessible-description`** (_in_ _string_): The description for the current element.
 | 
				
			||||||
| 
						 | 
					@ -135,9 +135,9 @@ export component Example inherits Window {
 | 
				
			||||||
The `FocusScope` exposes callbacks to intercept key events. Note that `FocusScope`
 | 
					The `FocusScope` exposes callbacks to intercept key events. Note that `FocusScope`
 | 
				
			||||||
will only invoke them when it `has-focus`.
 | 
					will only invoke them when it `has-focus`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The [`KeyEvent`](builtin_structs.md#keyevent) has a text property, which is a character of the key entered.
 | 
					The [`KeyEvent`](structs.md#keyevent) has a text property, which is a character of the key entered.
 | 
				
			||||||
When a non-printable key is pressed, the character will be either a control character,
 | 
					When a non-printable key is pressed, the character will be either a control character,
 | 
				
			||||||
or it will be mapped to a private unicode character. The mapping of these non-printable, special characters is available in the [`Key`](builtin_namespaces.md#key) namespace
 | 
					or it will be mapped to a private unicode character. The mapping of these non-printable, special characters is available in the [`Key`](namespaces.md#key) namespace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,12 +147,12 @@ or it will be mapped to a private unicode character. The mapping of these non-pr
 | 
				
			||||||
### Functions
 | 
					### Functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`focus()`** Call this function to transfer keyboard focus to this `FocusScope`,
 | 
					-   **`focus()`** Call this function to transfer keyboard focus to this `FocusScope`,
 | 
				
			||||||
    to receive future [`KeyEvent`](builtin_structs.md#keyevent)s.
 | 
					    to receive future [`KeyEvent`](structs.md#keyevent)s.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Callbacks
 | 
					### Callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`key-pressed(`_[`KeyEvent`](builtin_structs.md#keyevent)_`) -> [`EventResult`](builtin_structs.md#eventresult)**: Invoked when a key is pressed, the argument is a [`KeyEvent`](builtin_structs.md#keyevent) struct.
 | 
					-   **`key-pressed(`_[`KeyEvent`](structs.md#keyevent)_`) -> [`EventResult`](structs.md#eventresult)**: Invoked when a key is pressed, the argument is a [`KeyEvent`](structs.md#keyevent) struct.
 | 
				
			||||||
-   **`key-released(`_[`KeyEvent`](builtin_structs.md#keyevent)_`) -> [`EventResult`](builtin_structs.md#eventresult)**: Invoked when a key is released, the argument is a [`KeyEvent`](builtin_structs.md#keyevent) struct.
 | 
					-   **`key-released(`_[`KeyEvent`](structs.md#keyevent)_`) -> [`EventResult`](structs.md#eventresult)**: Invoked when a key is released, the argument is a [`KeyEvent`](structs.md#keyevent) struct.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -235,8 +235,8 @@ An `Image` can be used to represent an image loaded from a file.
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`colorize`** (_in_ _brush_): When set, the image is used as an alpha mask and is drawn in the given color (or with the gradient).
 | 
					-   **`colorize`** (_in_ _brush_): When set, the image is used as an alpha mask and is drawn in the given color (or with the gradient).
 | 
				
			||||||
-   **`image-fit`** (_in_ _enum_ [`ImageFit`](builtin_enums.md#imagefit)): Specifies how the source image shall be fit into the image element. (default value: `contain` when the `Image` element is part of a layout, `fill` otherwise)
 | 
					-   **`image-fit`** (_in_ _enum_ [`ImageFit`](enums.md#imagefit)): Specifies how the source image shall be fit into the image element. (default value: `contain` when the `Image` element is part of a layout, `fill` otherwise)
 | 
				
			||||||
-   **`image-rendering`** (_in_ _enum_ [`ImageRendering`](builtin_enums.md#imagerendering)): Specifies how the source image will be scaled. (default value: `smooth`)
 | 
					-   **`image-rendering`** (_in_ _enum_ [`ImageRendering`](enums.md#imagerendering)): Specifies how the source image will be scaled. (default value: `smooth`)
 | 
				
			||||||
-   **`rotation-angle`** (_in_ _angle_), **`rotation-origin-x`** (_in_ _length_), **`rotation-origin-y`** (_in_ _length_):
 | 
					-   **`rotation-angle`** (_in_ _angle_), **`rotation-origin-x`** (_in_ _length_), **`rotation-origin-y`** (_in_ _length_):
 | 
				
			||||||
    Rotates the image by the given angle around the specified origin point. The default origin point is the center of the element.
 | 
					    Rotates the image by the given angle around the specified origin point. The default origin point is the center of the element.
 | 
				
			||||||
    When these properties are set, the `Image` cannot have children.
 | 
					    When these properties are set, the `Image` cannot have children.
 | 
				
			||||||
| 
						 | 
					@ -309,7 +309,7 @@ accordingly.
 | 
				
			||||||
### Common Path Properties
 | 
					### Common Path Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`fill`** (_in_ _brush_): The color for filling the shape of the path.
 | 
					-   **`fill`** (_in_ _brush_): The color for filling the shape of the path.
 | 
				
			||||||
-   **`fill-rule`** (_in_ _enum [`FillRule`](builtin_enums.md#fillrule)_): The fill rule to use for the path. (default value: `nonzero`)
 | 
					-   **`fill-rule`** (_in_ _enum [`FillRule`](enums.md#fillrule)_): The fill rule to use for the path. (default value: `nonzero`)
 | 
				
			||||||
-   **`stroke`** (_in_ _brush_): The color for drawing the outline of the path.
 | 
					-   **`stroke`** (_in_ _brush_): The color for drawing the outline of the path.
 | 
				
			||||||
-   **`stroke-width`** (_in_ _length_): The width of the outline.
 | 
					-   **`stroke-width`** (_in_ _length_): The width of the outline.
 | 
				
			||||||
-   **`width`** (_in_ _length_): If non-zero, the path will be scaled to fit into the specified width.
 | 
					-   **`width`** (_in_ _length_): If non-zero, the path will be scaled to fit into the specified width.
 | 
				
			||||||
| 
						 | 
					@ -563,9 +563,9 @@ When not part of a layout, its width or height defaults to 100% of the parent el
 | 
				
			||||||
-   **`font-family`** (_in_ _string_): The name of the font family selected for rendering the text.
 | 
					-   **`font-family`** (_in_ _string_): The name of the font family selected for rendering the text.
 | 
				
			||||||
-   **`font-size`** (_in_ _length_): The font size of the text.
 | 
					-   **`font-size`** (_in_ _length_): The font size of the text.
 | 
				
			||||||
-   **`font-weight`** (_in_ _int_): The weight of the font. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight.
 | 
					-   **`font-weight`** (_in_ _int_): The weight of the font. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight.
 | 
				
			||||||
-   **`has-focus`** (_out_ _bool_): `TextInput` sets this to `true` when it is focused. Only then it receives [`KeyEvent`](builtin_structs.md#keyevent)s.
 | 
					-   **`has-focus`** (_out_ _bool_): `TextInput` sets this to `true` when it is focused. Only then it receives [`KeyEvent`](structs.md#keyevent)s.
 | 
				
			||||||
-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](builtin_enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
					-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
				
			||||||
-   **`input-type`** (_in_ _enum [`InputType`](builtin_enums.md#inputtype)_): Use this to configure `TextInput` for editing special input, such as password fields. (default value: `text`)
 | 
					-   **`input-type`** (_in_ _enum [`InputType`](enums.md#inputtype)_): Use this to configure `TextInput` for editing special input, such as password fields. (default value: `text`)
 | 
				
			||||||
-   **`letter-spacing`** (_in_ _length_): The letter spacing allows changing the spacing between the glyphs. A positive value increases the spacing and a negative value decreases the distance. (default value: 0)
 | 
					-   **`letter-spacing`** (_in_ _length_): The letter spacing allows changing the spacing between the glyphs. A positive value increases the spacing and a negative value decreases the distance. (default value: 0)
 | 
				
			||||||
-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but selecting text is still enabled as well as editing text programatically. (default value: `false`)
 | 
					-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but selecting text is still enabled as well as editing text programatically. (default value: `false`)
 | 
				
			||||||
-   **`selection-background-color`** (_in_ _color_): The background color of the selection.
 | 
					-   **`selection-background-color`** (_in_ _color_): The background color of the selection.
 | 
				
			||||||
| 
						 | 
					@ -573,8 +573,8 @@ When not part of a layout, its width or height defaults to 100% of the parent el
 | 
				
			||||||
-   **`single-line`** (_in_ _bool_): When set to `true`, the text is always rendered as a single line, regardless of new line separators in the text. (default value: `true`)
 | 
					-   **`single-line`** (_in_ _bool_): When set to `true`, the text is always rendered as a single line, regardless of new line separators in the text. (default value: `true`)
 | 
				
			||||||
-   **`text-cursor-width`** (_in_ _length_): The width of the text cursor. (default value: provided at run-time by the selected widget style)
 | 
					-   **`text-cursor-width`** (_in_ _length_): The width of the text cursor. (default value: provided at run-time by the selected widget style)
 | 
				
			||||||
-   **`text`** (_in-out_ _string_): The text rendered and editable by the user.
 | 
					-   **`text`** (_in-out_ _string_): The text rendered and editable by the user.
 | 
				
			||||||
-   **`vertical-alignment`** (_in_ _enum [`TextVerticalAlignment`](builtin_enums.md#textverticalalignment)_): The vertical alignment of the text.
 | 
					-   **`vertical-alignment`** (_in_ _enum [`TextVerticalAlignment`](enums.md#textverticalalignment)_): The vertical alignment of the text.
 | 
				
			||||||
-   **`wrap`** (_in_ _enum [`TextWrap`](builtin_enums.md#textwrap)_): The way the text input wraps. Only makes sense when `single-line` is false. (default value: no-wrap)
 | 
					-   **`wrap`** (_in_ _enum [`TextWrap`](enums.md#textwrap)_): The way the text input wraps. Only makes sense when `single-line` is false. (default value: no-wrap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Functions
 | 
					### Functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -583,7 +583,7 @@ When not part of a layout, its width or height defaults to 100% of the parent el
 | 
				
			||||||
### Callbacks
 | 
					### Callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`accepted()`**: Invoked when enter key is pressed.
 | 
					-   **`accepted()`**: Invoked when enter key is pressed.
 | 
				
			||||||
-   **`cursor-position-changed(_[`Point`](builtin_structs.md#point)_)**: The cursor was moved to the new (x, y) position.
 | 
					-   **`cursor-position-changed(_[`Point`](structs.md#point)_)**: The cursor was moved to the new (x, y) position.
 | 
				
			||||||
-   **`edited()`**: Invoked when the text has changed because the user modified it.
 | 
					-   **`edited()`**: Invoked when the text has changed because the user modified it.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
| 
						 | 
					@ -616,12 +616,12 @@ and the text itself.
 | 
				
			||||||
-   **`font-family`** (_in_ _string_): The name of the font family selected for rendering the text.
 | 
					-   **`font-family`** (_in_ _string_): The name of the font family selected for rendering the text.
 | 
				
			||||||
-   **`font-size`** (_in_ _length_): The font size of the text.
 | 
					-   **`font-size`** (_in_ _length_): The font size of the text.
 | 
				
			||||||
-   **`font-weight`** (_in_ _int_): The weight of the font. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight.
 | 
					-   **`font-weight`** (_in_ _int_): The weight of the font. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight.
 | 
				
			||||||
-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](builtin_enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
					-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
				
			||||||
-   **`letter-spacing`** (_in_ _length_): The letter spacing allows changing the spacing between the glyphs. A positive value increases the spacing and a negative value decreases the distance. (default value: 0)
 | 
					-   **`letter-spacing`** (_in_ _length_): The letter spacing allows changing the spacing between the glyphs. A positive value increases the spacing and a negative value decreases the distance. (default value: 0)
 | 
				
			||||||
-   **`overflow`** (_in_ _enum [`TextOverflow`](builtin_enums.md#textoverflow)_): What happens when the text overflows (default value: clip).
 | 
					-   **`overflow`** (_in_ _enum [`TextOverflow`](enums.md#textoverflow)_): What happens when the text overflows (default value: clip).
 | 
				
			||||||
-   **`text`** (_in_ _string_): The text rendered.
 | 
					-   **`text`** (_in_ _string_): The text rendered.
 | 
				
			||||||
-   **`vertical-alignment`** (_in_ _enum [`TextVerticalAlignment`](builtin_enums.md#textverticalalignment)_): The vertical alignment of the text.
 | 
					-   **`vertical-alignment`** (_in_ _enum [`TextVerticalAlignment`](enums.md#textverticalalignment)_): The vertical alignment of the text.
 | 
				
			||||||
-   **`wrap`** (_in_ _enum [`TextWrap`](builtin_enums.md#textwrap)_): The way the text wraps (default value: `no-wrap`).
 | 
					-   **`wrap`** (_in_ _enum [`TextWrap`](enums.md#textwrap)_): The way the text wraps (default value: `no-wrap`).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -668,7 +668,7 @@ When not part of a layout, its width or height default to 100% of the parent ele
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`has-hover`** (_out_ _bool_): `TouchArea` sets this to `true` when the mouse is over it.
 | 
					-   **`has-hover`** (_out_ _bool_): `TouchArea` sets this to `true` when the mouse is over it.
 | 
				
			||||||
-   **`mouse-cursor`** (_in_ _enum [`MouseCursor`](builtin_enums.md#mousecursor)_): The mouse cursor type when the mouse is hovering the `TouchArea`.
 | 
					-   **`mouse-cursor`** (_in_ _enum [`MouseCursor`](enums.md#mousecursor)_): The mouse cursor type when the mouse is hovering the `TouchArea`.
 | 
				
			||||||
-   **`mouse-x`**, **`mouse-y`** (_out_ _length_): Set by the `TouchArea` to the position of the mouse within it.
 | 
					-   **`mouse-x`**, **`mouse-y`** (_out_ _length_): Set by the `TouchArea` to the position of the mouse within it.
 | 
				
			||||||
-   **`pressed-x`**, **`pressed-y`** (_out_ _length_): Set to `true` by the `TouchArea` to the position of the mouse at the moment it was last pressed.
 | 
					-   **`pressed-x`**, **`pressed-y`** (_out_ _length_): Set to `true` by the `TouchArea` to the position of the mouse at the moment it was last pressed.
 | 
				
			||||||
-   **`pressed`** (_out_ _bool_): Set to `true` by the `TouchArea` when the mouse is pressed over it.
 | 
					-   **`pressed`** (_out_ _bool_): Set to `true` by the `TouchArea` when the mouse is pressed over it.
 | 
				
			||||||
| 
						 | 
					@ -677,7 +677,7 @@ When not part of a layout, its width or height default to 100% of the parent ele
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`clicked()`**: Invoked when clicked: The mouse is pressed, then released on this element.
 | 
					-   **`clicked()`**: Invoked when clicked: The mouse is pressed, then released on this element.
 | 
				
			||||||
-   **`moved()`**: The mouse has been moved. This will only be called if the mouse is also pressed.
 | 
					-   **`moved()`**: The mouse has been moved. This will only be called if the mouse is also pressed.
 | 
				
			||||||
-   **`pointer-event(`_[`PointerEvent`](builtin_structs.md#pointerevent)_`)`**: Invoked when a button was pressed or released.
 | 
					-   **`pointer-event(`_[`PointerEvent`](structs.md#pointerevent)_`)`**: Invoked when a button was pressed or released.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -717,7 +717,7 @@ they will be computed by the layout respecting the minimum and maximum sizes and
 | 
				
			||||||
-   **`spacing`** (_in_ _length_): The distance between the elements in the layout.
 | 
					-   **`spacing`** (_in_ _length_): The distance between the elements in the layout.
 | 
				
			||||||
-   **`padding`** (_in_ _length_): the padding within the layout.
 | 
					-   **`padding`** (_in_ _length_): the padding within the layout.
 | 
				
			||||||
-   **`padding-left`**, **`padding-right`**, **`padding-top`** and **`padding-bottom`** (_in_ _length_): Set these properties to override the padding on specific sides.
 | 
					-   **`padding-left`**, **`padding-right`**, **`padding-top`** and **`padding-bottom`** (_in_ _length_): Set these properties to override the padding on specific sides.
 | 
				
			||||||
-   **`alignment`** (_in_ _enum [`LayoutAlignment`](builtin_enums.md#layoutalignment)_): Set the alignment. Matches the CSS flex box.
 | 
					-   **`alignment`** (_in_ _enum [`LayoutAlignment`](enums.md#layoutalignment)_): Set the alignment. Matches the CSS flex box.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ Unlike in CSS, the commas are mandatory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `Key`
 | 
					## `Key`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Use the constants in the `Key` namespace to handle pressing of keys that don't have a printable character. Check the value of [`KeyEvent`](builtin_structs.md#keyevent)'s `text` property
 | 
					Use the constants in the `Key` namespace to handle pressing of keys that don't have a printable character. Check the value of [`KeyEvent`](structs.md#keyevent)'s `text` property
 | 
				
			||||||
against the constants below.
 | 
					against the constants below.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`Backspace`**
 | 
					-   **`Backspace`**
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,7 @@ This structure is generated and passed to the `pointer-event` callback of the `T
 | 
				
			||||||
-   **`kind`** (_enum PointerEventKind_): The kind of the event: one of the following
 | 
					-   **`kind`** (_enum PointerEventKind_): The kind of the event: one of the following
 | 
				
			||||||
    -   `down`: The button was pressed.
 | 
					    -   `down`: The button was pressed.
 | 
				
			||||||
    -   `up`: The button was released.
 | 
					    -   `up`: The button was released.
 | 
				
			||||||
    -   `cancel`: Another element or window took hold of the grab. This applies to all pressed button and the `button` is not relevent.
 | 
					    -   `cancel`: Another element or window took hold of the grab. This applies to all pressed button and the `button` is not relevant.
 | 
				
			||||||
-   **`button`** (_enum PointerEventButton_): The button that was pressed or released. `left`, `right`, `middle`, or `none`.
 | 
					-   **`button`** (_enum PointerEventButton_): The button that was pressed or released. `left`, `right`, `middle`, or `none`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `StandardListViewItem`
 | 
					## `StandardListViewItem`
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ The widget appearance depends on the selected style. The following styles are av
 | 
				
			||||||
 | 
					
 | 
				
			||||||
See [Selecting a Widget Style](#selecting-a-widget-style) for details how to select the style. If no style is selected, `native` is the default. If `native` is not available, `fluent` is the default.
 | 
					See [Selecting a Widget Style](#selecting-a-widget-style) for details how to select the style. If no style is selected, `native` is the default. If `native` is not available, `fluent` is the default.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
All widgets support all [properties common to builtin elements](builtin_elements.md#common-properties).
 | 
					All widgets support all [properties common to builtin elements](elements.md#common-properties).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `AboutSlint`
 | 
					## `AboutSlint`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -123,7 +123,7 @@ export component Example inherits Window {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `GridBox`
 | 
					## `GridBox`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A `GridBox` is a [`GridLayout`](builtin_elements.md#gridlayout) where the spacing and padding values
 | 
					A `GridBox` is a [`GridLayout`](elements.md#gridlayout) where the spacing and padding values
 | 
				
			||||||
depend on the style instead of defaulting to 0.
 | 
					depend on the style instead of defaulting to 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
| 
						 | 
					@ -150,7 +150,7 @@ export component Example inherits Window {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `HorizontalBox`
 | 
					## `HorizontalBox`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A `HorizontalBox` is a [`HorizontalLayout`](builtin_elements.md#verticallayout-and-horizontallayout) where the spacing and padding values
 | 
					A `HorizontalBox` is a [`HorizontalLayout`](elements.md#verticallayout-and-horizontallayout) where the spacing and padding values
 | 
				
			||||||
depend on the style instead of defaulting to 0.
 | 
					depend on the style instead of defaulting to 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `LineEdit`
 | 
					## `LineEdit`
 | 
				
			||||||
| 
						 | 
					@ -160,11 +160,11 @@ a widget able to handle several lines of text.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, nothing can be entered selecting text is still enabled as well as editing text programatically (default value: `false`)
 | 
					-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, nothing can be entered selecting text is still enabled as well as editing text programmatically (default value: `false`)
 | 
				
			||||||
-   **`font-size`** (_in_ _length_): the size of the font of the input text
 | 
					-   **`font-size`** (_in_ _length_): the size of the font of the input text
 | 
				
			||||||
-   **`has-focus`**: (_out_ _bool_): Set to true when the line edit currently has the focus
 | 
					-   **`has-focus`**: (_out_ _bool_): Set to true when the line edit currently has the focus
 | 
				
			||||||
-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](builtin_enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
					-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
				
			||||||
-   **`input-type`** (_in_ _enum [`InputType`](builtin_enums.md#inputtype)_): The way to allow special input viewing properties such as password fields (default value: `text`).
 | 
					-   **`input-type`** (_in_ _enum [`InputType`](enums.md#inputtype)_): The way to allow special input viewing properties such as password fields (default value: `text`).
 | 
				
			||||||
-   **`placeholder-text`**: (_in_ _string_): A placeholder text being shown when there is no text in the edit field
 | 
					-   **`placeholder-text`**: (_in_ _string_): A placeholder text being shown when there is no text in the edit field
 | 
				
			||||||
-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but
 | 
					-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but
 | 
				
			||||||
-   **`text`** (_in-out_ _string_): The text being edited
 | 
					-   **`text`** (_in-out_ _string_): The text being edited
 | 
				
			||||||
| 
						 | 
					@ -335,7 +335,7 @@ it can used one of the pre-defined `kind` and the text and icon will depend on t
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, the button cannot be pressed
 | 
					-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, the button cannot be pressed
 | 
				
			||||||
-   **`has-focus`**: (_out_ _bool_): Set to true when the button currently has the focus
 | 
					-   **`has-focus`**: (_out_ _bool_): Set to true when the button currently has the focus
 | 
				
			||||||
-   **`kind`** (_in_ _enum [`StandardButtonKind`](builtin_enums.md#standardbuttonkind)_): The kind of button, one of `ok` `cancel`, `apply`, `close`, `reset`, `help`, `yes`, `no,` `abort`, `retry` or `ignore`
 | 
					-   **`kind`** (_in_ _enum [`StandardButtonKind`](enums.md#standardbuttonkind)_): The kind of button, one of `ok` `cancel`, `apply`, `close`, `reset`, `help`, `yes`, `no,` `abort`, `retry` or `ignore`
 | 
				
			||||||
-   **`pressed`**: (_out_ _bool_): Set to true when the button is pressed.
 | 
					-   **`pressed`**: (_out_ _bool_): Set to true when the button is pressed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Callbacks
 | 
					### Callbacks
 | 
				
			||||||
| 
						 | 
					@ -358,14 +358,14 @@ export component Example inherits Window {
 | 
				
			||||||
## `StandardListView`
 | 
					## `StandardListView`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Like ListView, but with a default delegate, and a `model` property which is a model of type
 | 
					Like ListView, but with a default delegate, and a `model` property which is a model of type
 | 
				
			||||||
[`StandardListViewItem`](builtin_structs.md#standardlistviewitem).
 | 
					[`StandardListViewItem`](structs.md#standardlistviewitem).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Same as [`ListView`](#listview), and in addition:
 | 
					Same as [`ListView`](#listview), and in addition:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`current-item`** (_in-out_ _int_): The index of the currently active item. -1 mean none is selected, which is the default
 | 
					-   **`current-item`** (_in-out_ _int_): The index of the currently active item. -1 mean none is selected, which is the default
 | 
				
			||||||
-   **`model`** (_in_ _[`StandardListViewItem`](builtin_structs.md#standardlistviewitem)_): The model
 | 
					-   **`model`** (_in_ _[`StandardListViewItem`](structs.md#standardlistviewitem)_): The model
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Functions
 | 
					### Functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -393,15 +393,15 @@ export component Example inherits Window {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The `StandardTableView` represents a table of data with columns and rows. Cells
 | 
					The `StandardTableView` represents a table of data with columns and rows. Cells
 | 
				
			||||||
are organised in a model where each row is a model of
 | 
					are organised in a model where each row is a model of
 | 
				
			||||||
\[[`StandardListViewItem`](builtin_structs.md#standardlistviewitem)\].
 | 
					\[[`StandardListViewItem`](structs.md#standardlistviewitem)\].
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Properties
 | 
					### Properties
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Same as [`ListView`](#listview), and in addition:
 | 
					Same as [`ListView`](#listview), and in addition:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   **`current-sort-column`** (_out_ _int_): Indicates the sorted column. -1 mean no column is sorted.
 | 
					-   **`current-sort-column`** (_out_ _int_): Indicates the sorted column. -1 mean no column is sorted.
 | 
				
			||||||
-   **`columns`** (_in-out_ _\[[`TableColumn`](builtin_structs.md#tablecolumn)\]_): Defines the model of the table columns.
 | 
					-   **`columns`** (_in-out_ _\[[`TableColumn`](structs.md#tablecolumn)\]_): Defines the model of the table columns.
 | 
				
			||||||
-   **`rows`** (_\[\[[`StandardListViewItem`](builtin_structs.md#standardlistviewitem)\]\]_): Defines the model of table rows.
 | 
					-   **`rows`** (_\[\[[`StandardListViewItem`](structs.md#standardlistviewitem)\]\]_): Defines the model of table rows.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Callbacks
 | 
					### Callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -495,9 +495,9 @@ shortcut will be implemented in a future version: <https://github.com/slint-ui/s
 | 
				
			||||||
-   **`text`** (_in-out_ _string_): The text being edited
 | 
					-   **`text`** (_in-out_ _string_): The text being edited
 | 
				
			||||||
-   **`has-focus`**: (_in_out_ _bool_): Set to true when the widget currently has the focus
 | 
					-   **`has-focus`**: (_in_out_ _bool_): Set to true when the widget currently has the focus
 | 
				
			||||||
-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, nothing can be entered
 | 
					-   **`enabled`**: (_in_ _bool_): Defaults to true. When false, nothing can be entered
 | 
				
			||||||
-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but selecting text is still enabled as well as editing text programatically (default value: `false`)
 | 
					-   **`read-only`** (_in_ _bool_): When set to `true`, text editing via keyboard and mouse is disabled but selecting text is still enabled as well as editing text programmatically (default value: `false`)
 | 
				
			||||||
-   **`wrap`** (_in_ _enum [`TextWrap`](builtin_enums.md#textwrap)_): The way the text wraps (default: word-wrap).
 | 
					-   **`wrap`** (_in_ _enum [`TextWrap`](enums.md#textwrap)_): The way the text wraps (default: word-wrap).
 | 
				
			||||||
-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](builtin_enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
					-   **`horizontal-alignment`** (_in_ _enum [`TextHorizontalAlignment`](enums.md#texthorizontalalignment)_): The horizontal alignment of the text.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Callbacks
 | 
					### Callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -518,9 +518,10 @@ export component Example inherits Window {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## `VerticalBox`
 | 
					## `VerticalBox`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A `VerticalBox` is a [`VerticalLayout`](builtin_elements.md#verticallayout-and-horizontallayout) where the spacing and padding values
 | 
					A `VerticalBox` is a [`VerticalLayout`](elements.md#verticallayout-and-horizontallayout) where the spacing and padding values
 | 
				
			||||||
depend on the style instead of defaulting to 0.
 | 
					depend on the style instead of defaulting to 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Selecting a Widget Style
 | 
					## Selecting a Widget Style
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,13 +2,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The game is visually a little bare. Here are some ideas how you could make further changes to enhance it:
 | 
					The game is visually a little bare. Here are some ideas how you could make further changes to enhance it:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* The tiles could have rounded corners, to look a little less sharp. The [border-radius](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#rectangle)
 | 
					-   The tiles could have rounded corners, to look a little less sharp. The [border-radius](https://slint-ui.com/docs/slint/src/builtins/elements.html#rectangle)
 | 
				
			||||||
  property of *Rectangle* can be used to achieve that.
 | 
					    property of _Rectangle_ can be used to achieve that.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* In real world memory games, the back of the tiles often have some common graphic. You could add an image with
 | 
					-   In real world memory games, the back of the tiles often have some common graphic. You could add an image with
 | 
				
			||||||
  the help of another *[Image](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#image)*
 | 
					    the help of another _[Image](https://slint-ui.com/docs/slint/src/builtins/elements.html#image)_
 | 
				
			||||||
  element. Note that you may have to use *Rectangle*'s *[clip](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#properties-1) property*
 | 
					    element. Note that you may have to use _Rectangle_'s _clip property_
 | 
				
			||||||
  element around it to ensure that the image is clipped away when the curtain effect opens.
 | 
					    element around it to ensure that the image is clipped away when the curtain effect opens.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Let us know in the comments on Github Discussions how you polished your code, or feel free to ask questions about
 | 
					Let us know in the comments on [Github Discussions](https://github.com/slint-ui/slint/discussions)
 | 
				
			||||||
how to implement something.
 | 
					how you polished your code, or feel free to ask questions about how to implement something.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,13 +2,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The game is visually a little bare. Here are some ideas how you could make further changes to enhance it:
 | 
					The game is visually a little bare. Here are some ideas how you could make further changes to enhance it:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* The tiles could have rounded corners, to look a little less sharp. The [border-radius](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#rectangle)
 | 
					-   The tiles could have rounded corners, to look a little less sharp. The [border-radius](https://slint-ui.com/docs/slint/src/builtins/elements.html#rectangle)
 | 
				
			||||||
  property of *Rectangle* can be used to achieve that.
 | 
					    property of _Rectangle_ can be used to achieve that.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* In real world memory games, the back of the tiles often have some common graphic. You could add an image with
 | 
					-   In real world memory games, the back of the tiles often have some common graphic. You could add an image with
 | 
				
			||||||
  the help of another *[Image](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#image)*
 | 
					    the help of another _[Image](https://slint-ui.com/docs/slint/src/builtins/elements.html#image)_
 | 
				
			||||||
  element. Note that you may have to use *Rectangle*'s *[clip](https://slint-ui.com/docs/rust/slint/docs/builtin_elements/index.html#properties-1) property*
 | 
					    element. Note that you may have to use _Rectangle_'s _clip property_
 | 
				
			||||||
  element around it to ensure that the image is clipped away when the curtain effect opens.
 | 
					    element around it to ensure that the image is clipped away when the curtain effect opens.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Let us know in the comments on Github Discussions how you polished your code, or feel free to ask questions about
 | 
					Let us know in the comments on [Github Discussions](https://github.com/slint-ui/slint/discussions)
 | 
				
			||||||
how to implement something.
 | 
					how you polished your code, or feel free to ask questions about how to implement something.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,7 +38,7 @@ pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let root = super::root_dir();
 | 
					    let root = super::root_dir();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let path = root.join("docs/language/src/builtins/builtin_enums.md");
 | 
					    let path = root.join("docs/language/src/builtins/enums.md");
 | 
				
			||||||
    let mut file = std::fs::File::create(&path).context(format!("error creating {path:?}"))?;
 | 
					    let mut file = std::fs::File::create(&path).context(format!("error creating {path:?}"))?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    file.write_all(
 | 
					    file.write_all(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue