zenilib
0.5.3.0
|
#include <Widget.h>
Inherits Zeni::Widget, and Zeni::Widget_Rectangle.
Inherited by Zeni::Check_Box, Zeni::Text_Box, and Zeni::Text_Button.
Public Types | |
enum | State { NORMAL, CLICKED, HOVERED, STRAYED, UNACTIONABLE } |
A Button Widget.
Any simple click-button should inherit from this class.
Contact: bazal d@ze nipex .com
|
inline |
Definition at line 321 of file Widget.hxx.
|
inline |
Get the State of the button.
Definition at line 327 of file Widget.hxx.
Referenced by Zeni::Widget_Renderer_Tricolor::render_to().
|
inlinevirtual |
Called when the cursor is released inside the button.
Reimplemented in Zeni::Text_Box, Zeni::Radio_Button, Zeni::Check_Box, Zeni::Popup_Menu_State::Quit_Button, Zeni::Popup_Menu_State::Sound_Check_Box, Zeni::Popup_Menu_State::Configure_Video_Button, Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::Instructions_Button, and Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::Play_Button.
Definition at line 484 of file Widget.h.
Referenced by on_mouse_button().
|
inlinevirtual |
Called when the cursor downclicks the button.
Reimplemented in Zeni::Check_Box.
Definition at line 477 of file Widget.h.
Referenced by on_mouse_button().
|
inlinevirtual |
Called when the cursor passes over the button.
Definition at line 472 of file Widget.h.
Referenced by on_mouse_motion().
|
virtual |
Implements Zeni::Widget.
Reimplemented in Zeni::Text_Box.
Definition at line 232 of file Widget.cpp.
References CLICKED, HOVERED, Zeni::Widget::is_editable(), Zeni::Widget_Rectangle::is_inside(), NORMAL, on_accept(), on_click(), on_mouse_motion(), on_reject(), SDL_BUTTON_LEFT, Zeni::Widget::set_busy(), and UNACTIONABLE.
Referenced by Zeni::Text_Box::on_mouse_button().
Implements Zeni::Widget.
Definition at line 275 of file Widget.cpp.
References CLICKED, Zeni::get_Game(), HOVERED, Zeni::Widget::is_editable(), Zeni::Widget_Rectangle::is_inside(), NORMAL, on_hover(), on_stray(), on_unhover(), on_unstray(), SDL_BUTTON_LEFT, STRAYED, and UNACTIONABLE.
Referenced by on_mouse_button().
|
inlinevirtual |
Called when the cursor is released outside the button.
Reimplemented in Zeni::Check_Box.
Definition at line 486 of file Widget.h.
Referenced by on_mouse_button().
|
inlinevirtual |
Called when the cursor is dragged off the button after being clicked.
Reimplemented in Zeni::Check_Box.
Definition at line 479 of file Widget.h.
Referenced by on_mouse_motion().
|
inlinevirtual |
Called when the cursor leaves the button without clicking.
Definition at line 474 of file Widget.h.
Referenced by on_mouse_motion().
|
inlinevirtual |
Called when the cursor is dragged back onto the button without releasing the clicker.
Reimplemented in Zeni::Check_Box.
Definition at line 481 of file Widget.h.
Referenced by on_mouse_motion().