GuiWindowCtrl Class Reference [Containers]

#include <guiWindowCtrl.h>

Inheritance diagram for GuiWindowCtrl:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GuiWindowCtrl ()
 DECLARE_CONOBJECT (GuiWindowCtrl)
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.
bool isMinimized (S32 &index)
virtual void getCursor (GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent)
 Get information about the cursor.
void setFont (S32 fntTag)
GuiControlfindHitControl (const Point2I &pt, S32 initialLayer=-1)
 Returns the control which the provided point is under, with layering.
S32 findHitEdges (const Point2I &globalPoint)
void getSnappableRects (Vector< EdgeRectI > &outVector)
bool resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
void onMouseDown (const GuiEvent &event)
void onMouseDragged (const GuiEvent &event)
void onMouseUp (const GuiEvent &event)
GuiControlfindNextTabable (GuiControl *curResponder, bool firstCall=true)
 Find next tab-accessible control with regards to the provided control.
GuiControlfindPrevTabable (GuiControl *curResponder, bool firstCall=true)
 Find previous tab-accessible control with respect to the provided one.
bool onKeyDown (const GuiEvent &event)
 Happens when a key is depressed.
S32 getTabIndex (void)
void selectWindow (void)
void onRender (Point2I offset, const RectI &updateRect)
 Called when this control is to render itself.
const RectI getClientRect ()

Static Public Member Functions

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

Protected Types

 BmpClose
 BmpMaximize
 BmpNormal
 BmpMinimize
 BmpCount
 BorderTopLeftKey = 12
 BorderTopRightKey
 BorderTopKey
 BorderTopLeftNoKey
 BorderTopRightNoKey
 BorderTopNoKey
 BorderLeft
 BorderRight
 BorderBottomLeft
 BorderBottom
 BorderBottomRight
 NumBitmaps
 BmpDefault = 0
 BmpHilite
 BmpDisabled
 BmpStates
 edgeNone = 0
 No Edge.
 edgeTop = BIT(1)
 Top Edge.
 edgeLeft = BIT(2)
 Left Edge.
 edgeRight = BIT(3)
 Right Edge.
 edgeBottom = BIT(4)
 Bottom Edge.
enum  BitmapIndices {
  BmpClose,
  BmpMaximize,
  BmpNormal,
  BmpMinimize,
  BmpCount
}
enum  {
  BorderTopLeftKey = 12,
  BorderTopRightKey,
  BorderTopKey,
  BorderTopLeftNoKey,
  BorderTopRightNoKey,
  BorderTopNoKey,
  BorderLeft,
  BorderRight,
  BorderBottomLeft,
  BorderBottom,
  BorderBottomRight,
  NumBitmaps
}
enum  BitmapStates {
  BmpDefault = 0,
  BmpHilite,
  BmpDisabled,
  BmpStates
}
enum  Edges {
  edgeNone = 0,
  edgeTop = BIT(1),
  edgeLeft = BIT(2),
  edgeRight = BIT(3),
  edgeBottom = BIT(4)
}
 Window Edge Bit Masks. More...

Protected Member Functions

void drawWinRect (const RectI &myRect)

Protected Attributes

RectImBitmapBounds
GFXTexHandle mTextureObject

Private Types

typedef GuiContainer Parent

Private Member Functions

void PositionButtons (void)

Private Attributes

bool mResizeWidth
bool mResizeHeight
bool mCanMove
bool mCanClose
bool mCanMinimize
bool mCanMaximize
bool mCanDock
 Show a docking button on the title bar?
bool mEdgeSnap
 Should this window snap to other windows edges?
bool mPressClose
bool mPressMinimize
bool mPressMaximize
Point2I mMinSize
StringTableEntry mCloseCommand
StringTableEntry mText
S32 mResizeEdge
 Resizing Edges Mask (See Edges Enumeration).
S32 mTitleHeight
F32 mResizeMargin
bool mMouseMovingWin
bool mMouseResizeWidth
bool mMouseResizeHeight
bool mMinimized
bool mMaximized
Point2I mMouseDownPosition
RectI mOrigBounds
RectI mStandardBounds
RectI mCloseButton
RectI mMinimizeButton
RectI mMaximizeButton
S32 mMinimizeIndex
S32 mTabIndex

