torque Torque Game Engine Documentation
TGE Version 1.5.2

GuiStackControl Class Reference

#include <guiStackCtrl.h>

Inheritance diagram for GuiStackControl:

Inheritance graph
[legend]

Detailed Description

A stack of GUI controls.

This maintains a horizontal or vertical stack of GUI controls. If one is 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, order of addition).

Todo:
Make this support horizontal right to left stacks.


Public Types

enum  stackingOptions {
  horizStackLeft = 0,
  horizStackRight,
  vertStackTop,
  vertStackBottom,
  stackingTypeVert,
  stackingTypeHoriz,
  stackingTypeDyn
}

Public Member Functions

 GuiStackControl ()
void resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
void childResized (GuiControl *child)
 Called when a child control of the object is resized.
bool onWake ()
 Called when this object is asked to wake up returns true if it's actually awake at the end.
void onSleep ()
 Called when this object is asked to sleep.
void updatePanes ()
void stackFromLeft ()
void stackFromRight ()
void stackFromTop ()
void stackFromBottom ()
S32 getCount ()
void addObject (SimObject *obj)
 Returns the number of children in the stack.
void removeObject (SimObject *obj)
 Removes a child object from this control.
bool reOrder (SimObject *obj, SimObject *target=0)
 DECLARE_CONOBJECT (GuiStackControl)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Protected Types

typedef GuiControl Parent

Protected Attributes

bool mResizing
S32 mPadding
S32 mStackHorizSizing
 Set from horizSizingOptions.
S32 mStackVertSizing
 Set from vertSizingOptions.
S32 mStackingType


Member Typedef Documentation

typedef GuiControl GuiStackControl::Parent [protected]

Reimplemented from GuiControl.

Reimplemented in GuiInspector.


Member Enumeration Documentation

Enumerator:
horizStackLeft  Stack from left to right when horizontal.
horizStackRight  Stack from right to left when horizontal.
vertStackTop  Stack from top to bottom when vertical.
vertStackBottom  Stack from bottom to top when vertical.
stackingTypeVert  Always stack vertically.
stackingTypeHoriz  Always stack horizontally.
stackingTypeDyn  Dynamically switch based on width/height.


Constructor & Destructor Documentation

GuiStackControl::GuiStackControl (  ) 


Member Function Documentation

void GuiStackControl::resize ( const Point2I newPosition,
const Point2I newExtent 
) [virtual]

Changes the size and/or position of this control.

Parameters:
newPosition New position of this control
newExtent New size of this control

Reimplemented from GuiControl.

void GuiStackControl::childResized ( GuiControl child  )  [virtual]

Called when a child control of the object is resized.

Parameters:
child Child object

Reimplemented from GuiControl.

bool GuiStackControl::onWake (  )  [virtual]

Called when this object is asked to wake up returns true if it's actually awake at the end.

Reimplemented from GuiControl.

void GuiStackControl::onSleep (  )  [virtual]

Called when this object is asked to sleep.

Reimplemented from GuiControl.

void GuiStackControl::updatePanes (  ) 

void GuiStackControl::stackFromLeft (  ) 

void GuiStackControl::stackFromRight (  ) 

void GuiStackControl::stackFromTop (  ) 

void GuiStackControl::stackFromBottom (  ) 

S32 GuiStackControl::getCount (  )  [inline]

void GuiStackControl::addObject ( SimObject obj  )  [virtual]

Returns the number of children in the stack.

Reimplemented from GuiControl.

void GuiStackControl::removeObject ( SimObject obj  )  [virtual]

Removes a child object from this control.

Parameters:
obj Object to remove from this control

Reimplemented from GuiControl.

bool GuiStackControl::reOrder ( SimObject obj,
SimObject target = 0 
) [virtual]

Reimplemented from SimSet.

static void GuiStackControl::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from GuiControl.

GuiStackControl::DECLARE_CONOBJECT ( GuiStackControl   ) 


Field Documentation

bool GuiStackControl::mResizing [protected]

Set from horizSizingOptions.

Set from vertSizingOptions.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen