Crazy Eddie's GUI System
0.8.4
|
Base class for Thumb widget. More...
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. |
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.
std::pair<float, float> CEGUI::Thumb::getHorzRange | ( | void | ) | const |
Return a std::pair that describes the current range set for the horizontal movement.
std::pair<float, float> CEGUI::Thumb::getVertRange | ( | void | ) | const |
Return a std::pair that describes the current range set for the vertical movement.
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.
virtual 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.
virtual 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.
virtual 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.
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. |
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.
range | the setting for the thumb on the horizontal axis. |
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. |
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.
range | the setting for the thumb on the vertical axis. |
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.