A horizontal bar of tabs. Draws and selects the tabs, without managing the widgets they display. Fires OnSelectItem when a tab is selected.
Inherits from: Widget
Lua full name: lysa.ui.TabBar
|
| integer | add_tab (label: string) |
| | Adds a tab at the right of the last tab and returns its 0-based index. More...
|
| |
| integer | add_tab (label: string, resource: string) |
| | Adds a tab, loading the style of its text from a resource string. More...
|
| |
| integer | add_tab (label: string, resource: string, leading: Widget) |
| | Adds a tab displaying the given widget (icon, mark, ...) at the left of the text. More...
|
| |
| nil | remove_tab (index: integer) |
| | Removes the tab at the given 0-based index; removing the selected tab selects another one. More...
|
| |
| nil | remove_all_tabs () |
| | Removes all the tabs. More...
|
| |
| Text|nil | get_tab (index: integer) |
| | Returns the text widget of a tab, or nil for an invalid index. More...
|
| |
| integer | get_tab_at (x: number, y: number) |
| | Returns the index of the tab at the given position, or NO_TAB. More...
|
| |
| nil | select (index: integer) |
| | Selects a tab, NO_TAB removes the selection. Emits OnSelectItem if the selection changed. More...
|
| |
|
| integer | NO_TAB |
| | Sentinel value used when no tab is selected, pointed or found.
|
| |
| integer | count |
| | The number of tabs. (read-only)
|
| |
| integer | selected |
| | The index of the selected tab, or NO_TAB. (read-only)
|
| |
| integer | pointed |
| | The index of the tab below the mouse cursor, or NO_TAB. (read-only)
|
| |
| integer | placement |
| | The position of the bar relatively to the content displayed by the tabs (see lysa.ui.TabPlacement).
|
| |
| number | tab_padding |
| | The space between the borders of a tab and its content, applied to the next added tabs.
|
| |
| number | content_height |
| | The height needed to display the highest tab. (read-only)
|
| |
| number | content_width |
| | The width needed to display all the tabs. (read-only)
|
| |