![]() |
Clapkit
|
Defines an item on the menu (i.e. "Save", "Quit", etc..) More...
#include <ckMenu.h>
Public Member Functions | |
CKMenuItem (const char *text, char shortcut, CKEventHandlerFunc callback) | |
CKMenuItem (CKMenuItemType type) | |
virtual | ~CKMenuItem () |
void | SetText (const char *text) |
void | DoCallback (CKApp *app) |
![]() | |
CKObject () | |
virtual | ~CKObject () |
virtual void | AddHandler (CKEventType type, CKEventHandlerFunc cb) |
virtual void | RemoveHandler (CKEventType type) |
virtual bool | HasHandler (CKEventType type) const |
virtual bool | HandleEvent (const CKEvent &evt) |
virtual void | SetPropertyObserver (CKPropertyObserverFunc cb) |
virtual void | UnsetPropertyObserver () |
virtual void | RaisePropertyChange (const char *propertyName) |
Public Attributes | |
CKProperty< bool > | enabled = true |
CKProperty< char > | shortcut = 0 |
CKProperty< bool > | modifierAlt = false |
CKProperty< bool > | modifierCtrl = false |
CKProperty< CKMenuItemType > | type = CKMenuItemType::Standard |
CKEventHandlerFunc | callback = nullptr |
Protected Member Functions | |
void | __ReflectToOS () |
Protected Attributes | |
char * | text = nullptr |
MenuHandle | __osMenuHandle |
short | __osMenuItemID |
![]() | |
std::map< CKEventType, CKEventHandlerFunc > | __handlers |
CKPropertyObserverFunc | propertyObserverCB = nullptr |
Friends | |
class | CKApp |
Defines an item on the menu (i.e. "Save", "Quit", etc..)
CKMenuItem::CKMenuItem | ( | const char * | text, |
char | shortcut, | ||
CKEventHandlerFunc | callback | ||
) |
CKMenuItem::CKMenuItem | ( | CKMenuItemType | type | ) |
|
virtual |
|
protected |
void CKMenuItem::DoCallback | ( | CKApp * | app | ) |
void CKMenuItem::SetText | ( | const char * | text | ) |
|
friend |
|
protected |
|
protected |
CKEventHandlerFunc CKMenuItem::callback = nullptr |
CKProperty<bool> CKMenuItem::enabled = true |
CKProperty<bool> CKMenuItem::modifierAlt = false |
CKProperty<bool> CKMenuItem::modifierCtrl = false |
CKProperty<char> CKMenuItem::shortcut = 0 |
|
protected |
CKProperty<CKMenuItemType> CKMenuItem::type = CKMenuItemType::Standard |