|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| void | doLayout (Container container) |
| Layout widgets in container. | |
| bool | getCompact () |
| Compact mode. | |
| Point | getMinimumSizeForWidth (Container container, int width) |
| Minimum size of layout using reference width and variable height. | |
| int | getTabIndex () |
| Index of the current tab. | |
| TabLayout | new () |
| Create layout. | |
| TabLayout | new (bool compact) |
| Create layout. | |
| void | removeWidget (Widget widget) |
| Remove widget from layout. | |
| void | selectFirstTab (Container container) |
| Select first tab. | |
| void | selectLastTab (Container container) |
| Select last tab. | |
| void | selectNextTab (Container container) |
| Select next tab wrapping around on the end. | |
| void | selectPreviousTab (Container container) |
| Select previous tab wrapping around on the beginning. | |
| void | selectTab (Container container, int index) |
| Select tab by index. | |
| void | setCompact (bool compact) |
| Set compact mode. | |
| Public Member Functions inherited from Dragengine.Gui.Layout | |
| Point | getMinimumSize (Container container) |
| Minimal size required for layout in container. | |
| Point | getMinimumSizeForHeight (Container container, int height) |
| Minimum size of layout using reference widget height and variable width. | |
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.
References selectPreviousTab().
Referenced by getMinimumSizeForWidth().
| void Dragengine.Gui.Layouts.TabLayout.doLayout | ( | Container | container | ) |
Layout widgets in container.
Implements Dragengine.Gui.Layout.
Referenced by getMinimumSizeForWidth(), and selectPreviousTab().
| 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.
References new(), and selectNextTab().
Referenced by getMinimumSizeForWidth().
Minimum size of layout using reference width and variable height.
Implements Dragengine.Gui.Layout.
References addWidget(), doLayout(), getCompact(), Dragengine.Gui.Layout.getMinimumSize(), Dragengine.Gui.Layout.getMinimumSizeForHeight(), getMinimumSizeForWidth(), new(), removeWidget(), and setCompact().
Referenced by getMinimumSizeForWidth().
| int Dragengine.Gui.Layouts.TabLayout.getTabIndex | ( | ) |
| TabLayout Dragengine.Gui.Layouts.TabLayout.new | ( | ) |
Create layout.
References new().
Referenced by getCompact(), getMinimumSizeForWidth(), new(), new(), removeWidget(), and selectNextTab().
| TabLayout Dragengine.Gui.Layouts.TabLayout.new | ( | bool | compact | ) |
| void Dragengine.Gui.Layouts.TabLayout.removeWidget | ( | Widget | widget | ) |
Remove widget from layout.
Implements Dragengine.Gui.Layout.
References new(), and selectTab().
Referenced by getMinimumSizeForWidth().
| void Dragengine.Gui.Layouts.TabLayout.selectFirstTab | ( | Container | container | ) |
Select first tab.
| EOutOfBounds | container has no child widgets. |
References selectFirstTab().
Referenced by selectFirstTab().
| void Dragengine.Gui.Layouts.TabLayout.selectLastTab | ( | Container | container | ) |
Select last tab.
| EOutOfBounds | container has no child widgets. |
References selectLastTab(), and selectTab().
Referenced by selectLastTab().
| void Dragengine.Gui.Layouts.TabLayout.selectNextTab | ( | Container | container | ) |
Select next tab wrapping around on the end.
| EOutOfBounds | container has no child widgets. |
References new(), and selectTab().
Referenced by getCompact().
| void Dragengine.Gui.Layouts.TabLayout.selectPreviousTab | ( | Container | container | ) |
Select previous tab wrapping around on the beginning.
| EOutOfBounds | container has no child widgets. |
References doLayout().
Referenced by addWidget().
| 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(). |
References selectTab().
Referenced by removeWidget(), selectLastTab(), selectNextTab(), selectTab(), and setCompact().
| 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.
References selectTab().
Referenced by getMinimumSizeForWidth().