Crazy Eddie's GUI System  0.8.4
CEGUI::Thumb Class Reference

Base class for Thumb widget. More...

+ Inheritance diagram for CEGUI::Thumb:
+ Collaboration diagram for CEGUI::Thumb:

List of all members.

Public Member Functions

bool isHotTracked (void) const
 return whether hot-tracking is enabled or not.
bool isVertFree (void) const
 return whether the thumb is movable on the vertical axis.
bool isHorzFree (void) const
 return whether the thumb is movable on the horizontal axis.
std::pair< float, float > getVertRange (void) const
 Return a std::pair that describes the current range set for the vertical movement.
std::pair< float, float > getHorzRange (void) const
 Return a std::pair that describes the current range set for the horizontal movement.
void setHotTracked (bool setting)
 set whether the thumb uses hot-tracking.
void setVertFree (bool setting)
 set whether thumb is movable on the vertical axis.
void setHorzFree (bool setting)
 set whether thumb is movable on the horizontal axis.
void setVertRange (float min, float max)
 set the movement range of the thumb for the vertical axis.
void setVertRange (const std::pair< float, float > &range)
 set the movement range of the thumb for the vertical axis.
void setHorzRange (float min, float max)
 set the movement range of the thumb for the horizontal axis.
void setHorzRange (const std::pair< float, float > &range)
 set the movement range of the thumb for the horizontal axis.
 Thumb (const String &type, const String &name)
 Constructor for Thumb objects.
virtual ~Thumb (void)
 Destructor for Thumb objects.

Static Public Attributes

static const String EventNamespace
 Namespace for global events.
static const String WidgetTypeName
 Window factory name.
static const String EventThumbPositionChanged
static const String EventThumbTrackStarted
static const String EventThumbTrackEnded

Protected Member Functions

void banPropertiesForAutoWindow ()
virtual void onThumbPositionChanged (WindowEventArgs &e)
 event triggered internally when the position of the thumb
virtual void onThumbTrackStarted (WindowEventArgs &e)
 Handler triggered when the user begins to drag the thumb.
virtual void onThumbTrackEnded (WindowEventArgs &e)
 Handler triggered when the thumb is released.
virtual void onMouseMove (MouseEventArgs &e)
 Handler called when the mouse cursor has been moved within this window's area.
virtual void onMouseButtonDown (MouseEventArgs &e)
 Handler called when a mouse button has been depressed within this window's area.
virtual void onCaptureLost (WindowEventArgs &e)
 Handler called when this window loses capture of mouse inputs.

Protected Attributes

bool d_hotTrack
 true if events are to be sent real-time, else just when thumb is released
bool d_vertFree
 true if thumb is movable vertically
bool d_horzFree
 true if thumb is movable horizontally
float d_vertMin
float d_vertMax
 vertical range
float d_horzMin
float d_horzMax
 horizontal range
bool d_beingDragged
 true if thumb is being dragged
Vector2f d_dragPoint
 point where we are being dragged at.

Detailed Description

Base class for Thumb widget.

The thumb widget is used to compose other widgets (like sliders and scroll bars). You would not normally need to use this widget directly unless you are making a new widget of some type.


Member Function Documentation

std::pair<float, float> CEGUI::Thumb::getHorzRange ( void  ) const

Return a std::pair that describes the current range set for the horizontal movement.

Returns:
a std::pair describing the current horizontal range. The first element is the minimum value, the second element is the maximum value.
std::pair<float, float> CEGUI::Thumb::getVertRange ( void  ) const

Return a std::pair that describes the current range set for the vertical movement.

Returns:
a std::pair describing the current vertical range. The first element is the minimum value, the second element is the maximum value.
bool CEGUI::Thumb::isHorzFree ( void  ) const [inline]

return whether the thumb is movable on the horizontal axis.

Returns:
true if the thumb is movable along the horizontal axis. false if the thumb is fixed on the horizontal axis.
bool CEGUI::Thumb::isHotTracked ( void  ) const [inline]

return whether hot-tracking is enabled or not.

Returns:
true if hot-tracking is enabled. false if hot-tracking is disabled.
bool CEGUI::Thumb::isVertFree ( void  ) const [inline]

return whether the thumb is movable on the vertical axis.

Returns:
true if the thumb is movable along the vertical axis. false if the thumb is fixed on the vertical axis.
virtual void CEGUI::Thumb::onCaptureLost ( WindowEventArgs e) [protected, virtual]

Handler called when this window loses capture of mouse inputs.

Parameters:
eWindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::ButtonBase.

virtual void CEGUI::Thumb::onMouseButtonDown ( MouseEventArgs e) [protected, virtual]

Handler called when a mouse button has been depressed within this window's area.

Parameters:
eMouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::ButtonBase.

virtual void CEGUI::Thumb::onMouseMove ( MouseEventArgs e) [protected, virtual]

Handler called when the mouse cursor has been moved within this window's area.

Parameters:
eMouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::ButtonBase.

void CEGUI::Thumb::setHorzFree ( bool  setting) [inline]

set whether thumb is movable on the horizontal axis.

Parameters:
settingtrue to allow movement of thumb along the horizontal axis. false to fix thumb on the horizontal axis.
Returns:
nothing.
void CEGUI::Thumb::setHorzRange ( float  min,
float  max 
)

set the movement range of the thumb for the horizontal axis.

The values specified here are relative to the parent window for the thumb, and are specified in whichever metrics mode is active for the widget.

Parameters:
minthe minimum setting for the thumb on the horizontal axis.
maxthe maximum setting for the thumb on the horizontal axis.
Returns:
Nothing.
void CEGUI::Thumb::setHorzRange ( const std::pair< float, float > &  range)

set the movement range of the thumb for the horizontal axis.

The values specified here are relative to the parent window for the thumb, and are specified in whichever metrics mode is active for the widget.

Parameters:
rangethe setting for the thumb on the horizontal axis.
Returns:
Nothing.
void CEGUI::Thumb::setHotTracked ( bool  setting) [inline]

set whether the thumb uses hot-tracking.

Parameters:
settingtrue to enable hot-tracking. false to disable hot-tracking.
Returns:
Nothing.
void CEGUI::Thumb::setVertFree ( bool  setting) [inline]

set whether thumb is movable on the vertical axis.

Parameters:
settingtrue to allow movement of thumb along the vertical axis. false to fix thumb on the vertical axis.
Returns:
nothing.
void CEGUI::Thumb::setVertRange ( float  min,
float  max 
)

set the movement range of the thumb for the vertical axis.

The values specified here are relative to the parent window for the thumb, and are specified in whichever metrics mode is active for the widget.

Parameters:
minthe minimum setting for the thumb on the vertical axis.
maxthe maximum setting for the thumb on the vertical axis.
Returns:
Nothing.
void CEGUI::Thumb::setVertRange ( const std::pair< float, float > &  range)

set the movement range of the thumb for the vertical axis.

The values specified here are relative to the parent window for the thumb, and are specified in whichever metrics mode is active for the widget.

Parameters:
rangethe setting for the thumb on the vertical axis.
Returns:
Nothing.

Member Data Documentation

Event fired when the position of the thumb widget has changed (this event is only fired when hot tracking is enabled). Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Thumb whose position has changed.

Event fired when the user releases the thumb. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Thumb that has been released.

Event fired when the user begins dragging the thumb. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Thumb that has started to be dragged by the user.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends