GuiPaneControl Class Reference

#include <guiPaneCtrl.h>

Inheritance diagram for GuiPaneControl:

Inheritance graph
[legend]
List of all members.

Detailed Description

Collapsable pane control.

This class wraps a single child control and displays a header with caption above it. If you click the header it will collapse or expand. The control resizes itself based on its collapsed/expanded size.

In the GUI editor, if you just want the header you can make collapsable false. The caption field lets you set the caption. It expects a bitmap (from the GuiControlProfile) that contains two images - the first is displayed when the control is expanded and the second is displayed when it is collapsed. The header is sized based off of the first image.


Public Member Functions

 GuiPaneControl ()
bool resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
void onRender (Point2I offset, const RectI &updateRect)
 Called when this control is to render itself.
bool getCollapsed ()
void setCollapsed (bool isCollapsed)
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.
virtual void setCaptionID (S32 id)
virtual void setCaptionID (const char *id)
void onMouseDown (const GuiEvent &event)
void onMouseUp (const GuiEvent &event)
void onMouseMove (const GuiEvent &event)
void onMouseLeave (const GuiEvent &event)
void onMouseEnter (const GuiEvent &event)
 DECLARE_CONOBJECT (GuiPaneControl)

Static Public Member Functions

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

Private Types

typedef GuiControl Parent

Private Attributes

Resource< GFontmFont
bool mCollapsable
bool mCollapsed
bool mBarBehindText
Point2I mOriginalExtents
StringTableEntry mCaption
StringTableEntry mCaptionID
Point2I mThumbSize
bool mMouseOver
bool mDepressed


Member Typedef Documentation

Reimplemented from GuiControl.


Constructor & Destructor Documentation

GuiPaneControl::GuiPaneControl (  ) 


Member Function Documentation

bool GuiPaneControl::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 GuiPaneControl::onRender ( Point2I  offset,
const RectI updateRect 
) [virtual]

Called when this control is to render itself.

Parameters:
offset The location this control is to begin rendering
updateRect The screen area this control has drawing access to

Reimplemented from GuiControl.

bool GuiPaneControl::getCollapsed (  )  [inline]

void GuiPaneControl::setCollapsed ( bool  isCollapsed  ) 

bool GuiPaneControl::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 GuiPaneControl::onSleep (  )  [virtual]

Called when this object is asked to sleep.

Reimplemented from GuiControl.

virtual void GuiPaneControl::setCaptionID ( S32  id  )  [virtual]

virtual void GuiPaneControl::setCaptionID ( const char *  id  )  [virtual]

void GuiPaneControl::onMouseDown ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

void GuiPaneControl::onMouseUp ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

void GuiPaneControl::onMouseMove ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

void GuiPaneControl::onMouseLeave ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

void GuiPaneControl::onMouseEnter ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

static void GuiPaneControl::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from GuiControl.

GuiPaneControl::DECLARE_CONOBJECT ( GuiPaneControl   ) 


Member Data Documentation