#include <distributor.hpp>
Public Member Functions | |
tmouse_button (const std::string &name_, twidget &owner, const tdispatcher::tposition queue_position) | |
void | initialize_state (const bool is_down) |
Initializes the state of the button. More... | |
Public Member Functions inherited from gui2::event::tmouse_motion | |
tmouse_motion (twidget &owner, const tdispatcher::tposition queue_position) | |
~tmouse_motion () | |
void | capture_mouse (const bool capture=true) |
Captures the mouse input. More... | |
Protected Attributes | |
Uint32 | last_click_stamp_ |
The time of the last click used for double clicking. More... | |
twidget * | last_clicked_widget_ |
The widget the last click was on, used for double clicking. More... | |
twidget * | focus_ |
If the mouse isn't captured we need to verify the up is on the same widget as the down so we send a proper click, also needed to send the up to the right widget. More... | |
Protected Attributes inherited from gui2::event::tmouse_motion | |
twidget * | mouse_focus_ |
The widget that currently has the mouse focus_. More... | |
bool | mouse_captured_ |
Did the current widget capture the focus_? More... | |
twidget & | owner_ |
The widget that owns us. More... | |
size_t | hover_timer_ |
The timer for the hover event. More... | |
twidget * | hover_widget_ |
The widget which should get the hover event. More... | |
tpoint | hover_position_ |
The anchor point of the hover event. More... | |
bool | hover_shown_ |
Has the hover been shown for the widget? More... | |
Private Member Functions | |
void | signal_handler_sdl_button_down (const event::tevent event, bool &handled, const tpoint &coordinate) |
void | signal_handler_sdl_button_up (const event::tevent event, bool &handled, const tpoint &coordinate) |
void | mouse_button_click (twidget *widget) |
Private Attributes | |
const std::string | name_ |
used for debug messages. More... | |
bool | is_down_ |
Is the button down? More... | |
bool | signal_handler_sdl_button_down_entered_ |
bool | signal_handler_sdl_button_up_entered_ |
Additional Inherited Members | |
Protected Member Functions inherited from gui2::event::tmouse_motion | |
void | start_hover_timer (twidget *widget, const tpoint &coordinate) |
Starts the hover timer. More... | |
void | stop_hover_timer () |
Stops the current hover timer. More... | |
void | mouse_enter (twidget *mouse_over) |
Called when the mouse enters a widget. More... | |
void | mouse_leave () |
Called when the mouse leaves the current widget. More... | |
Definition at line 160 of file distributor.hpp.
gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::tmouse_button | ( | const std::string & | name_, |
twidget & | owner, | ||
const tdispatcher::tposition | queue_position | ||
) |
Definition at line 378 of file distributor.cpp.
References gui2::event::tdispatcher::connect_signal(), gui2::event::tmouse_motion::owner_, gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::signal_handler_sdl_button_down(), and gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::signal_handler_sdl_button_up().
void gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::initialize_state | ( | const bool | is_down | ) |
Initializes the state of the button.
is_down | The initial state of the button, if true down else initialized as up. |
Definition at line 430 of file distributor.cpp.
|
private |
Definition at line 574 of file distributor.cpp.
References DBG_GUI_E, gui2::settings::double_click_time, and LOG_HEADER.
|
private |
Definition at line 450 of file distributor.cpp.
References DBG_GUI_E, gui2::twidget::find_at(), LOG_HEADER, and WRN_GUI_E.
|
private |
Definition at line 511 of file distributor.cpp.
References DBG_GUI_E, gui2::twidget::find_at(), LOG_HEADER, and WRN_GUI_E.
|
protected |
If the mouse isn't captured we need to verify the up is on the same widget as the down so we send a proper click, also needed to send the up to the right widget.
Definition at line 187 of file distributor.hpp.
|
private |
Is the button down?
Definition at line 194 of file distributor.hpp.
|
protected |
The time of the last click used for double clicking.
Definition at line 177 of file distributor.hpp.
|
protected |
The widget the last click was on, used for double clicking.
Definition at line 180 of file distributor.hpp.
|
private |
used for debug messages.
Definition at line 191 of file distributor.hpp.
|
private |
Definition at line 196 of file distributor.hpp.
|
private |
Definition at line 201 of file distributor.hpp.