|
VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
|
a menu item More...
#include <coptionmenu.h>
Inheritance diagram for CMenuItem:Classes | |
| struct | Impl |
Public Types | |
| enum | Flags { kNoFlags = 0 , kDisabled = 1 << 0 , kTitle = 1 << 1 , kChecked = 1 << 2 , kSeparator = 1 << 3 } |
Public Member Functions | |
| CMenuItem (const UTF8String &title, const UTF8String &keycode="", int32_t keyModifiers=0, CBitmap *icon=nullptr, int32_t flags=kNoFlags) | |
| CMenuItem constructor. | |
| CMenuItem (const UTF8String &title, COptionMenu *submenu, CBitmap *icon=nullptr) | |
| CMenuItem constructor. | |
| CMenuItem (const UTF8String &title, int32_t tag) | |
| CMenuItem constructor. | |
| CMenuItem (const CMenuItem &item) | |
| CMenuItem copy constructor. | |
Public Member Functions inherited from CBaseObject | |
| CBaseObject ()=default | |
| ~CBaseObject () noexcept override=default | |
| CBaseObject (const CBaseObject &) | |
| CBaseObject & | operator= (const CBaseObject &) |
| virtual CMessageResult | notify (CBaseObject *sender, IdStringPtr message) |
Public Member Functions inherited from ReferenceCounted< int32_t > | |
| ReferenceCounted ()=default | |
| virtual | ~ReferenceCounted () noexcept=default |
| ReferenceCounted (const ReferenceCounted &) | |
| ReferenceCounted & | operator= (const ReferenceCounted &) |
| ReferenceCounted ()=default | |
| ReferenceCounted (const ReferenceCounted &) | |
| virtual | ~ReferenceCounted () noexcept=default |
| ReferenceCounted & | operator= (const ReferenceCounted &) |
| void | forget () override |
| decrease refcount and delete object if refcount == 0 | |
| void | remember () override |
| increase refcount | |
| virtual int32_t | getNbReference () const |
| get refcount | |
| void | forget () override |
| decrease refcount and delete object if refcount == 0 | |
| void | remember () override |
| increase refcount | |
| virtual int32_t | getNbReference () const |
| get refcount | |
CMenuItem Methods | |
| std::unique_ptr< Impl > | impl |
| virtual void | setTitle (const UTF8String &title) |
| set title of menu item | |
| virtual void | setSubmenu (COptionMenu *submenu) |
| set submenu of menu item | |
| virtual void | setKey (const UTF8String &keyCode, int32_t keyModifiers=0) |
| set keycode and key modifiers of menu item | |
| virtual void | setVirtualKey (VirtualKey virtualKey, int32_t keyModifiers=0) |
| set virtual key 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 | |
| const UTF8String & | getTitle () const |
| returns the title of the item | |
| int32_t | getKeyModifiers () const |
| returns the key modifiers of the item | |
| const UTF8String & | getKeycode () const |
| returns the keycode of the item | |
| VirtualKey | getVirtualKey () const |
| returns the virtual key 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 | |
| int32_t | getVirtualKeyCode () const |
| virtual void | setVirtualKey (int32_t virtualKeyCode, int32_t keyModifiers=0) |
| CMenuItem () | |
| ~CMenuItem () noexcept override | |
a menu item
Defines an item of a VSTGUI::COptionMenu
| enum Flags |
| CMenuItem | ( | const UTF8String & | inTitle, |
| const UTF8String & | inKeycode = "", | ||
| int32_t | inKeyModifiers = 0, | ||
| CBitmap * | inIcon = nullptr, | ||
| 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 | ( | const UTF8String & | inTitle, |
| COptionMenu * | inSubmenu, | ||
| CBitmap * | inIcon = nullptr ) |
CMenuItem constructor.
| inTitle | title of item |
| inSubmenu | submenu of item |
| inIcon | icon of item |
| CMenuItem | ( | const UTF8String & | inTitle, |
| int32_t | inTag ) |
CMenuItem constructor.
| inTitle | title of item |
| inTag | tag of item |
|
protected |
|
overrideprotecteddefaultnoexcept |
| CBitmap * getIcon | ( | ) | const |
returns the icon of the item
| const UTF8String & getKeycode | ( | ) | const |
returns the keycode of the item
| int32_t getKeyModifiers | ( | ) | const |
returns the key modifiers of the item
| COptionMenu * getSubmenu | ( | ) | const |
returns the submenu of the item
| int32_t getTag | ( | ) | const |
returns the tag of the item
| const UTF8String & getTitle | ( | ) | const |
returns the title of the item
| VirtualKey getVirtualKey | ( | ) | const |
returns the virtual key of the item
| int32_t getVirtualKeyCode | ( | ) | const |
| bool isChecked | ( | ) | const |
returns whether the item is checked or not
| bool isEnabled | ( | ) | const |
returns whether the item is enabled or not
| bool isSeparator | ( | ) | const |
returns whether the item is a separator or not
| bool isTitle | ( | ) | const |
returns whether the item is a title item or not
|
virtual |
set menu item checked state
|
virtual |
set menu item enabled state
|
virtual |
set menu item icon
|
virtual |
set menu item separator state
|
virtual |
set menu item title state
|
virtual |
set keycode and key modifiers of menu item
|
virtual |
set submenu of menu item
|
virtual |
set menu item tag
|
virtual |
set title of menu item
|
virtual |
|
virtual |
set virtual key and key modifiers of menu item
|
protected |