MenuBase
Base class of menu bar and popup menu.
| Header | #include "nativeui/menu_base.h" |
| Namespace | namespace nu |
| Type | class (RefCounted) |
Methods
void Append(scoped_refptr<MenuItem> item)
Append the item to the menu.
Parameters
void Insert(scoped_refptr<MenuItem> item, int index)
Insert the item at index to the menu.
Parameters
scoped_refptr<MenuItem>itemintindex
void Remove(MenuItem* item)
Remove the item from the menu.
Parameters
MenuItem*item
int ItemCount() const
Return the count of items in the menu.
Return
intMenuItem* ItemAt(int index) const
Return the item at index.
Parameters
intindex
Return
MenuItem*NativeMenu GetNative() const
Return the native instance wrapped by the class.
Return
NativeMenu