Drag[en]gine Script Module DragonScript Script API  1.0
FlowLayout Class Reference

Arrange widgets flowing along X or Y axis. More...

Inheritance diagram for FlowLayout:
BoxLayout Layout

Public Member Functions

void doLayout (Container container)
 Layout widgets in container. More...
 
int getStretch ()
 Stretch mode. More...
 
FlowLayout new (int axis)
 Create layout stretching no widget with 0 gap. More...
 
FlowLayout new (int axis, int gap)
 Create layout stretching no widget. More...
 
FlowLayout new (int axis, int gap, int stretch)
 Create layout. More...
 
void setStretch (int stretch)
 Set stretch mode. More...
 
- Public Member Functions inherited from BoxLayout
void addWidget (Widget widget, Object settings)
 Add widget to layout using settings. More...
 
void doLayout (Container container)
 Layout widgets in container. More...
 
int 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 (int axis)
 Create layout with 0 gap. More...
 
BoxLayout new (int axis, int gap)
 Create layout. More...
 
void removeWidget (Widget widget)
 Remove widget from layout. More...
 
void setAxis (int axis)
 Set axis to arrange along. More...
 
void setGap (int gap)
 Set gap between child widgets. More...
 

Public Attributes

final int FIRST = 2
 Stretch first widget to fill extra space. More...
 
final int LAST = 1
 Stretch last widget to fill extra space. More...
 
final int NONE = 0
 Stretch no widgets. More...
 
- Public Attributes inherited from BoxLayout
final int X_AXIS = 0
 Arrange along X axis. More...
 
final int X_AXIS_NEG = 2
 Arrange along negative X axis. More...
 
final int Y_AXIS = 1
 Arrange along Y axis. More...
 
final int Y_AXIS_NEG = 3
 Arrange along negative Y axis. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BoxLayout
Point getMinimumSizeFor (Container container, int width, int height)
 Minimum size of layout using reference and variable size. More...
 

Detailed Description

Arrange widgets flowing along X or Y axis.

Widgets are resized to their minimum size along axis. Extra space is optionally added to the last or first widget.

Instances of this layout can be shared by multiple widgets.

Member Function Documentation

§ doLayout()

void doLayout ( Container  container)

Layout widgets in container.

Implements Layout.

§ getStretch()

int getStretch ( )

Stretch mode.

§ new() [1/3]

FlowLayout new ( int  axis)

Create layout stretching no widget with 0 gap.

Parameters
axisAxis to aling along. Has to be X_AXIS or Y_AXIS.
Exceptions
EInvalidParamaxis is not X_AXIS or Y_AXIS.

§ new() [2/3]

FlowLayout new ( int  axis,
int  gap 
)

Create layout stretching no widget.

Parameters
axisAxis to aling along. Has to be X_AXIS or Y_AXIS.
gapGap between widgets. Can be negative to overlap widgets.
Exceptions
EInvalidParamaxis is not X_AXIS or Y_AXIS.

§ new() [3/3]

FlowLayout new ( int  axis,
int  gap,
int  stretch 
)

Create layout.

Parameters
axisAxis to aling along. Has to be X_AXIS or Y_AXIS.
gapGap between widgets. Can be negative to overlap widgets.
stretchStretch mode. Has to be NONE, LAST or FIRST.
Exceptions
EInvalidParamaxis is not X_AXIS or Y_AXIS.
EInvalidParamstretch is not NONE, LAST or FIRST.

§ setStretch()

void setStretch ( int  stretch)

Set stretch mode.

Member Data Documentation

§ FIRST

final int FIRST = 2

Stretch first widget to fill extra space.

§ LAST

final int LAST = 1

Stretch last widget to fill extra space.

§ NONE

final int NONE = 0

Stretch no widgets.


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