GuiScrollCtrl

Engine/source/gui/containers/guiScrollCtrl.h

A control providing a window inside a larger client area which can be scrolled using scrollbars.

More...

Public User Defined

bool

MouseWheel scroll animation.

Pixels moved per tick when performing a scroll animation.

The target position when performing a scroll animation.

Platform time of the last call to onPreRender.

Callbacks

DECLARE_CALLBACK(void , onScroll , () )

Public Types

enum
Region {
  UpArrow 
  DownArrow 
  LeftArrow 
  RightArrow 
  UpPage 
  DownPage 
  LeftPage 
  RightPage 
  VertThumb 
  HorizThumb 
  None 
}
enum
ScrollBarBehavior {
  ScrollBarAlwaysOn = 0
  ScrollBarAlwaysOff = 1
  ScrollBarDynamic = 2
}
Parent 

Protected Types

enum
BitmapIndices {
  BmpUp 
  BmpDown 
  BmpVThumbTopCap 
  BmpVThumb 
  BmpVThumbBottomCap 
  BmpVPage 
  BmpLeft 
  BmpRight 
  BmpHThumbLeftCap 
  BmpHThumb 
  BmpHThumbRightCap 
  BmpHPage 
  BmpResize 
  BmpCount 
}
enum
BitmapStates {
  BmpDefault = 0
  BmpHilite 
  BmpDisabled 
  BmpStates 
}

Protected Functions

Public Functions

addObject(SimObject * object)

Add the given object to the set.

Called when a child control of the object is resized.

DECLARE_DESCRIPTION("A container that allows <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> view <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> larger GUI <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> inside its smaller area " "by providing horizontal and/or vertical scroll bars." )
drawBorder(const Point2I & offset, bool isFirstResponder)
findHitControl(const Point2I & pt, S32 initialLayer)

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

bool

Is the given client space rect completely visible within the actual visible area, or is some of it clipped.

bool

Happens when a key is depressed.

bool

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

Do special pre-render processing.

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.

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

Changes the size and/or position of this control.

scrollToObject(GuiControl * targetControl)

Public Static Functions

Detailed Description

A control providing a window inside a larger client area which can be scrolled using scrollbars.

Public User Defined

bool mAnimating 

MouseWheel scroll animation.

Is currently performing a scroll animation.

S32 mScrollAnimSpeed 

Pixels moved per tick when performing a scroll animation.

Point2I mScrollTargetPos 

The target position when performing a scroll animation.

S32 mLastPreRender 

Platform time of the last call to onPreRender.

Callbacks

DECLARE_CALLBACK(void , onScroll , () )

Public Types

Region

Enumerator

UpArrow
DownArrow
LeftArrow
RightArrow
UpPage
DownPage
LeftPage
RightPage
VertThumb
HorizThumb
None
ScrollBarBehavior

Enumerator

ScrollBarAlwaysOn = 0
ScrollBarAlwaysOff = 1
ScrollBarDynamic = 2
typedef GuiContainer Parent 

Protected Types

BitmapIndices

Enumerator

BmpUp
BmpDown
BmpVThumbTopCap
BmpVThumb
BmpVThumbBottomCap
BmpVPage
BmpLeft
BmpRight
BmpHThumbLeftCap
BmpHThumb
BmpHThumbRightCap
BmpHPage
BmpResize
BmpCount
BitmapStates

Enumerator

BmpDefault = 0
BmpHilite
BmpDisabled
BmpStates

Protected Attributes

S32 mBaseThumbSize 
RectI * mBitmapBounds 
S32 mBorderThickness 
Point2I mChildExt 
Point2I mChildMargin 
Point2I mChildPos 
Point2I mChildRelPos 
Point2I mChildRelPosAnchor 
Point2I mContentExt 
Point2I mContentPos 
RectI mDownArrowRect 
S32 mForceHScrollBar 

Force showing the Horizontal scrollbar.

