Event class for action events. More...
#include <gui_tk.h>
Public Member Functions | |
template<typename STR > | |
ActionEventSource (const STR name) | |
Create a named event source. | |
virtual | ~ActionEventSource () |
Dummy destructor. | |
void | addActionHandler (ActionEventSource_Callback *handler) |
Add a button press event handler. | |
void | removeActionHandler (ActionEventSource_Callback *handler) |
Remove a button press event handler. | |
template<typename STR > | |
void | setName (const STR name) |
Set the name of this event source. | |
const String & | getName () const |
Get the name of this event source. | |
void | executeAction (const String &arg) |
Execute handlers. | |
void | executeAction () |
Execute handlers. | |
Protected Attributes | |
std::list < ActionEventSource_Callback * > | actionHandlers |
List of registered action handlers. | |
String | name |
This event source's name. |
Event class for action events.
Action events are events generated by GUI elements like Buttons, Menus and by pressing Enter in an Input. All of these are handled similarly: The source of such an event has a name, and the Event may also be connected with a String describing what was executed, like the name of the Menu entry or the contents of the Input.
String GUI::ActionEventSource::name [protected] |
This event source's name.
The name is primarily meant for your own purposes, for example identification of the activated element. One exception are Menubars, which display the name of their Menus.
Definition at line 1492 of file gui_tk.h.
Referenced by GUI::Checkbox::execute(), executeAction(), and getName().