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:
parent
794822a8b5
commit
e76877adae
@ -95,6 +95,7 @@ class Menu {
|
||||
int32 IndexOf(MenuItem *item);
|
||||
int32 CountItems() const;
|
||||
|
||||
MenuItem *FindItem(const char *label);
|
||||
MenuItem *FindMarked();
|
||||
MenuItem *FindSelected(int32 *_index = NULL);
|
||||
|
||||
@ -104,6 +105,9 @@ class Menu {
|
||||
MenuItem *RemoveItemAt(int32 index);
|
||||
void RemoveItem(MenuItem *item);
|
||||
|
||||
MenuItem *Superitem() const { return fSuperItem; }
|
||||
Menu *Supermenu() const { return fSuperItem ? fSuperItem->fMenu : NULL; }
|
||||
|
||||
const char *Title() const { return fTitle; }
|
||||
|
||||
void Run();
|
||||
@ -117,6 +121,7 @@ class Menu {
|
||||
bool fIsHidden;
|
||||
MenuItemList fItems;
|
||||
menu_type fType;
|
||||
MenuItem *fSuperItem;
|
||||
};
|
||||
|
||||
#endif /* KERNEL_BOOT_MENU_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user