Drag[en]gine Script Module DragonScript  1.21
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. More...
 
void doLayout (Container container)
 Layout widgets in container. More...
 
AspectRatio getAspectRatio ()
 Aspect ratio mode. 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...
 
bool getStretchIfSmaller ()
 Stretch widget if minimum size is less than the available space. More...
 
StackLayout new ()
 Create layout with AspectRatio.stretch aspect ratio mode. More...
 
StackLayout new (AspectRatio aspectRatio)
 Create layout. More...
 
StackLayout new (AspectRatio aspectRatio, bool stretchIfSmaller)
 Create layout. More...
 
void removeWidget (Widget widget)
 Remove widget from layout. More...
 
void setAspectRatio (AspectRatio aspectRatio)
 Set aspect ratio mode. More...
 
void setStretchIfSmaller (bool stretchIfSmaller)
 Set to stretch widget if minimum size is less than the available space. More...
 

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.

◆ doLayout()

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

Layout widgets in container.

Implements Dragengine.Gui.Layout.

◆ getAspectRatio()

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

Aspect ratio mode.

◆ getMinimumSize()

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

Minimal size required for layout in container.

Implements Dragengine.Gui.Layout.

◆ 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.

◆ 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.

◆ 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

◆ new() [1/3]

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

Create layout with AspectRatio.stretch aspect ratio mode.

◆ new() [2/3]

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

Create layout.

◆ new() [3/3]

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

Create layout.

Version
1.4

◆ removeWidget()

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

Remove widget from layout.

Implements Dragengine.Gui.Layout.

◆ setAspectRatio()

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

Set aspect ratio mode.

◆ 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


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