You can now attach an arbitrary data pointer to a menu item.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8104 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
209b374efe
commit
82fc8f393c
@ -38,6 +38,9 @@ class MenuItem {
|
||||
void SetType(menu_item_type type);
|
||||
menu_item_type Type() const { return fType; }
|
||||
|
||||
void SetData(void *data);
|
||||
void *Data() const { return fData; }
|
||||
|
||||
const char *Label() const { return fLabel; }
|
||||
Menu *Submenu() const { return fSubMenu; }
|
||||
|
||||
@ -53,6 +56,7 @@ class MenuItem {
|
||||
bool fIsSelected;
|
||||
menu_item_type fType;
|
||||
Menu *fMenu, *fSubMenu;
|
||||
void *fData;
|
||||
};
|
||||
|
||||
typedef DoublyLinked::List<MenuItem> MenuItemList;
|
||||
|
Loading…
Reference in New Issue
Block a user