VSTGUI
4.4
Graphical User Interface Framework not only for VST plugins
|
a command menu item More...
Public Member Functions | |
CCommandMenuItem (UTF8StringPtr title, UTF8StringPtr keycode=0, int32_t keyModifiers=0, CBitmap *icon=0, int32_t flags=kNoFlags, CBaseObject *target=0, IdStringPtr commandCategory=0, IdStringPtr commandName=0) | |
CCommandMenuItem (UTF8StringPtr title, COptionMenu *submenu, CBitmap *icon=0, CBaseObject *target=0, IdStringPtr commandCategory=0, IdStringPtr commandName=0) | |
CCommandMenuItem (UTF8StringPtr title, int32_t tag, CBaseObject *target=0, IdStringPtr commandCategory=0, IdStringPtr commandName=0) | |
CCommandMenuItem (UTF8StringPtr title, CBaseObject *target=0, IdStringPtr commandCategory=0, IdStringPtr commandName=0) | |
CCommandMenuItem (const CCommandMenuItem &item) | |
~CCommandMenuItem () | |
void | execute () |
void | validate () |
CCommandMenuItem Methods | |
void | setCommandCategory (IdStringPtr category) |
IdStringPtr | getCommandCategory () const |
bool | isCommandCategory (IdStringPtr category) const |
void | setCommandName (IdStringPtr name) |
IdStringPtr | getCommandName () const |
bool | isCommandName (IdStringPtr name) const |
void | setTarget (CBaseObject *target) |
CBaseObject * | getTarget () const |
![]() | |
CMenuItem (UTF8StringPtr title, UTF8StringPtr keycode=0, int32_t keyModifiers=0, CBitmap *icon=0, int32_t flags=kNoFlags) | |
CMenuItem constructor. More... | |
CMenuItem (UTF8StringPtr title, COptionMenu *submenu, CBitmap *icon=0) | |
CMenuItem constructor. More... | |
CMenuItem (UTF8StringPtr title, int32_t tag) | |
CMenuItem constructor. More... | |
CMenuItem (const CMenuItem &item) | |
CMenuItem copy constructor. More... | |
virtual void | setTitle (UTF8StringPtr title) |
set title of menu item More... | |
virtual void | setSubmenu (COptionMenu *submenu) |
set submenu of menu item More... | |
virtual void | setKey (UTF8StringPtr keyCode, int32_t keyModifiers=0) |
set keycode and key modifiers of menu item More... | |
virtual void | setVirtualKey (int32_t virtualKeyCode, int32_t keyModifiers=0) |
set virtual keycode and key modifiers of menu item More... | |
virtual void | setEnabled (bool state=true) |
set menu item enabled state More... | |
virtual void | setChecked (bool state=true) |
set menu item checked state More... | |
virtual void | setIsTitle (bool state=true) |
set menu item title state More... | |
virtual void | setIsSeparator (bool state=true) |
set menu item separator state More... | |
virtual void | setIcon (CBitmap *icon) |
set menu item icon More... | |
virtual void | setTag (int32_t tag) |
set menu item tag More... | |
bool | isEnabled () const |
returns whether the item is enabled or not More... | |
bool | isChecked () const |
returns whether the item is checked or not More... | |
bool | isTitle () const |
returns whether the item is a title item or not More... | |
bool | isSeparator () const |
returns whether the item is a separator or not More... | |
UTF8StringPtr | getTitle () const |
returns the title of the item More... | |
int32_t | getKeyModifiers () const |
returns the key modifiers of the item More... | |
UTF8StringPtr | getKeycode () const |
returns the keycode of the item More... | |
int32_t | getVirtualKeyCode () const |
returns the virtual keycode of the item More... | |
COptionMenu * | getSubmenu () const |
returns the submenu of the item More... | |
CBitmap * | getIcon () const |
returns the icon of the item More... | |
int32_t | getTag () const |
returns the tag of the item More... | |
![]() | |
CBaseObject () | |
virtual | ~CBaseObject () |
virtual void | beforeDelete () |
virtual void | forget () |
decrease refcount and delete object if refcount == 0 More... | |
virtual void | remember () |
increase refcount More... | |
virtual int32_t | getNbReference () const |
get refcount More... | |
virtual CMessageResult | notify (CBaseObject *sender, IdStringPtr message) |
Static Public Attributes | |
static IdStringPtr | kMsgMenuItemValidate = "kMsgMenuItemValidate" |
message send to the target before the item is shown More... | |
static IdStringPtr | kMsgMenuItemSelected = "kMsgMenuItemSelected" |
message send to the target when this item was selected More... | |
Protected Attributes | |
CBaseObject * | target |
char * | commandCategory |
char * | commandName |
![]() | |
UTF8StringBuffer | title |
UTF8StringBuffer | keyCode |
COptionMenu * | submenu |
CBitmap * | icon |
int32_t | flags |
int32_t | keyModifiers |
int32_t | virtualKeyCode |
int32_t | tag |
Additional Inherited Members | |
![]() | |
enum | Flags { kNoFlags = 0, kDisabled = 1 << 0, kTitle = 1 << 1, kChecked = 1 << 2, kSeparator = 1 << 3 } |
![]() | |
~CMenuItem () | |
a command menu item
The CCommandMenuItem supports setting a category, name and a target. The target will get a notify() call before the item is displayed and after it was selected.
CCommandMenuItem | ( | UTF8StringPtr | title, |
UTF8StringPtr | keycode = 0 , |
||
int32_t | keyModifiers = 0 , |
||
CBitmap * | icon = 0 , |
||
int32_t | flags = kNoFlags , |
||
CBaseObject * | target = 0 , |
||
IdStringPtr | commandCategory = 0 , |
||
IdStringPtr | commandName = 0 |
||
) |
CCommandMenuItem | ( | UTF8StringPtr | title, |
COptionMenu * | submenu, | ||
CBitmap * | icon = 0 , |
||
CBaseObject * | target = 0 , |
||
IdStringPtr | commandCategory = 0 , |
||
IdStringPtr | commandName = 0 |
||
) |
CCommandMenuItem | ( | UTF8StringPtr | title, |
int32_t | tag, | ||
CBaseObject * | target = 0 , |
||
IdStringPtr | commandCategory = 0 , |
||
IdStringPtr | commandName = 0 |
||
) |
CCommandMenuItem | ( | UTF8StringPtr | title, |
CBaseObject * | target = 0 , |
||
IdStringPtr | commandCategory = 0 , |
||
IdStringPtr | commandName = 0 |
||
) |
CCommandMenuItem | ( | const CCommandMenuItem & | item | ) |
~CCommandMenuItem | ( | ) |
void execute | ( | ) |
|
inline |
|
inline |
|
inline |
bool isCommandCategory | ( | IdStringPtr | category | ) | const |
bool isCommandName | ( | IdStringPtr | name | ) | const |
void setCommandCategory | ( | IdStringPtr | category | ) |
void setCommandName | ( | IdStringPtr | name | ) |
void setTarget | ( | CBaseObject * | target | ) |
void validate | ( | ) |
|
protected |
|
protected |
|
static |
message send to the target when this item was selected
|
static |
message send to the target before the item is shown
|
protected |