Om
1.0.0
A universal framework for multimedia simulation
|
A class that contains function objects that recieve menu item events. More...
#include <omGUIMenuItem.h>
Public Member Functions | |
Delegate () | |
Create a new menu item delegate with no function callbacks set. More... | |
Delegate (const Function< void(MenuItem &)> &newSelect) | |
Create a new menu item delegate that responds to the specified function when the item is selected. More... | |
Public Attributes | |
Function< void(MenuItem &)> | select |
A function object that is called whenever an attached menu item is selected by the user. More... | |
UserData | data |
An object that stores an opaque pointer to delegate data. More... | |
A class that contains function objects that recieve menu item events.
Any menu-item-related event that might be processed has an appropriate callback function object. Each callback function is called by the GUI event thread whenever such an event is received. If a callback function in the delegate is not initialized, a menu item simply ignores it.
It must be noted that the callback functions are asynchronous and not thread-safe. Thus, it is necessary to perform any additional synchronization externally.
|
inline |
Create a new menu item delegate with no function callbacks set.
|
inline |
Create a new menu item delegate that responds to the specified function when the item is selected.
A function object that is called whenever an attached menu item is selected by the user.
UserData om::gui::objects::MenuItem::Delegate::data |
An object that stores an opaque pointer to delegate data.