GuiContainer Class Reference [Containers]

#include <guiContainer.h>

Inheritance diagram for GuiContainer:

Inheritance graph
[legend]
List of all members.

Container Sizing

S32 getValidDockingMask ()
 Returns the Mask of valid docking modes supported by this container.
S32 getDocking ()
 Docking Accessors.
virtual void setDocking (S32 docking)
bool getAnchorTop () const
bool getAnchorBottom () const
bool getAnchorLeft () const
bool getAnchorRight () const
void setAnchorTop (bool val)
void setAnchorBottom (bool val)
void setAnchorLeft (bool val)
void setAnchorRight (bool val)
ControlSizing getSizingOptions () const
void setSizingOptions (ControlSizing val)
static bool setDockingField (void *obj, const char *data)
 Docking Protected Field Setter.

Public Types

 updateSelf = BIT(1)
 updateParent = BIT(2)
 updateNone = 0
enum  {
  updateSelf = BIT(1),
  updateParent = BIT(2),
  updateNone = 0
}

Public Member Functions

 DECLARE_CONOBJECT (GuiContainer)
 GuiContainer ()
virtual ~GuiContainer ()
Sizing Constraints
virtual const RectI getClientRect ()
Control Layout Methods
virtual bool layoutControls (RectI &clientRect)
 Called when the Layout for a Container needs to be updated because of a resize call or a call to setUpdateLayout.
void setUpdateLayout (S32 updateType=updateSelf)
 Set the layout flag to Dirty on a Container, triggering an update to it's layout on the next onPreRender call.
Container Sizing Methods
virtual bool dockControl (GuiContainer *control, S32 dockingMode, RectI &clientRect)
 Dock a Control with the given docking mode inside the given client rect.
virtual bool anchorControl (GuiControl *control, const Point2I &deltaParentExtent)
GuiControl Inherited
virtual void onChildAdded (GuiControl *control)
 Called when this object has a new child.
virtual void onChildRemoved (GuiControl *control)
 Called when one of this objects children is removed.
virtual bool resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
virtual void parentResized (const RectI &oldParentRect, const RectI &newParentRect)
 Called when this objects parent is resized.
virtual void childResized (GuiControl *child)
 Called when a child control of the object is resized.
virtual void addObject (SimObject *obj)
 Adds an object as a child of this object.
virtual void removeObject (SimObject *obj)
 Removes a child object from this control.
virtual bool reOrder (SimObject *obj, SimObject *target)
virtual void onPreRender ()
 Do special pre-render processing.

Static Public Member Functions

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

Protected Attributes

ControlSizing mSizingOptions
 Control Sizing Options.
S32 mValidDockingMask

Private Types

typedef GuiControl Parent

Private Attributes

S32 mUpdateLayout
 Layout Update Mask.

Member Typedef Documentation


Member Enumeration Documentation

anonymous enum

Enumerator:
updateSelf 
updateParent 
updateNone 


Constructor & Destructor Documentation

GuiContainer::GuiContainer (  ) 

virtual GuiContainer::~GuiContainer (  )  [virtual]


Member Function Documentation

GuiContainer::DECLARE_CONOBJECT ( GuiContainer   ) 

S32 GuiContainer::getValidDockingMask (  )  [inline]

Returns the Mask of valid docking modes supported by this container.

S32 GuiContainer::getDocking (  )  [inline]

Docking Accessors.

virtual void GuiContainer::setDocking ( S32  docking  )  [virtual]

static bool GuiContainer::setDockingField ( void obj,
const char *  data 
) [inline, static]

Docking Protected Field Setter.

bool GuiContainer::getAnchorTop (  )  const [inline]

bool GuiContainer::getAnchorBottom (  )  const [inline]

bool GuiContainer::getAnchorLeft (  )  const [inline]

bool GuiContainer::getAnchorRight (  )  const [inline]

void GuiContainer::setAnchorTop ( bool  val  )  [inline]

void GuiContainer::setAnchorBottom ( bool  val  )  [inline]

void GuiContainer::setAnchorLeft ( bool  val  )  [inline]

void GuiContainer::setAnchorRight ( bool  val  )  [inline]

ControlSizing GuiContainer::getSizingOptions (  )  const [inline]

void GuiContainer::setSizingOptions ( ControlSizing  val  )  [inline]

virtual const RectI GuiContainer::getClientRect (  )  [virtual]

Reimplemented in GuiTabBookCtrl, and GuiWindowCtrl.

virtual bool GuiContainer::layoutControls ( RectI clientRect  )  [virtual]

Called when the Layout for a Container needs to be updated because of a resize call or a call to setUpdateLayout.

Parameters:
clientRect The Client Rectangle that is available for this Container to layout it's children in

Reimplemented in GuiSplitContainer.

void GuiContainer::setUpdateLayout ( S32  updateType = updateSelf  )  [inline]

Set the layout flag to Dirty on a Container, triggering an update to it's layout on the next onPreRender call.

Attention:
This can be called without regard to whether the flag is already set, as setting it does not actually cause an update, but rather tells the container it should update the next chance it gets
Parameters:
updateType A Mask that indicates how the layout should be updated.

virtual bool GuiContainer::dockControl ( GuiContainer control,
S32  dockingMode,
RectI clientRect 
) [virtual]

Dock a Control with the given docking mode inside the given client rect.

Attention:
The clientRect passed in will be modified by the docking of the control. It will return the rect that remains after the docking operation.

virtual bool GuiContainer::anchorControl ( GuiControl control,
const Point2I deltaParentExtent 
) [virtual]

virtual void GuiContainer::onChildAdded ( GuiControl control  )  [virtual]

Called when this object has a new child.

Reimplemented from GuiControl.

Reimplemented in GuiTabBookCtrl.

virtual void GuiContainer::onChildRemoved ( GuiControl control  )  [virtual]

Called when one of this objects children is removed.

Reimplemented from GuiControl.

Reimplemented in GuiTabBookCtrl.

virtual bool GuiContainer::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.

Reimplemented in GuiFormCtrl, GuiFrameSetCtrl, GuiSplitContainer, GuiTabBookCtrl, and GuiWindowCtrl.

virtual void GuiContainer::parentResized ( const RectI oldParentRect,
const RectI newParentRect 
) [virtual]

Called when this objects parent is resized.

Parameters:
oldParentRect The old rectangle of the parent object
newParentRect The new rectangle of the parent object

Reimplemented from GuiControl.

Reimplemented in GuiSplitContainer, and GuiTextEditCtrl.

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

Called when a child control of the object is resized.

Parameters:
child Child object

Reimplemented from GuiControl.

Reimplemented in GuiTabBookCtrl.

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

Adds an object as a child of this object.

Parameters:
obj New child object of this control

Reimplemented from GuiControl.

Reimplemented in GuiFormCtrl, and GuiFrameSetCtrl.

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

Removes a child object from this control.

Parameters:
obj Object to remove from this control

Reimplemented from GuiControl.

Reimplemented in GuiFrameSetCtrl.

virtual bool GuiContainer::reOrder ( SimObject obj,
SimObject target 
) [virtual]

Reimplemented from SimSet.

virtual void GuiContainer::onPreRender (  )  [virtual]

Do special pre-render processing.

Reimplemented from GuiControl.

Reimplemented in GuiTSCtrl, GuiTextCtrl, GuiTextEditCtrl, GuiTextEditSliderCtrl, and GuiProgressCtrl.


Member Data Documentation

Layout Update Mask.

Control Sizing Options.