Added a function to find a menu item by label.
Added super item/menu getters, and a new fSuperItem field. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9524 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -95,6 +95,7 @@ class Menu {
|
|||||||
int32 IndexOf(MenuItem *item);
|
int32 IndexOf(MenuItem *item);
|
||||||
int32 CountItems() const;
|
int32 CountItems() const;
|
||||||
|
|
||||||
|
MenuItem *FindItem(const char *label);
|
||||||
MenuItem *FindMarked();
|
MenuItem *FindMarked();
|
||||||
MenuItem *FindSelected(int32 *_index = NULL);
|
MenuItem *FindSelected(int32 *_index = NULL);
|
||||||
|
|
||||||
@@ -104,6 +105,9 @@ class Menu {
|
|||||||
MenuItem *RemoveItemAt(int32 index);
|
MenuItem *RemoveItemAt(int32 index);
|
||||||
void RemoveItem(MenuItem *item);
|
void RemoveItem(MenuItem *item);
|
||||||
|
|
||||||
|
MenuItem *Superitem() const { return fSuperItem; }
|
||||||
|
Menu *Supermenu() const { return fSuperItem ? fSuperItem->fMenu : NULL; }
|
||||||
|
|
||||||
const char *Title() const { return fTitle; }
|
const char *Title() const { return fTitle; }
|
||||||
|
|
||||||
void Run();
|
void Run();
|
||||||
@@ -117,6 +121,7 @@ class Menu {
|
|||||||
bool fIsHidden;
|
bool fIsHidden;
|
||||||
MenuItemList fItems;
|
MenuItemList fItems;
|
||||||
menu_type fType;
|
menu_type fType;
|
||||||
|
MenuItem *fSuperItem;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* KERNEL_BOOT_MENU_H */
|
#endif /* KERNEL_BOOT_MENU_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user