Drag[en]gine Script Module DragonScript
1.23
|
Arrange widgets to fill entire container while showing only one of them. More...
Public Member Functions | |
void | addWidget (Widget widget, Object settings) |
Add widget to layout using settings. More... | |
void | doLayout (Container container) |
Layout widgets in container. More... | |
bool | getCompact () |
Compact mode. More... | |
Point | getMinimumSizeForWidth (Container container, int width) |
Minimum size of layout using reference width and variable height. More... | |
int | getTabIndex () |
Index of the current tab. More... | |
TabLayout | new () |
Create layout. More... | |
TabLayout | new (bool compact) |
Create layout. More... | |
void | removeWidget (Widget widget) |
Remove widget from layout. More... | |
void | selectFirstTab (Container container) |
Select first tab. More... | |
void | selectLastTab (Container container) |
Select last tab. More... | |
void | selectNextTab (Container container) |
Select next tab wrapping around on the end. More... | |
void | selectPreviousTab (Container container) |
Select previous tab wrapping around on the beginning. More... | |
void | selectTab (Container container, int index) |
Select tab by index. More... | |
void | setCompact (bool compact) |
Set compact mode. More... | |
Public Member Functions inherited from Dragengine.Gui.Layout | |
Point | getMinimumSize (Container container) |
Minimal size required for layout in container. More... | |
Point | getMinimumSizeForHeight (Container container, int height) |
Minimum size of layout using reference widget height and variable width. More... | |
Arrange widgets to fill entire container while showing only one of them.
Provides functions to switch between the child widgets easily.
Instances of this layout can not be shared by multiple widgets.
By default the minimum size of the layout lines up with the largest minimum size of all widgets. This ensures the container does not change size when the selected child widget changes. Since version 1.17 this behavior can be changed to matche the minimum size of the selected widget instead. This allows to make compact SwitchPanel layouts.
void Dragengine.Gui.Layouts.TabLayout.addWidget | ( | Widget | widget, |
Object | settings | ||
) |
Add widget to layout using settings.
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.TabLayout.doLayout | ( | Container | container | ) |
Layout widgets in container.
Implements Dragengine.Gui.Layout.
bool Dragengine.Gui.Layouts.TabLayout.getCompact | ( | ) |
Compact mode.
If compact mode is used the minimum size of the layout matches the minimum size of the selected child widget instead of the largest minimum size of all child widgets.
Minimum size of layout using reference width and variable height.
Implements Dragengine.Gui.Layout.
int Dragengine.Gui.Layouts.TabLayout.getTabIndex | ( | ) |
Index of the current tab.
TabLayout Dragengine.Gui.Layouts.TabLayout.new | ( | ) |
Create layout.
TabLayout Dragengine.Gui.Layouts.TabLayout.new | ( | bool | compact | ) |
Create layout.
void Dragengine.Gui.Layouts.TabLayout.removeWidget | ( | Widget | widget | ) |
Remove widget from layout.
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.TabLayout.selectFirstTab | ( | Container | container | ) |
Select first tab.
EOutOfBounds | container has no child widgets. |
void Dragengine.Gui.Layouts.TabLayout.selectLastTab | ( | Container | container | ) |
Select last tab.
EOutOfBounds | container has no child widgets. |
void Dragengine.Gui.Layouts.TabLayout.selectNextTab | ( | Container | container | ) |
Select next tab wrapping around on the end.
EOutOfBounds | container has no child widgets. |
void Dragengine.Gui.Layouts.TabLayout.selectPreviousTab | ( | Container | container | ) |
Select previous tab wrapping around on the beginning.
EOutOfBounds | container has no child widgets. |
void Dragengine.Gui.Layouts.TabLayout.selectTab | ( | Container | container, |
int | index | ||
) |
Select tab by index.
EOutOfBounds | container has no child widgets. |
EOutOfBounds | index is less than 0 |
EOutOfBounds | index is larger than or equal to Container.getWidgetCount(). |
void Dragengine.Gui.Layouts.TabLayout.setCompact | ( | bool | compact | ) |
Set compact mode.
If compact mode is used the minimum size of the layout matches the minimum size of the selected child widget instead of the largest minimum size of all child widgets.
Call Container.doLayout() after changing compact mode.