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 |
The position of the thumb widget has changed. | |
static const String | EventThumbTrackStarted |
Name of the event fired when the user begins dragging the thumb. | |
static const String | EventThumbTrackEnded |
Name of the event fired when the user releases the thumb. | |
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. |
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.
std::pair< float, float > CEGUI::Thumb::getHorzRange | ( | void | ) | const |
Return a std::pair that describes the current range set for the horizontal movement.
References d_horzMax.
std::pair< float, float > CEGUI::Thumb::getVertRange | ( | void | ) | const |
Return a std::pair that describes the current range set for the vertical movement.
References d_vertMax.
bool CEGUI::Thumb::isHorzFree | ( | void | ) | const [inline] |
return whether the thumb is movable on the horizontal axis.
bool CEGUI::Thumb::isHotTracked | ( | void | ) | const [inline] |
return whether hot-tracking is enabled or not.
bool CEGUI::Thumb::isVertFree | ( | void | ) | const [inline] |
return whether the thumb is movable on the vertical axis.
void CEGUI::Thumb::onCaptureLost | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when this window loses capture of mouse inputs.
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.
References d_beingDragged, onThumbPositionChanged(), and onThumbTrackEnded().
void CEGUI::Thumb::onMouseButtonDown | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been depressed within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::ButtonBase.
References CEGUI::MouseEventArgs::button, d_beingDragged, d_dragPoint, CEGUI::EventArgs::handled, CEGUI::LeftButton, onThumbTrackStarted(), CEGUI::MouseEventArgs::position, and CEGUI::CoordConverter::screenToWindow().
void CEGUI::Thumb::onMouseMove | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when the mouse cursor has been moved within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::ButtonBase.
References d_beingDragged, d_dragPoint, CEGUI::Size::d_height, d_horzFree, d_horzMax, d_hotTrack, CEGUI::UDim::d_scale, d_vertFree, d_vertMax, CEGUI::Size::d_width, CEGUI::UVector2::d_x, CEGUI::Vector2::d_x, CEGUI::UVector2::d_y, CEGUI::Vector2::d_y, CEGUI::Window::getParentPixelSize(), CEGUI::Window::getPosition(), CEGUI::EventArgs::handled, onThumbPositionChanged(), CEGUI::MouseEventArgs::position, CEGUI::CoordConverter::screenToWindow(), and CEGUI::Window::setPosition().
void CEGUI::Thumb::setHorzFree | ( | bool | setting | ) | [inline] |
set whether thumb is movable on the horizontal axis.
setting | true to allow movement of thumb along the horizontal axis. false to fix thumb on the horizontal axis. |
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.
min | the minimum setting for the thumb on the horizontal axis. | |
max | the maximum setting for the thumb on the horizontal axis. |
References CEGUI::UDim::asAbsolute(), d_horzMax, CEGUI::Size::d_width, CEGUI::Window::getParentPixelSize(), CEGUI::Window::getXPosition(), and CEGUI::Window::setXPosition().
void CEGUI::Thumb::setHotTracked | ( | bool | setting | ) | [inline] |
set whether the thumb uses hot-tracking.
setting | true to enable hot-tracking. false to disable hot-tracking. |
void CEGUI::Thumb::setVertFree | ( | bool | setting | ) | [inline] |
set whether thumb is movable on the vertical axis.
setting | true to allow movement of thumb along the vertical axis. false to fix thumb on the vertical axis. |
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.
min | the minimum setting for the thumb on the vertical axis. | |
max | the maximum setting for the thumb on the vertical axis. |
References CEGUI::UDim::asRelative(), d_vertMax, CEGUI::Window::getParentPixelHeight(), CEGUI::Window::getYPosition(), and CEGUI::Window::setYPosition().
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.
class_name | The class name that is to be checked. |
Reimplemented from CEGUI::PushButton.
References CEGUI::PushButton::testClassName_impl().