torque Torque Game Engine Documentation
TGE Version 1.5.2

GuiScrollCtrl Class Reference

#include <guiScrollCtrl.h>

Inheritance diagram for GuiScrollCtrl:

Inheritance graph
[legend]

Public Types

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

Public Member Functions

Region findHitRegion (const Point2I &)
 GuiScrollCtrl ()
 DECLARE_CONOBJECT (GuiScrollCtrl)
void autoScroll (Region reg)
void scrollTo (S32 x, S32 y)
void scrollDelta (S32 x, S32 y)
void scrollRectVisible (RectI rect)
void computeSizes ()
void loadBitmapArray ()
void addObject (SimObject *obj)
 Adds an object as a child of this object.
void resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
void childResized (GuiControl *child)
 Called when a child control of the object is resized.
Point2I getChildPos ()
Point2I getChildRelPos ()
Point2I getChildExtent ()
Point2I getContentExtent ()
Point2I getChildMargin ()
S32 getBorderThickness (void)
S32 scrollBarThickness () const
S32 scrollBarArrowBtnLength () const
bool hasHScrollBar () const
bool hasVScrollBar () const
bool enabledHScrollBar () const
bool enabledVScrollBar () const
bool isScrolledToBottom ()
bool wantsTabListMembership ()
bool becomeFirstResponder ()
bool loseFirstResponder ()
Region getCurHitRegion (void)
bool onKeyDown (const GuiEvent &event)
 Happens when a key is depressed.
void onMouseDown (const GuiEvent &event)
void onMouseRepeat (const GuiEvent &event)
void onMouseUp (const GuiEvent &event)
void onMouseDragged (const GuiEvent &event)
bool onMouseWheelUp (const GuiEvent &event)
bool onMouseWheelDown (const GuiEvent &event)
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.
void onPreRender ()
 Do special pre-render proecessing.
void onRender (Point2I offset, const RectI &updateRect)
 Called when this control is to render itself.
virtual void drawBorder (const Point2I &offset, bool isFirstResponder)
virtual void drawVScrollBar (const Point2I &offset)
virtual void drawHScrollBar (const Point2I &offset)
virtual void drawScrollCorner (const Point2I &offset)
virtual GuiControlfindHitControl (const Point2I &pt, S32 initialLayer=-1)
 Returns the control which the provided point is under, with layering.

Static Public Member Functions

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

Data Fields

bool stateDepressed
Region curHitRegion
bool disabled
S32 mForceHScrollBar
S32 mForceVScrollBar
bool mUseConstantHeightThumb
bool mWillFirstRespond

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 Member Functions

virtual bool calcChildExtents ()
virtual void calcScrollRects (void)
void calcThumbs ()
void scrollByRegion (Region reg)

Protected Attributes

RectImBitmapBounds
TextureHandle mTextureHandle
S32 mBorderThickness
Point2I mChildMargin
S32 mScrollBarThickness
S32 mScrollBarArrowBtnLength
S32 mScrollBarDragTolerance
bool mHBarEnabled
bool mVBarEnabled
bool mHasHScrollBar
bool mHasVScrollBar
Point2I mContentPos
Point2I mContentExt
Point2I mChildPos
Point2I mChildExt
Point2I mChildRelPos
Point2I mChildRelPosAnchor
S32 mThumbMouseDelta
S32 mLastUpdated
S32 mHThumbSize
S32 mHThumbPos
S32 mVThumbSize
S32 mVThumbPos
S32 mBaseThumbSize
RectI mUpArrowRect
RectI mDownArrowRect
RectI mLeftArrowRect
RectI mRightArrowRect
RectI mHTrackRect
RectI mVTrackRect

Private Types

typedef GuiControl Parent

Member Typedef Documentation

typedef GuiControl GuiScrollCtrl::Parent [private]

Reimplemented from GuiControl.


Member Enumeration Documentation

enum GuiScrollCtrl::BitmapIndices [protected]

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

enum GuiScrollCtrl::BitmapStates [protected]

Enumerator:
BmpDefault 
BmpHilite 
BmpDisabled 
BmpStates 

Enumerator:
UpArrow 
DownArrow 
LeftArrow 
RightArrow 
UpPage 
DownPage 
LeftPage 
RightPage 
VertThumb 
HorizThumb 
None 

anonymous enum

Enumerator:
ScrollBarAlwaysOn 
ScrollBarAlwaysOff 
ScrollBarDynamic 


