A container displaying one widget at a time, selected with a TabBar. Fires OnSelectItem with the displayed widget when a tab is selected.
Inherits from: Panel
Lua full name: lysa.ui.TabContainer
|
| Widget | add_tab (label: string, content: Widget) |
| | Adds a widget displayed by a new tab and returns it. More...
|
| |
| Widget | add_tab (label: string, content: Widget, resource: string) |
| | Adds a widget displayed by a new tab, loading the style of the tab text from a resource string. More...
|
| |
| Widget | add_tab (label: string, content: Widget, resource: string, leading: Widget) |
| | Adds a widget displayed by a new tab showing the given widget (icon, mark, ...) at the left of the text. More...
|
| |
| nil | remove_tab (index: integer) |
| | Removes a tab and the widget it displays. More...
|
| |
| nil | remove_all_tabs () |
| | Removes all the tabs and the widgets they display. More...
|
| |
| Text|nil | get_tab (index: integer) |
| | Returns the text widget of a tab, or nil for an invalid index. More...
|
| |
| Widget|nil | get_content (index: integer) |
| | Returns the widget displayed by a tab, or nil for an invalid index. More...
|
| |
| integer | get_index_of (content: Widget) |
| | Returns the index of the tab displaying the given widget, or NO_TAB. More...
|
| |
| nil | select (index: integer) |
| | Selects a tab and displays the widget it displays. More...
|
| |
| nil | set_resources (res_tab_bar: string) |
| | Reloads the visual style: res_tab_bar = bar of tabs. More...
|
| |
|
| integer | NO_TAB |
| | Sentinel value used when no tab is selected or found.
|
| |
| integer | count |
| | The number of tabs. (read-only)
|
| |
| integer | selected |
| | The index of the selected tab, or NO_TAB. (read-only)
|
| |
| Widget|nil | selected_content |
| | The widget displayed by the selected tab, or nil. (read-only)
|
| |
| TabBar | tab_bar |
| | The bar displaying the tabs. (read-only)
|
| |
| Widget | content_area |
| | The widget holding the widgets displayed by the tabs. (read-only)
|
| |
| number | tab_bar_height |
| | The height of the bar of tabs, zero to adjust it to the content of the tabs.
|
| |
| integer | placement |
| | The position of the bar of tabs relatively to the displayed widgets (see lysa.ui.TabPlacement).
|
| |