S32 mForceVScrollBar 

Force showing the Vertical scrollbar.

bool mHasHScrollBar 
bool mHasVScrollBar 
bool mHBarEnabled 
Region mHitRegion 

Which region is hit by the mouse.

S32 mHThumbPos 
S32 mHThumbSize 
RectI mHTrackRect 
bool mIgnoreChildResized 

Used internally to prevent infinite recursion.

S32 mLastUpdated 
RectI mLeftArrowRect 
bool mLockHorizScroll 

Is horizontal scrolling disabled.

bool mLockVertScroll 

Is vertical scrolling disabled.

RectI mRightArrowRect 
S32 mScrollBarArrowBtnLength 
S32 mScrollBarDragTolerance 
S32 mScrollBarThickness 
bool mStateDepressed 

Is the mouse currently depressed on a scroll region.

GFXTexHandle mTextureObject 
S32 mThumbMouseDelta 
RectI mUpArrowRect 
bool mUseConstantHeightThumb 
bool mVBarEnabled 
S32 mVThumbPos 
S32 mVThumbSize 
RectI mVTrackRect 
bool mWillFirstRespond 

Protected Functions

_onMouseDown(const GuiEvent & event, bool lockMouse)

calcChildExtents()

calcScrollRects(void )

calcThumbs()

findHitRegion(const Point2I & )

scrollByMouseWheel(const GuiEvent & event)

scrollByRegion(Region reg)

updateChildMousePos()

Tell the kids that the mouse moved (relatively)

Public Functions

GuiScrollCtrl()

addObject(SimObject * object)

Reimplemented from: GuiContainer

autoScroll(Region reg)

becomeFirstResponder()

childResized(GuiControl * child)

Reimplemented from: GuiContainer

computeSizes()

DECLARE_CONOBJECT(GuiScrollCtrl )

DECLARE_DESCRIPTION("A container that allows <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> view <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> larger GUI <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> inside its smaller area " "by providing horizontal and/or vertical scroll bars." )

drawBorder(const Point2I & offset, bool isFirstResponder)

drawHScrollBar(const Point2I & offset)

drawScrollCorner(const Point2I & offset)

drawVScrollBar(const Point2I & offset)

enabledHScrollBar()

enabledVScrollBar()

findHitControl(const Point2I & pt, S32 initialLayer)

Reimplemented from: GuiControl

getBorderThickness(void )

getChildExtent()

getChildMargin()

getChildPos()

getChildRelPos()

getContentExtent()

getCurHitRegion(void )

hasHScrollBar()

hasVScrollBar()

isPointVisible(const Point2I & point)

isRectCompletelyVisible(const RectI & rect)

Is the given client space rect completely visible within the actual visible area, or is some of it clipped.

Returns true if it is completely visible.

isScrolledToBottom()

loadBitmapArray()

loseFirstResponder()

onKeyDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseDownEditor(const GuiEvent & event, Point2I offset)

Reimplemented from: GuiControl

onMouseDragged(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseUp(const GuiEvent & event)

Reimplemented from: GuiControl

Reimplemented by: VEditorScrollControl

onMouseWheelDown(const GuiEvent & event)

Reimplemented from: GuiControl

onMouseWheelUp(const GuiEvent & event)

Reimplemented from: GuiControl

onPreRender()

Reimplemented from: GuiContainer

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiControl

Reimplemented by: VEditorScrollControl

onSleep()

Reimplemented from: GuiControl

onWake()

Reimplemented from: GuiControl

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

Reimplemented from: GuiContainer

scrollBarArrowBtnLength()

scrollBarThickness()

scrollDelta(S32 x, S32 y)

scrollDeltaAnimate(S32 x, S32 y)

scrollRectVisible(RectI rect)

scrollTo(S32 x, S32 y)

scrollToObject(GuiControl * targetControl)

wantsTabListMembership()

Public Static Functions

initPersistFields()