a menu item More...


Public Types | |
| enum | Flags { kNoFlags = 0, kDisabled = 1 << 0, kTitle = 1 << 1, kChecked = 1 << 2, kSeparator = 1 << 3 } |
Public Member Functions | |
| CMenuItem (UTF8StringPtr title, UTF8StringPtr keycode=0, int32_t keyModifiers=0, CBitmap *icon=0, int32_t flags=kNoFlags) | |
| CMenuItem (UTF8StringPtr title, COptionMenu *submenu, CBitmap *icon=0) | |
| CMenuItem (UTF8StringPtr title, int32_t tag) | |
| CMenuItem (const CMenuItem &item) | |
CMenuItem Methods | |
| virtual void | setTitle (UTF8StringPtr title) |
| set title of menu item | |
| virtual void | setSubmenu (COptionMenu *submenu) |
| set submenu of menu item | |
| virtual void | setKey (UTF8StringPtr keyCode, int32_t keyModifiers=0) |
| set keycode and key modifiers of menu item | |
| virtual void | setEnabled (bool state=true) |
| set menu item enabled state | |
| virtual void | setChecked (bool state=true) |
| set menu item checked state | |
| virtual void | setIsTitle (bool state=true) |
| set menu item title state | |
| virtual void | setIsSeparator (bool state=true) |
| set menu item separator state | |
| virtual void | setIcon (CBitmap *icon) |
| set menu item icon | |
| virtual void | setTag (int32_t tag) |
| set menu item tag | |
| bool | isEnabled () const |
| returns whether the item is enabled or not | |
| bool | isChecked () const |
| returns whether the item is checked or not | |
| bool | isTitle () const |
| returns whether the item is a title item or not | |
| bool | isSeparator () const |
| returns whether the item is a separator or not | |
| UTF8StringPtr | getTitle () const |
| returns the title of the item | |
| int32_t | getKeyModifiers () const |
| returns the key modifiers of the item | |
| UTF8StringPtr | getKeycode () const |
| returns the keycode of the item | |
| COptionMenu * | getSubmenu () const |
| returns the submenu of the item | |
| CBitmap * | getIcon () const |
| returns the icon of the item | |
| int32_t | getTag () const |
| returns the tag of the item | |
Reference Counting Methods | |
| virtual void | forget () |
| decrease refcount and delete object if refcount == 0 | |
| virtual void | remember () |
| increase refcount | |
| virtual int32_t | getNbReference () const |
| get refcount | |
Message Methods | |
| virtual CMessageResult | notify (CBaseObject *sender, IdStringPtr message) |
Protected Member Functions | |
| ~CMenuItem () | |
Protected Attributes | |
| UTF8StringBuffer | title |
| UTF8StringBuffer | keycode |
| COptionMenu * | submenu |
| CBitmap * | icon |
| int32_t | flags |
| int32_t | keyModifiers |
| int32_t | tag |
a menu item
Defines an item of a VSTGUI::COptionMenu
| enum Flags |
| CMenuItem | ( | UTF8StringPtr | inTitle, | |
| UTF8StringPtr | inKeycode = 0, |
|||
| int32_t | inKeyModifiers = 0, |
|||
| CBitmap * | inIcon = 0, |
|||
| int32_t | inFlags = kNoFlags | |||
| ) |
CMenuItem constructor.
| inTitle | title of item | |
| inFlags | CMenuItem::Flags of item | |
| inKeycode | keycode of item | |
| inKeyModifiers | keymodifiers of item | |
| inIcon | icon of item |
| CMenuItem | ( | UTF8StringPtr | inTitle, | |
| COptionMenu * | inSubmenu, | |||
| CBitmap * | inIcon = 0 | |||
| ) |
CMenuItem constructor.
| inTitle | title of item | |
| inSubmenu | submenu of item | |
| inIcon | icon of item |
| CMenuItem | ( | UTF8StringPtr | inTitle, | |
| int32_t | inTag | |||
| ) |
CMenuItem constructor.
| inTitle | title of item | |
| inTag | tag of item |
| ~CMenuItem | ( | ) | [protected] |
| virtual void forget | ( | ) | [inline, virtual, inherited] |
decrease refcount and delete object if refcount == 0
| CBitmap* getIcon | ( | ) | const [inline] |
returns the icon of the item
| UTF8StringPtr getKeycode | ( | ) | const [inline] |
returns the keycode of the item
| int32_t getKeyModifiers | ( | ) | const [inline] |
returns the key modifiers of the item
| virtual int32_t getNbReference | ( | ) | const [inline, virtual, inherited] |
get refcount
| COptionMenu* getSubmenu | ( | ) | const [inline] |
returns the submenu of the item
| int32_t getTag | ( | ) | const [inline] |
returns the tag of the item
| UTF8StringPtr getTitle | ( | ) | const [inline] |
returns the title of the item
| bool isChecked | ( | ) | const [inline] |
returns whether the item is checked or not
| bool isEnabled | ( | ) | const [inline] |
returns whether the item is enabled or not
| bool isSeparator | ( | ) | const [inline] |
returns whether the item is a separator or not
| bool isTitle | ( | ) | const [inline] |
returns whether the item is a title item or not
| virtual CMessageResult notify | ( | CBaseObject * | sender, | |
| IdStringPtr | message | |||
| ) | [inline, virtual, inherited] |
| virtual void remember | ( | ) | [inline, virtual, inherited] |
increase refcount
| void setChecked | ( | bool | state = true |
) | [virtual] |
set menu item checked state
| void setEnabled | ( | bool | state = true |
) | [virtual] |
set menu item enabled state
| void setIcon | ( | CBitmap * | icon | ) | [virtual] |
set menu item icon
| void setIsSeparator | ( | bool | state = true |
) | [virtual] |
set menu item separator state
| void setIsTitle | ( | bool | state = true |
) | [virtual] |
set menu item title state
| void setKey | ( | UTF8StringPtr | keyCode, | |
| int32_t | keyModifiers = 0 | |||
| ) | [virtual] |
set keycode and key modifiers of menu item
| void setSubmenu | ( | COptionMenu * | submenu | ) | [virtual] |
set submenu of menu item
| void setTag | ( | int32_t | tag | ) | [virtual] |
set menu item tag
| void setTitle | ( | UTF8StringPtr | title | ) | [virtual] |
set title of menu item
int32_t flags [protected] |
UTF8StringBuffer keycode [protected] |
int32_t keyModifiers [protected] |
COptionMenu* submenu [protected] |
int32_t tag [protected] |
UTF8StringBuffer title [protected] |
1.6.1