VSTGUI  4.3
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:
+ Collaboration diagram for CCommandMenuItem:

Public Types

enum  Flags {
  kNoFlags = 0, kDisabled = 1 << 0, kTitle = 1 << 1, kChecked = 1 << 2,
  kSeparator = 1 << 3
}
 

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 ()
 
virtual void beforeDelete ()
 
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
 
CMenuItem Methods
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...
 
Reference Counting Methods
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...
 
Message Methods
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
 
UTF8StringBuffer title
 
UTF8StringBuffer keyCode
 
COptionMenusubmenu
 
CBitmapicon
 
int32_t flags
 
int32_t keyModifiers
 
int32_t virtualKeyCode
 
int32_t tag
 

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

Member Enumeration Documentation

enum Flags
inherited
Enumerator
kNoFlags 
kDisabled 

item is gray and not selectable

kTitle 

item indicates a title and is not selectable

kChecked 

item has a checkmark

kSeparator 

item is a separator

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 
)

+ Here is the call graph for this function:

CCommandMenuItem ( UTF8StringPtr  title,
COptionMenu submenu,
CBitmap icon = 0,
CBaseObject target = 0,
IdStringPtr  commandCategory = 0,
IdStringPtr  commandName = 0 
)

+ Here is the call graph for this function:

CCommandMenuItem ( UTF8StringPtr  title,
int32_t  tag,
CBaseObject target = 0,
IdStringPtr  commandCategory = 0,
IdStringPtr  commandName = 0 
)

+ Here is the call graph for this function:

CCommandMenuItem ( UTF8StringPtr  title,
CBaseObject target = 0,
IdStringPtr  commandCategory = 0,
IdStringPtr  commandName = 0 
)

+ Here is the call graph for this function:

+ Here is the call graph for this function:

+ Here is the call graph for this function:

Member Function Documentation

virtual void beforeDelete ( )
inlinevirtualinherited

Reimplemented in CView.

+ Here is the caller graph for this function:

void execute ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void forget ( )
inlinevirtualinherited

decrease refcount and delete object if refcount == 0

+ Here is the call graph for this function:

IdStringPtr getCommandCategory ( ) const
inline

+ Here is the caller graph for this function:

IdStringPtr getCommandName ( ) const
inline

+ Here is the caller graph for this function:

CBitmap* getIcon ( ) const
inlineinherited

returns the icon of the item

+ Here is the caller graph for this function:

UTF8StringPtr getKeycode ( ) const
inlineinherited

returns the keycode of the item

+ Here is the caller graph for this function:

int32_t getKeyModifiers ( ) const
inlineinherited

returns the key modifiers of the item

+ Here is the caller graph for this function:

virtual int32_t getNbReference ( ) const
inlinevirtualinherited

get refcount

COptionMenu* getSubmenu ( ) const
inlineinherited

returns the submenu of the item

+ Here is the caller graph for this function:

int32_t getTag ( ) const
inlineinherited

returns the tag of the item

+ Here is the caller graph for this function:

CBaseObject* getTarget ( ) const
inline

+ Here is the caller graph for this function:

UTF8StringPtr getTitle ( ) const
inlineinherited

returns the title of the item

+ Here is the caller graph for this function:

int32_t getVirtualKeyCode ( ) const
inlineinherited

returns the virtual keycode of the item

+ Here is the caller graph for this function:

bool isChecked ( ) const
inlineinherited

returns whether the item is checked or not

+ Here is the caller graph for this function:

bool isCommandCategory ( IdStringPtr  category) const
bool isCommandName ( IdStringPtr  name) const
bool isEnabled ( ) const
inlineinherited

returns whether the item is enabled or not

+ Here is the caller graph for this function:

bool isSeparator ( ) const
inlineinherited

returns whether the item is a separator or not

+ Here is the caller graph for this function:

bool isTitle ( ) const
inlineinherited

returns whether the item is a title item or not

+ Here is the caller graph for this function:

virtual void remember ( )
inlinevirtualinherited

increase refcount

+ Here is the caller graph for this function:

void setChecked ( bool  state = true)
virtualinherited

set menu item checked state

+ Here is the caller graph for this function:

void setCommandCategory ( IdStringPtr  category)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setCommandName ( IdStringPtr  name)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setEnabled ( bool  state = true)
virtualinherited

set menu item enabled state

+ Here is the caller graph for this function:

void setIcon ( CBitmap icon)
virtualinherited

set menu item icon

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setIsSeparator ( bool  state = true)
virtualinherited

set menu item separator state

void setIsTitle ( bool  state = true)
virtualinherited

set menu item title state

void setKey ( UTF8StringPtr  keyCode,
int32_t  keyModifiers = 0 
)
virtualinherited

set keycode and key modifiers of menu item

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSubmenu ( COptionMenu submenu)
virtualinherited

set submenu of menu item

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setTag ( int32_t  tag)
virtualinherited

set menu item tag

+ Here is the caller graph for this function:

void setTarget ( CBaseObject target)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setTitle ( UTF8StringPtr  title)
virtualinherited

set title of menu item

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setVirtualKey ( int32_t  virtualKeyCode,
int32_t  keyModifiers = 0 
)
virtualinherited

set virtual keycode and key modifiers of menu item

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void validate ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

char* commandCategory
protected
char* commandName
protected
int32_t flags
protectedinherited
CBitmap* icon
protectedinherited
UTF8StringBuffer keyCode
protectedinherited
int32_t keyModifiers
protectedinherited
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

COptionMenu* submenu
protectedinherited
int32_t tag
protectedinherited
CBaseObject* target
protected
UTF8StringBuffer title
protectedinherited
int32_t virtualKeyCode
protectedinherited

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