Crazy Eddies GUI System: CEGUI::Thumb Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
CEGUI::Thumb Class Reference

Base class for Thumb widget. More...

Inheritance diagram for CEGUI::Thumb:
[legend]
Collaboration diagram for CEGUI::Thumb:
[legend]

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 | setHorzRange (float min, float max)
| 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
virtual bool | testClassName_impl (const String &class_name) const
| Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
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
Point | 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:

  e | WindowEventArgs 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:

  e | MouseEventArgs 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:

  e | MouseEventArgs 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:

  setting | true 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:

  min | the minimum setting for the thumb on the horizontal axis.
  max | the maximum 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:

  setting | true 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:

  setting | true 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:

  min | the minimum setting for the thumb on the vertical axis.
  max | the maximum setting for the thumb on the vertical axis.

Returns:
  Nothing.

virtual bool CEGUI::Thumb::testClassName_impl | ( | const String & | class_name | ) | const`[inline, protected, virtual]`

Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

Parameters:

  class_name | The class name that is to be checked.

Returns:
  true if this window was inherited from class_name. false if not.

Reimplemented from CEGUI::PushButton.

References CEGUI::PushButton::testClassName_impl().

## Member Data Documentation

const String CEGUI::Thumb::EventThumbPositionChanged`[static]`

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.

const String CEGUI::Thumb::EventThumbTrackEnded`[static]`

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.

const String CEGUI::Thumb::EventThumbTrackStarted`[static]`

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.