Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Layouts.StackLayout Class Reference

Arrange widgets to fill the entire container fully covering each other. More...

Inheritance diagram for Dragengine.Gui.Layouts.StackLayout:
Dragengine.Gui.Layout

Classes

enum  AspectRatio
 Aspect ratio behavior. More...

Public Member Functions

void addWidget (Widget widget, Object settings)
 Add widget to layout into area.
void doLayout (Container container)
 Layout widgets in container.
AspectRatio getAspectRatio ()
 Aspect ratio mode.
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.
Point getMinimumSizeForWidth (Container container, int width)
 Minimum size of layout using reference width and variable height.
bool getStretchIfSmaller ()
 Stretch widget if minimum size is less than the available space.
StackLayout new ()
 Create layout with AspectRatio.stretch aspect ratio mode.
StackLayout new (AspectRatio aspectRatio)
 Create layout.
StackLayout new (AspectRatio aspectRatio, bool stretchIfSmaller)
 Create layout.
void removeWidget (Widget widget)
 Remove widget from layout.
void setAspectRatio (AspectRatio aspectRatio)
 Set aspect ratio mode.
void setStretchIfSmaller (bool stretchIfSmaller)
 Set to stretch widget if minimum size is less than the available space.

Detailed Description

Arrange widgets to fill the entire container fully covering each other.

Widgets should be transparent for this layout to work best.

Instances of this layout can be shared by multiple widgets.

Member Function Documentation

◆ addWidget()

void Dragengine.Gui.Layouts.StackLayout.addWidget ( Widget widget,
Object settings )

Add widget to layout into area.

Parameters
widgetWidget to add to layout.
settingsNot used.
Exceptions
EInvalidParamwidget is null.

Implements Dragengine.Gui.Layout.

References setStretchIfSmaller().

Referenced by getMinimumSize().

◆ doLayout()

void Dragengine.Gui.Layouts.StackLayout.doLayout ( Container container)

Layout widgets in container.

Implements Dragengine.Gui.Layout.

Referenced by getMinimumSizeForHeight().

◆ getAspectRatio()

AspectRatio Dragengine.Gui.Layouts.StackLayout.getAspectRatio ( )

Aspect ratio mode.

Referenced by setAspectRatio().

◆ getMinimumSize()

Point Dragengine.Gui.Layouts.StackLayout.getMinimumSize ( Container container)

Minimal size required for layout in container.

Implements Dragengine.Gui.Layout.

References addWidget().

◆ getMinimumSizeForHeight()

Point Dragengine.Gui.Layouts.StackLayout.getMinimumSizeForHeight ( Container container,
int height )

Minimum size of layout using reference widget height and variable width.

Implements Dragengine.Gui.Layout.

References doLayout(), and new().

◆ getMinimumSizeForWidth()

Point Dragengine.Gui.Layouts.StackLayout.getMinimumSizeForWidth ( Container container,
int width )

Minimum size of layout using reference width and variable height.

Implements Dragengine.Gui.Layout.

References removeWidget().

◆ getStretchIfSmaller()

bool Dragengine.Gui.Layouts.StackLayout.getStretchIfSmaller ( )

Stretch widget if minimum size is less than the available space.

Version
1.4

Used only if aspect ratio is not AspectRatio.stretch

Referenced by setStretchIfSmaller().

◆ new() [1/3]

StackLayout Dragengine.Gui.Layouts.StackLayout.new ( )

Create layout with AspectRatio.stretch aspect ratio mode.

References new().

Referenced by getMinimumSizeForHeight(), new(), new(), and new().

◆ new() [2/3]

StackLayout Dragengine.Gui.Layouts.StackLayout.new ( AspectRatio aspectRatio)

Create layout.

References new().

◆ new() [3/3]

StackLayout Dragengine.Gui.Layouts.StackLayout.new ( AspectRatio aspectRatio,
bool stretchIfSmaller )

Create layout.

Version
1.4

References new().

◆ removeWidget()

void Dragengine.Gui.Layouts.StackLayout.removeWidget ( Widget widget)

Remove widget from layout.

Implements Dragengine.Gui.Layout.

Referenced by getMinimumSizeForWidth().

◆ setAspectRatio()

void Dragengine.Gui.Layouts.StackLayout.setAspectRatio ( AspectRatio aspectRatio)

Set aspect ratio mode.

References getAspectRatio(), and setAspectRatio().

Referenced by setAspectRatio().

◆ setStretchIfSmaller()

void Dragengine.Gui.Layouts.StackLayout.setStretchIfSmaller ( bool stretchIfSmaller)

Set to stretch widget if minimum size is less than the available space.

Version
1.4

Used only if aspect ratio is not AspectRatio.stretch

References getStretchIfSmaller().

Referenced by addWidget().


The documentation for this class was generated from the following file: