Crazy Eddie's GUI System
0.8.4
|
Base class for all the 'button' type widgets (push button, radio button, check-box, etc) More...
Inherits CEGUI::Window.
Inherited by CEGUI::PushButton, CEGUI::TabButton, and CEGUI::ToggleButton.
Public Member Functions | |
bool | isHovering (void) const |
return true if user is hovering over this widget (or it's pushed and user is not over it for highlight) | |
bool | isPushed (void) const |
Return true if the button widget is in the pushed state. | |
void | setPushedState (const bool pushed) |
ButtonBase (const String &type, const String &name) | |
Constructor for ButtonBase objects. | |
virtual | ~ButtonBase (void) |
Destructor for ButtonBase objects. | |
Protected Member Functions | |
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 | onMouseButtonUp (MouseEventArgs &e) |
Handler called when a mouse button has been released within this window's area. | |
virtual void | onCaptureLost (WindowEventArgs &e) |
Handler called when this window loses capture of mouse inputs. | |
virtual void | onMouseLeaves (MouseEventArgs &e) |
Handler called when the mouse cursor is no longer over this window's surface area. This will be called when the mouse is not over a part of this Window's actual surface - even though technically the mouse is still within the Window's area, for example if the mouse moves over a child window. | |
void | updateInternalState (const Vector2f &mouse_pos) |
Update the internal state of the widget with the mouse at the given position. | |
bool | calculateCurrentHoverState (const Vector2f &mouse_pos) |
Protected Attributes | |
bool | d_pushed |
true when widget is pushed | |
bool | d_hovering |
true when the button is in 'hover' state and requires the hover rendering. |
Base class for all the 'button' type widgets (push button, radio button, check-box, etc)
bool CEGUI::ButtonBase::isHovering | ( | void | ) | const [inline] |
return true if user is hovering over this widget (or it's pushed and user is not over it for highlight)
bool CEGUI::ButtonBase::isPushed | ( | void | ) | const [inline] |
Return true if the button widget is in the pushed state.
virtual void CEGUI::ButtonBase::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::Window.
Reimplemented in CEGUI::Thumb.
virtual void CEGUI::ButtonBase::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::Window.
Reimplemented in CEGUI::Thumb, and CEGUI::TabButton.
virtual void CEGUI::ButtonBase::onMouseButtonUp | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been released within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
Reimplemented in CEGUI::TabButton, CEGUI::PushButton, and CEGUI::ToggleButton.
virtual void CEGUI::ButtonBase::onMouseLeaves | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when the mouse cursor is no longer over this window's surface area. This will be called when the mouse is not over a part of this Window's actual surface - even though technically the mouse is still within the Window's area, for example if the mouse moves over a child window.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
virtual void CEGUI::ButtonBase::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::Window.
Reimplemented in CEGUI::Thumb, and CEGUI::TabButton.
void CEGUI::ButtonBase::setPushedState | ( | const bool | pushed | ) |
Internal function to set button's pushed state. Normally you would not call this, except perhaps when building compound widgets.
void CEGUI::ButtonBase::updateInternalState | ( | const Vector2f & | mouse_pos | ) | [protected] |
Update the internal state of the widget with the mouse at the given position.
mouse_pos | Point object describing, in screen pixel co-ordinates, the location of the mouse cursor. |