GuiWindowCtrl

Engine/source/gui/containers/guiWindowCtrl.h

More...

Flags

bool

Allow resizing width of window.

bool

Allow resizing height of window.

bool

Allow moving window.

bool

Display close button.

bool

Display minimize button.

bool

Display maximize button.

bool

Show a docking button on the title bar?

bool

Should this window snap to other windows edges?

Callbacks

DECLARE_CALLBACK(void , onClose , () )
DECLARE_CALLBACK(void , onMinimize , () )
DECLARE_CALLBACK(void , onMaximize , () )
DECLARE_CALLBACK(void , onCollapse , () )
DECLARE_CALLBACK(void , onRestore , () )

Protected Types

enum
_Anonymous_ {  SnapDistance = 12
}
enum
_Anonymous_ {
  BorderTopLeftKey = 12
  BorderTopRightKey 
  BorderTopKey 
  BorderTopLeftNoKey 
  BorderTopRightNoKey 
  BorderTopNoKey 
  BorderLeft 
  BorderRight 
  BorderBottomLeft 
  BorderBottom 
  BorderBottomRight 
  NumBitmaps 
}

Indices for non-button bitmap rects.

enum
BitmapIndices {
  BmpClose 
  BmpMaximize 
  BmpNormal 
  BmpMinimize 
  BmpCount 
}

Base indices for the button bitmap rects.

enum
BitmapStates {
  BmpDefault = 0
  BmpHilite 
  BmpDown 
  BmpStates 
}

Button bitmap states.

enum
Edges {
  edgeNone = 0
  edgeTop = BIT(1)
  edgeLeft = BIT(2)
  edgeRight = BIT(3)
  edgeBottom = BIT(4)
}

Window Edge Bit Masks.

Public Types

Parent 

Protected Functions

Public Functions

DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that shows an independent window inside the canvas." )
findHitControl(const Point2I & pt, S32 initialLayer)

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

findHitEdges(const Point2I & globalPoint)
findNextTabable(GuiControl * curResponder, bool firstCall)

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

findPrevTabable(GuiControl * curResponder, bool firstCall)

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

getCursor(GuiCursor *& cursor, bool & showCursor, const GuiEvent & lastGuiEvent)

Get information about the cursor.

getSnappableWindows(Vector< GuiWindowCtrl * > & windowOutVector, bool canCollapse)
bool
isMinimized(S32 & index)
bool

Happens when a key is depressed.

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Called when this object is asked to sleep.

bool

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

parentResized(const RectI & oldParentRect, const RectI & newParentRect)

GuiContainer deals with parentResized calls differently than GuiControl.

bool
resize(const Point2I & newPosition, const Point2I & newExtent)

Changes the size and/or position of this control.

setCanResize(bool canResizeWidth, bool canResizeHeight)

Mutators for window properties from code.

setCloseCommand(const char * newCmd)
setFont(S32 fntTag)
setMobility(bool canMove, bool canClose, bool canMinimize, bool canMaximize, bool canDock, bool edgeSnap)

Mutators for window properties from code.

Set the text on the window title bar.

Public Static Functions

Detailed Description

Collapsing

getCollapseGroupNum()

moveFromCollapseGroup()

moveWithCollapseGroup(Point2I windowPosition)

resizeCollapseGroup(bool resizeX, bool resizeY, Point2I resizePos, Point2I resizeWidth)

refreshCollapseGroups()

handleCollapseGroup()

setCollapseGroup(bool state)

toggleCollapseGroup()

moveToCollapseGroup(GuiWindowCtrl * hitWindow, bool orientation)

S32 mCollapseGroup 
S32 mCollapseGroupNum 
S32 mPreCollapsedYExtent 
S32 mPreCollapsedYMinExtent 
bool mIsCollapsed 
bool mIsMouseResizing 
typedef Vector< GuiWindowCtrl * > CollapseGroupNumVec 

Flags

bool mResizeWidth 

Allow resizing width of window.

bool mResizeHeight 

Allow resizing height of window.

bool mCanMove 

Allow moving window.

bool mCanClose 

Display close button.

bool mCanMinimize 

Display minimize button.

bool mCanMaximize 

Display maximize button.

bool mCanCollapse 
bool mCanDock 

Show a docking button on the title bar?

bool mEdgeSnap 