Constructor & Destructor Documentation

GuiScrollCtrl::GuiScrollCtrl (  ) 


Member Function Documentation

Region GuiScrollCtrl::findHitRegion ( const Point2I  ) 

virtual bool GuiScrollCtrl::calcChildExtents (  )  [protected, virtual]

virtual void GuiScrollCtrl::calcScrollRects ( void   )  [protected, virtual]

void GuiScrollCtrl::calcThumbs (  )  [protected]

void GuiScrollCtrl::scrollByRegion ( Region  reg  )  [protected]

GuiScrollCtrl::DECLARE_CONOBJECT ( GuiScrollCtrl   ) 

static void GuiScrollCtrl::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from GuiControl.

void GuiScrollCtrl::autoScroll ( Region  reg  ) 

void GuiScrollCtrl::scrollTo ( S32  x,
S32  y 
)

void GuiScrollCtrl::scrollDelta ( S32  x,
S32  y 
)

void GuiScrollCtrl::scrollRectVisible ( RectI  rect  ) 

void GuiScrollCtrl::computeSizes (  ) 

void GuiScrollCtrl::loadBitmapArray (  ) 

void GuiScrollCtrl::addObject ( SimObject obj  )  [virtual]

Adds an object as a child of this object.

Parameters:
obj New child object of this control

Reimplemented from GuiControl.

void GuiScrollCtrl::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 GuiScrollCtrl::childResized ( GuiControl child  )  [virtual]

Called when a child control of the object is resized.

Parameters:
child Child object

Reimplemented from GuiControl.

Point2I GuiScrollCtrl::getChildPos (  )  [inline]

Point2I GuiScrollCtrl::getChildRelPos (  )  [inline]

Point2I GuiScrollCtrl::getChildExtent (  )  [inline]

Point2I GuiScrollCtrl::getContentExtent (  )  [inline]

Point2I GuiScrollCtrl::getChildMargin (  )  [inline]

S32 GuiScrollCtrl::getBorderThickness ( void   )  [inline]

S32 GuiScrollCtrl::scrollBarThickness (  )  const [inline]

S32 GuiScrollCtrl::scrollBarArrowBtnLength (  )  const [inline]

bool GuiScrollCtrl::hasHScrollBar (  )  const [inline]

bool GuiScrollCtrl::hasVScrollBar (  )  const [inline]

bool GuiScrollCtrl::enabledHScrollBar (  )  const [inline]

bool GuiScrollCtrl::enabledVScrollBar (  )  const [inline]

bool GuiScrollCtrl::isScrolledToBottom (  )  [inline]

bool GuiScrollCtrl::wantsTabListMembership (  ) 

bool GuiScrollCtrl::becomeFirstResponder (  ) 

bool GuiScrollCtrl::loseFirstResponder (  ) 

Region GuiScrollCtrl::getCurHitRegion ( void   )  [inline]

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

Happens when a key is depressed.

Parameters:
event Event descriptor (which contains the key)

Reimplemented from GuiControl.

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

Reimplemented from GuiControl.

void GuiScrollCtrl::onMouseRepeat ( const GuiEvent event  ) 

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

Reimplemented from GuiControl.

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

Reimplemented from GuiControl.

bool GuiScrollCtrl::onMouseWheelUp ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

bool GuiScrollCtrl::onMouseWheelDown ( const GuiEvent event  )  [virtual]

Reimplemented from GuiControl.

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

Called when this object is asked to sleep.

Reimplemented from GuiControl.

void GuiScrollCtrl::onPreRender (  )  [virtual]

Do special pre-render proecessing.

Reimplemented from GuiControl.

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

virtual void GuiScrollCtrl::drawBorder ( const Point2I offset,
bool  isFirstResponder 
) [virtual]

virtual void GuiScrollCtrl::drawVScrollBar ( const Point2I offset  )  [virtual]

virtual void GuiScrollCtrl::drawHScrollBar ( const Point2I offset  )  [virtual]

virtual void GuiScrollCtrl::drawScrollCorner ( const Point2I offset  )  [virtual]

virtual GuiControl* GuiScrollCtrl::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.


Field Documentation

TextureHandle GuiScrollCtrl::mTextureHandle [protected]

bool GuiScrollCtrl::mHBarEnabled [protected]

bool GuiScrollCtrl::mVBarEnabled [protected]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen