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:
@@ -38,6 +38,9 @@ class MenuItem {
|
|||||||
void SetType(menu_item_type type);
|
void SetType(menu_item_type type);
|
||||||
menu_item_type Type() const { return fType; }
|
menu_item_type Type() const { return fType; }
|
||||||
|
|
||||||
|
void SetData(void *data);
|
||||||
|
void *Data() const { return fData; }
|
||||||
|
|
||||||
const char *Label() const { return fLabel; }
|
const char *Label() const { return fLabel; }
|
||||||
Menu *Submenu() const { return fSubMenu; }
|
Menu *Submenu() const { return fSubMenu; }
|
||||||
|
|
||||||
@@ -53,6 +56,7 @@ class MenuItem {
|
|||||||
bool fIsSelected;
|
bool fIsSelected;
|
||||||
menu_item_type fType;
|
menu_item_type fType;
|
||||||
Menu *fMenu, *fSubMenu;
|
Menu *fMenu, *fSubMenu;
|
||||||
|
void *fData;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef DoublyLinked::List<MenuItem> MenuItemList;
|
typedef DoublyLinked::List<MenuItem> MenuItemList;
|
||||||
|
|||||||
Reference in New Issue
Block a user