Should this window snap to other windows edges?

Callbacks

DECLARE_CALLBACK(void , onClose , () )

DECLARE_CALLBACK(void , onMinimize , () )

DECLARE_CALLBACK(void , onMaximize , () )

DECLARE_CALLBACK(void , onCollapse , () )

DECLARE_CALLBACK(void , onRestore , () )

Protected Types

@93

Enumerator

SnapDistance = 12

Pixel distance across which snapping takes effect.

@94

Enumerator

BorderTopLeftKey = 12
BorderTopRightKey
BorderTopKey
BorderTopLeftNoKey
BorderTopRightNoKey
BorderTopNoKey
BorderLeft
BorderRight
BorderBottomLeft
BorderBottom
BorderBottomRight
NumBitmaps

Indices for non-button bitmap rects.

BitmapIndices

Enumerator

BmpClose
BmpMaximize
BmpNormal
BmpMinimize
BmpCount

Base indices for the button bitmap rects.

Each button bitmap is defined in each of the BitmapStates.

BitmapStates

Enumerator

BmpDefault = 0
BmpHilite
BmpDown
BmpStates

Button bitmap states.

Edges

Enumerator

edgeNone = 0

No Edge.

edgeTop = BIT(1)

Top Edge.

edgeLeft = BIT(2)

Left Edge.

edgeRight = BIT(3)

Right Edge.

edgeBottom = BIT(4)

Bottom Edge.

Window Edge Bit Masks.

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

Public Types

typedef GuiContainer Parent 

Protected Attributes

RectI * mBitmapBounds 
RectI mCloseButton 
bool mCloseButtonPressed 
StringTableEntry mCloseCommand 
RectI mMaximizeButton 
bool mMaximizeButtonPressed 
bool mMaximized 
RectI mMinimizeButton 
bool mMinimizeButtonPressed 
bool mMinimized 
S32 mMinimizeIndex 
Point2I mMouseDownPosition 
bool mMouseMovingWin 
Point2I mMousePosition 
bool mMouseResizeHeight 
bool mMouseResizeWidth 
RectI mOrigBounds 
bool mRepositionWindow 
S32 mResizeEdge 

Resizing Edges Mask (See Edges Enumeration)

F32 mResizeMargin 
bool mResizeWindow 
bool mSnapSignal 
RectI mStandardBounds 
S32 mTabIndex 
String mText 

Window title string.

GFXTexHandle mTextureObject 
S32 mTitleHeight 

Protected Functions

positionButtons(void )

Public Functions

GuiWindowCtrl()

DECLARE_CONOBJECT(GuiWindowCtrl )

DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that shows an independent window inside the canvas." )

findHitControl(const Point2I & pt, S32 initialLayer)

Reimplemented from: GuiControl

findHitEdges(const Point2I & globalPoint)

findNextTabable(GuiControl * curResponder, bool firstCall)

Reimplemented from: GuiControl

findPrevTabable(GuiControl * curResponder, bool firstCall)

Reimplemented from: GuiControl

getClientRect()

Reimplemented from: GuiContainer

getCursor(GuiCursor *& cursor, bool & showCursor, const GuiEvent & lastGuiEvent)

Reimplemented from: GuiControl

getSnappableWindows(Vector< GuiWindowCtrl * > & windowOutVector, bool canCollapse)

getTabIndex(void )

isMinimized(S32 & index)

onKeyDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseDragged(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseMove(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseUp(const GuiEvent & event)

Reimplemented from: GuiControl

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiControl

onSleep()

Reimplemented from: GuiControl

onWake()

Reimplemented from: GuiControl

parentResized(const RectI & oldParentRect, const RectI & newParentRect)

Reimplemented from: GuiContainer

resize(const Point2I & newPosition, const Point2I & newExtent)

Reimplemented from: GuiContainer

selectWindow(void )

setCanResize(bool canResizeWidth, bool canResizeHeight)

Mutators for window properties from code.

Using setDataField is a bit overkill.

setCloseCommand(const char * newCmd)

setFont(S32 fntTag)

setMobility(bool canMove, bool canClose, bool canMinimize, bool canMaximize, bool canDock, bool edgeSnap)

Mutators for window properties from code.

Using setDataField is a bit overkill.

setText(const String & text)

Set the text on the window title bar.

Public Static Functions

initPersistFields()