Member Typedef Documentation

Reimplemented from GuiContainer.


Member Enumeration Documentation

enum GuiWindowCtrl::BitmapIndices [protected]

Enumerator:
BmpClose 
BmpMaximize 
BmpNormal 
BmpMinimize 
BmpCount 

anonymous enum [protected]

Enumerator:
BorderTopLeftKey 
BorderTopRightKey 
BorderTopKey 
BorderTopLeftNoKey 
BorderTopRightNoKey 
BorderTopNoKey 
BorderLeft 
BorderRight 
BorderBottomLeft 
BorderBottom 
BorderBottomRight 
NumBitmaps 

enum GuiWindowCtrl::BitmapStates [protected]

Enumerator:
BmpDefault 
BmpHilite 
BmpDisabled 
BmpStates 

enum GuiWindowCtrl::Edges [protected]

Window Edge Bit Masks.

Edges can be combined to create a mask of multiple edges. This is used for hit detection throughout this class.

Enumerator:
edgeNone  No Edge.
edgeTop  Top Edge.
edgeLeft  Left Edge.
edgeRight  Right Edge.
edgeBottom  Bottom Edge.


Constructor & Destructor Documentation

GuiWindowCtrl::GuiWindowCtrl (  ) 


Member Function Documentation

void GuiWindowCtrl::PositionButtons ( void   )  [private]

void GuiWindowCtrl::drawWinRect ( const RectI myRect  )  [protected]

GuiWindowCtrl::DECLARE_CONOBJECT ( GuiWindowCtrl   ) 

static void GuiWindowCtrl::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from GuiContainer.

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

Called when this object is asked to sleep.

Reimplemented from GuiControl.

bool GuiWindowCtrl::isMinimized ( S32 index  ) 

virtual void GuiWindowCtrl::getCursor ( GuiCursor *&  cursor,
bool showCursor,
const GuiEvent lastGuiEvent 
) [virtual]

Get information about the cursor.

Parameters:
cursor Cursor information will be stored here
showCursor Will be set to true if the cursor is visible
lastGuiEvent GuiEvent containing cursor position and modifier keys (ie ctrl, shift, alt etc)

Reimplemented from GuiControl.

void GuiWindowCtrl::setFont ( S32  fntTag  ) 

GuiControl* GuiWindowCtrl::findHitControl ( const Point2I pt,
S32  initialLayer = -1 
) [virtual]

Returns the control which the provided point is under, with layering.

Parameters:
pt Point to test
initialLayer Layer of gui objects to begin the search

Reimplemented from GuiControl.

S32 GuiWindowCtrl::findHitEdges ( const Point2I globalPoint  ) 

void GuiWindowCtrl::getSnappableRects ( Vector< EdgeRectI > &  outVector  ) 

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

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

Reimplemented from GuiControl.

void GuiWindowCtrl::onMouseDragged ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

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

Reimplemented from GuiControl.

GuiControl* GuiWindowCtrl::findNextTabable ( GuiControl curResponder,
bool  firstCall = true 
) [virtual]

Find next tab-accessible control with regards to the provided control.

Parameters:
curResponder Current control
firstCall Set to true to clear the global current responder

Reimplemented from GuiControl.

GuiControl* GuiWindowCtrl::findPrevTabable ( GuiControl curResponder,
bool  firstCall = true 
) [virtual]

Find previous tab-accessible control with respect to the provided one.

Parameters:
curResponder Current control
firstCall Set to true to clear the global previous responder

Reimplemented from GuiControl.

bool GuiWindowCtrl::onKeyDown ( const GuiEvent event  )  [virtual]

Happens when a key is depressed.

Parameters:
event Event descriptor (which contains the key)

Reimplemented from GuiControl.

S32 GuiWindowCtrl::getTabIndex ( void   )  [inline]

void GuiWindowCtrl::selectWindow ( void   ) 

void GuiWindowCtrl::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.

const RectI GuiWindowCtrl::getClientRect (  )  [virtual]

Reimplemented from GuiContainer.


Member Data Documentation

Show a docking button on the title bar?

Should this window snap to other windows edges?

Resizing Edges Mask (See Edges Enumeration).