Drag[en]gine Script Module DragonScript
1.23
|
Arrange widgets in box formation along X or Y axis enlarging them evenly. 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... | |
LayoutAxis | getAxis () |
Axis to arrange widgets along. More... | |
int | getGap () |
Gap between child widgets. More... | |
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... | |
Point | getMinimumSizeForWidth (Container container, int width) |
Minimum size of layout using reference width and variable height. More... | |
BoxLayout | new (LayoutAxis axis) |
Create layout with 0 gap. More... | |
BoxLayout | new (LayoutAxis axis, int gap) |
Create layout. More... | |
void | removeWidget (Widget widget) |
Remove widget from layout. More... | |
void | setAxis (LayoutAxis axis) |
Set axis to arrange along. More... | |
void | setGap (int gap) |
Set gap between child widgets. More... | |
Protected Member Functions | |
Point | getMinimumSizeFor (Container container, int width, int height) |
Minimum size of layout using reference and variable size. More... | |
Arrange widgets in box formation along X or Y axis enlarging them evenly.
Instances of this layout can be shared by multiple widgets.
void Dragengine.Gui.Layouts.BoxLayout.addWidget | ( | Widget | widget, |
Object | settings | ||
) |
Add widget to layout using settings.
widget | Widget to add to layout. |
settings | Not used. |
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.BoxLayout.doLayout | ( | Container | container | ) |
Layout widgets in container.
Implements Dragengine.Gui.Layout.
Reimplemented in Dragengine.Gui.Layouts.FlowLayout, and Dragengine.Gui.Layouts.CentrizedBoxLayout.
LayoutAxis Dragengine.Gui.Layouts.BoxLayout.getAxis | ( | ) |
Axis to arrange widgets along.
int Dragengine.Gui.Layouts.BoxLayout.getGap | ( | ) |
Gap between child widgets.
Minimal size required for layout in container.
Implements Dragengine.Gui.Layout.
|
protected |
Minimum size of layout using reference and variable size.
If LayoutAxis.x is used height is the reference size. If LayoutAxis.y is used width is the reference size.
Minimum size of layout using reference widget height and variable width.
Implements Dragengine.Gui.Layout.
Minimum size of layout using reference width and variable height.
Implements Dragengine.Gui.Layout.
BoxLayout Dragengine.Gui.Layouts.BoxLayout.new | ( | LayoutAxis | axis | ) |
Create layout with 0 gap.
Reimplemented in Dragengine.Gui.Layouts.FlowLayout, and Dragengine.Gui.Layouts.CentrizedBoxLayout.
BoxLayout Dragengine.Gui.Layouts.BoxLayout.new | ( | LayoutAxis | axis, |
int | gap | ||
) |
Create layout.
gap | Size of gap between child widgets. Can be negative to overlap widgets. |
EInvalidParam | axis is not LayoutAxis.x, LayoutAxis.y, LayoutAxis.inverseX or LayoutAxis.inverseY. |
Reimplemented in Dragengine.Gui.Layouts.FlowLayout, and Dragengine.Gui.Layouts.CentrizedBoxLayout.
void Dragengine.Gui.Layouts.BoxLayout.removeWidget | ( | Widget | widget | ) |
Remove widget from layout.
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.BoxLayout.setAxis | ( | LayoutAxis | axis | ) |
Set axis to arrange along.
void Dragengine.Gui.Layouts.BoxLayout.setGap | ( | int | gap | ) |
Set gap between child widgets.
Can be negative to overlap widgets.