Small concept class. More...
#include <clickable_item.hpp>
Public Member Functions | |
virtual | ~clickable_item () |
virtual void | connect_click_handler (const event::signal &signal)=0 |
Connects a signal handler for a 'click' event. More... | |
virtual void | disconnect_click_handler (const event::signal &signal)=0 |
Disconnects a signal handler for a 'click' event. More... | |
Small concept class.
Parts of the engine inherit this class so we can have generic clickable items. This is mainly for the button and the repeating button classes.
The reason for having the click functions here is that not all subclasses need to implement the click event in the same way; e.g. the repeating button clicks on the mouse down event and the normal button on the mouse click event.
Common signal handlers:
Definition at line 39 of file clickable_item.hpp.
|
inlinevirtual |
Definition at line 42 of file clickable_item.hpp.
|
pure virtual |
Connects a signal handler for a 'click' event.
What the click is depends on the subclass.
signal | The signal to connect. |
Implemented in gui2::repeating_button, and gui2::button.
|
pure virtual |
Disconnects a signal handler for a 'click' event.
What the click is depends on the subclass.
signal | The signal to disconnect (should be the same as send to the connect call. |
Implemented in gui2::repeating_button, and gui2::button.