VSTGUI  4.4
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
CCommandMenuItem Class Reference

a command menu item More...

+ Inheritance diagram for CCommandMenuItem:

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)
 
CBaseObjectgetTarget () const
 
- Public Member Functions inherited from CMenuItem
 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...
 
COptionMenugetSubmenu () const
 returns the submenu of the item More...
 
CBitmapgetIcon () const
 returns the icon of the item More...
 
int32_t getTag () const
 returns the tag of the item More...
 
- Public Member Functions inherited from CBaseObject
 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

CBaseObjecttarget
 
char * commandCategory
 
char * commandName
 
- Protected Attributes inherited from CMenuItem
UTF8StringBuffer title
 
UTF8StringBuffer keyCode
 
COptionMenusubmenu
 
CBitmapicon
 
int32_t flags
 
int32_t keyModifiers
 
int32_t virtualKeyCode
 
int32_t tag
 

Additional Inherited Members

- Public Types inherited from CMenuItem
enum  Flags {
  kNoFlags = 0, kDisabled = 1 << 0, kTitle = 1 << 1, kChecked = 1 << 2,
  kSeparator = 1 << 3
}
 
- Protected Member Functions inherited from CMenuItem
 ~CMenuItem ()
 

Detailed Description

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.

See also
CCommandMenuItem::kMsgMenuItemValidate and
CCommandMenuItem::kMsgMenuItemSelected

Constructor & Destructor Documentation

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 
)

Member Function Documentation

void execute ( )
IdStringPtr getCommandCategory ( ) const
inline
IdStringPtr getCommandName ( ) const
inline
CBaseObject* getTarget ( ) const
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 ( )

Member Data Documentation

char* commandCategory
protected
char* commandName
protected
IdStringPtr kMsgMenuItemSelected = "kMsgMenuItemSelected"
static

message send to the target when this item was selected

IdStringPtr kMsgMenuItemValidate = "kMsgMenuItemValidate"
static

message send to the target before the item is shown

CBaseObject* target
protected

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