Main   Class List   Namespace List   Wiki

GuiStackControl Class Reference
[Container Controls]

A container that stacks its children horizontally or vertically. More...

Inheritance diagram for GuiStackControl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void freeze (bool freeze)
 Prevents control from restacking - useful when adding or removing child controls.
bool isFrozen ()
 Return whether or not this control is frozen.
void updateStack ()
 Restack the child controls.

Public Attributes

Stacking

bool changeChildPosition
 Determines whether to reposition child controls.
bool changeChildSizeToFit
 Determines whether to resize child controls.
bool dynamicNonStackExtent
 Determines whether to resize the stack control along the non-stack axis (change height for horizontal stacking, change width for vertical stacking). No effect if dynamicSize is false.
bool dynamicPos
 Determines whether to reposition the stack along the stack axis when it is auto-resized. No effect if dynamicSize is false.
bool dynamicSize
 Determines whether to resize the stack control along the stack axis (change width for horizontal stacking, change height for vertical stacking).
GuiHorizontalStackingType horizStacking
 Controls the type of horizontal stacking to use (Left to Right or Right to Left).
int padding
 Distance (in pixels) between stacked child controls.
GuiStackingType stackingType
 Determines the method used to position the child controls.
GuiVerticalStackingType vertStacking
 Controls the type of vertical stacking to use (Top to Bottom or Bottom to Top).

Detailed Description

A container that stacks its children horizontally or vertically.

This container maintains a horizontal or vertical stack of GUI controls. If one is added, deleted, or resized, then the stack is resized to fit. The order of the stack is determined by the internal order of the children (ie. the order of addition).

Example:
new GuiStackControl()
{
   stackingType = "Dynamic";
   horizStacking = "Left to Right";
   vertStacking = "Top to Bottom";
   padding = "4";
   dynamicSize = "1";
   dynamicNonStackExtent = "0";
   dynamicPos = "0";
   changeChildSizeToFit = "1";
   changeChildPosition = "1";
   //Properties not specific to this control have been omitted from this example.
};

Member Function Documentation

void GuiStackControl::freeze ( bool  freeze  ) 

Prevents control from restacking - useful when adding or removing child controls.

Parameters:
freeze True to freeze the control, false to unfreeze it
Example:
%stackCtrl.freeze(true);
// add controls to stack
%stackCtrl.freeze(false);
bool GuiStackControl::isFrozen (  ) 

Return whether or not this control is frozen.

void GuiStackControl::updateStack (  ) 

Restack the child controls.


Member Data Documentation

Determines whether to reposition child controls.

If true, horizontally stacked children are aligned along the top edge of the stack control. Vertically stacked children are aligned along the left edge of the stack control. If false, horizontally stacked children retain their Y position, and vertically stacked children retain their X position.

Determines whether to resize child controls.

If true, horizontally stacked children keep their width, but have their height set to the stack control height. Vertically stacked children keep their height, but have their width set to the stack control width. If false, child controls are not resized.

Determines whether to resize the stack control along the non-stack axis (change height for horizontal stacking, change width for vertical stacking). No effect if dynamicSize is false.

If true, the stack will be resized to the maximum of the child control widths/heights. If false, the stack will not be resized.

Determines whether to reposition the stack along the stack axis when it is auto-resized. No effect if dynamicSize is false.

If true, the stack will grow left for horizontal stacking, and grow up for vertical stacking. If false, the stack will grow right for horizontal stacking, and grow down for vertical stacking.

Determines whether to resize the stack control along the stack axis (change width for horizontal stacking, change height for vertical stacking).

If true, the stack width/height will be resized to the sum of the child control widths/heights. If false, the stack will not be resized.

Controls the type of horizontal stacking to use (Left to Right or Right to Left).

Distance (in pixels) between stacked child controls.

Determines the method used to position the child controls.

Controls the type of vertical stacking to use (Top to Bottom or Bottom to Top).



Copyright © GarageGames, LLC. All Rights Reserved.