GuiRolloutCtrl

Engine/source/gui/containers/guiRolloutCtrl.h

A container with an optional header that allows its child control to be collapsed using an animated effet.

More...

Callbacks

DECLARE_CALLBACK(void , onHeaderRightClick , () )
DECLARE_CALLBACK(void , onExpanded , () )
DECLARE_CALLBACK(void , onCollapsed , () )

Public Types

enum
_Anonymous_ {
  CollapsedLeft = 0
  CollapsedCenter 
  CollapsedRight 
  TopLeftHeader 
  TopMidHeader 
  TopRightHeader 
  MidPageLeft 
  MidPageCenter 
  MidPageRight 
  BottomLeftHeader 
  BottomMidHeader 
  BottomRightHeader 
  NumBitmaps 
}
Parent 

Protected Attributes

bool

Whether to automatically collapse sibling rollouts when this one is expanded.

Array of rectangles identifying textures for rollout.

bool

Whether the rollout can be collapsed.

Label to display on rollout header.

bool

Indicates whether we have a texture to render the tabs with.

bool

Whether to hide the rollout header.

Protected Static Functions

bool
setExpanded(void * object, const char * index, const char * data)

Protected Functions

bool
_onMouseUp(const GuiEvent & event, bool lockedMouse)

This method is called once every 32ms if isProcessingTicks returns true when called on the object.

Public Functions

addObject(SimObject * object)

Add the given object to the set.

animateTo(S32 height)
bool

Called when a child control of the object is resized.

DECLARE_CATEGORY("Gui Containers" )
DECLARE_DESCRIPTION("A container that displays <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> header with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> caption on top of its child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">control\n</a>" "that when clicked collapses/expands the <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>/from just the header." )
bool
bool

Called when this object is added to the scene.

bool

Called when a mouseUp event occurs on a control and the GUI editor is active.

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

bool

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

Remove the given object from the set.

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

Changes the size and/or position of this control.

setCanCollapse(bool value)
setHeaderHidden(bool value)
setMargin(S32 left, S32 top, S32 right, S32 bottom)
toggleExpanded(bool instant)

Public Static Functions

Detailed Description

A container with an optional header that allows its child control to be collapsed using an animated effet.

Callbacks

DECLARE_CALLBACK(void , onHeaderRightClick , () )

DECLARE_CALLBACK(void , onExpanded , () )

DECLARE_CALLBACK(void , onCollapsed , () )

Public Types

@91

Enumerator

CollapsedLeft = 0
CollapsedCenter
CollapsedRight
TopLeftHeader
TopMidHeader
TopRightHeader
MidPageLeft
MidPageCenter
MidPageRight
BottomLeftHeader
BottomMidHeader
BottomRightHeader
NumBitmaps

Number of bitmaps in this array.

typedef GuiControl Parent 

Protected Attributes

S32 mAnimateDestHeight 
S32 mAnimateStep 
bool mAutoCollapseSiblings 

Whether to automatically collapse sibling rollouts when this one is expanded.

RectI * mBitmapBounds 

Array of rectangles identifying textures for rollout.

bool mCanCollapse 

Whether the rollout can be collapsed.

String mCaption 

Label to display on rollout header.

RectI mChildRect 
bool mCollapsing 
GuiCursor * mDefaultCursor 
S32 mDefaultHeight 
RectI mExpanded 
bool mHasTexture 

Indicates whether we have a texture to render the tabs with.

RectI mHeader 
bool mHideHeader 

Whether to hide the rollout header.

bool mIsAnimating 
bool mIsExpanded 
RectI mMargin 
GuiCursor * mVertSizingCursor 

Protected Static Functions

setExpanded(void * object, const char * index, const char * data)

Protected Functions

_onMouseUp(const GuiEvent & event, bool lockedMouse)

processTick()

Reimplemented from: GuiTickCtrl

Public Functions

GuiRolloutCtrl()

~GuiRolloutCtrl()

addObject(SimObject * object)

Reimplemented from: SimGroup

animateTo(S32 height)

calculateHeights()

canCollapse()

childResized(GuiControl * child)

Reimplemented from: GuiControl

collapse()

DECLARE_CATEGORY("Gui Containers" )

DECLARE_CONOBJECT(GuiRolloutCtrl )

DECLARE_DESCRIPTION("A container that displays <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> header with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> caption on top of its child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">control\n</a>" "that when clicked collapses/expands the <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>/from just the header." )

expand()

getCaption()

instantCollapse()

instantExpand()

isExpanded()

isHeaderHidden()

onAdd()

Reimplemented from: GuiControl

Reimplemented by: GuiInspectorGroup

onMouseDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseUp(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseUpEditor(const GuiEvent & event, Point2I offset)

Reimplemented from: GuiControl

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiControl

onRightMouseUp(const GuiEvent & event)

Reimplemented from: GuiControl

onWake()

Reimplemented from: GuiControl

removeObject(SimObject * object)

Reimplemented from: SimGroup

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

Reimplemented from: GuiControl

setCanCollapse(bool value)

setCaption(const String & str)

setHeaderHidden(bool value)

setMargin(const RectI & rect)

setMargin(S32 left, S32 top, S32 right, S32 bottom)

sizeToContents()

toggleExpanded(bool instant)

Public Static Functions

initPersistFields()