DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Protected Attributes
GUI::ActionEventSource Class Reference

Event class for action events. More...

#include <gui_tk.h>

Inheritance diagram for GUI::ActionEventSource:
GUI::Button GUI::Checkbox GUI::Frame GUI::Input GUI::Menu GUI::Menubar GUI::Radiobox InputWithEnterKey

List of all members.

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 StringgetName () 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.

Detailed Description

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.

Definition at line 1313 of file gui_tk.h.


Member Data Documentation

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 1321 of file gui_tk.h.

Referenced by GUI::Checkbox::execute(), executeAction(), and getName().


The documentation for this class was generated from the following file: