#include <distributor.hpp>
Public Member Functions | |
mouse_button (widget &owner, const dispatcher::queue_position queue_position) | |
void | initialize_state (int32_t button_state) |
Initializes the state of the button. More... | |
Public Member Functions inherited from gui2::event::mouse_motion | |
mouse_motion (widget &owner, const dispatcher::queue_position queue_position) | |
~mouse_motion () | |
void | capture_mouse (const bool capture=true) |
Captures the mouse input. More... | |
Protected Attributes | |
std::chrono::steady_clock::time_point | last_click_stamp_ |
The time of the last click used for double clicking. More... | |
widget * | last_clicked_widget_ |
The widget the last click was on, used for double clicking. More... | |
widget * | 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::mouse_motion | |
widget * | mouse_focus_ |
The widget that currently has the mouse focus_. More... | |
bool | mouse_captured_ |
Did the current widget capture the focus_? More... | |
widget & | owner_ |
The widget that owns us. More... | |
std::size_t | hover_timer_ |
The timer for the hover event. More... | |
widget * | hover_widget_ |
The widget which should get the hover event. More... | |
point | 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::ui_event event, bool &handled, const point &coordinate) |
void | signal_handler_sdl_button_up (const event::ui_event event, bool &handled, const point &coordinate) |
void | mouse_button_click (widget *widget) |
Private Attributes | |
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::mouse_motion | |
void | start_hover_timer (widget *widget, const point &coordinate) |
Starts the hover timer. More... | |
void | stop_hover_timer () |
Stops the current hover timer. More... | |
void | mouse_enter (widget *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 149 of file distributor.hpp.
gui2::event::mouse_button< I >::mouse_button | ( | widget & | owner, |
const dispatcher::queue_position | queue_position | ||
) |
void gui2::event::mouse_button< I >::initialize_state | ( | int32_t | button_state | ) |
Initializes the state of the button.
button_state | The initial state of all buttons, in which the bit corresponding to mouse_button_event_types.mask will be set if the button is down, or unset if it is up. |
Definition at line 436 of file distributor.cpp.
Referenced by gui2::event::distributor::initialize_state().
|
private |
Definition at line 553 of file distributor.cpp.
References button_click_event, button_double_click_event, DBG_GUI_E, gui2::settings::double_click_time, and LOG_HEADER.
|
private |
Definition at line 446 of file distributor.cpp.
References button_down_event, DBG_GUI_E, gui2::widget::find_at(), LOG_HEADER, and WRN_GUI_E.
Referenced by gui2::event::mouse_button< I >::mouse_button().
|
private |
Definition at line 497 of file distributor.cpp.
References button_up_event, DBG_GUI_E, gui2::widget::find_at(), sdl::get_mouse_button_mask(), LOG_HEADER, and WRN_GUI_E.
Referenced by gui2::event::mouse_button< I >::mouse_button().
|
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 174 of file distributor.hpp.
Referenced by gui2::event::distributor::signal_handler_notify_removal().
|
private |
Is the button down?
Definition at line 178 of file distributor.hpp.
|
protected |
The time of the last click used for double clicking.
Definition at line 164 of file distributor.hpp.
|
protected |
The widget the last click was on, used for double clicking.
Definition at line 167 of file distributor.hpp.
Referenced by gui2::event::distributor::signal_handler_notify_removal().
|
private |
Definition at line 180 of file distributor.hpp.
|
private |
Definition at line 183 of file distributor.hpp.