![]() |
Lysa.ui
0.0
Lysa 3D Engine
|
A container folding and unfolding its content with a clickable title bar. Fires OnExpandItem with the content widget when the state changes.
Inherits from: Widget
Lua full name: lysa.ui.FoldableContainer
Public Member Functions | |
| Widget | add_content (child: Widget) |
| Adds a widget to the content and updates the height of the container. More... | |
| Widget | add_content (child: Widget, alignment: Alignment) |
| Adds a widget to the content with the given alignment. More... | |
| Widget | add_content (child: Widget, alignment: Alignment, resource: string) |
| Adds a widget to the content, loading its style from a resource string. More... | |
| nil | remove_content (child: Widget) |
| Removes a widget from the content and updates the height of the container. More... | |
| nil | remove_all_content () |
| Removes all the widgets of the content and updates the height of the container. More... | |
| nil | toggle () |
| Folds the content if it is displayed, unfolds it otherwise. More... | |
| nil | update_size () |
| Recomputes the height of the title bar and of the container. More... | |
| nil | set_resources (res_title_bar: string, res_arrow: string) |
| Reloads the visual style: res_title_bar = clickable title bar, res_arrow = folded state arrow. More... | |
Properties | |
| string | title |
| The text of the title bar. | |
| boolean | folded |
| True when the content is hidden. | |
| Button | title_bar |
| The clickable title bar. (read-only) | |
| Text | title_widget |
| The text widget displaying the title. (read-only) | |
| Arrow | arrow |
| The arrow displaying the folded state. (read-only) | |
| Widget | content |
| The widget holding the content. (read-only) | |
| number | title_bar_height |
| The height of the title bar, zero to adjust it to the title. | |
| number | content_height |
| The height of the content when unfolded, zero to adjust it to the widgets it holds. | |
| number | auto_title_bar_height |
| The height needed to display the title. (read-only) | |
| number | auto_content_height |
| The height needed to display all the widgets of the content. (read-only) | |
|
Removes a widget from the content and updates the height of the container.
| child | Widget |
|
Removes all the widgets of the content and updates the height of the container.
|
Folds the content if it is displayed, unfolds it otherwise.
|
Recomputes the height of the title bar and of the container.
|
Reloads the visual style: res_title_bar = clickable title bar, res_arrow = folded state arrow.
| res_title_bar | string |
| res_arrow | string |
| string title |
The text of the title bar.
| boolean folded |
True when the content is hidden.
| Button title_bar |
The clickable title bar. (read-only)
| Text title_widget |
The text widget displaying the title. (read-only)
| Arrow arrow |
The arrow displaying the folded state. (read-only)
| Widget content |
The widget holding the content. (read-only)
| number title_bar_height |
The height of the title bar, zero to adjust it to the title.
| number content_height |
The height of the content when unfolded, zero to adjust it to the widgets it holds.
| number auto_title_bar_height |
The height needed to display the title. (read-only)
| number auto_content_height |
The height needed to display all the widgets of the content. (read-only)