![]() |
Humble Framework for SkyOS |
#include <HMenu.h>
Inheritance diagram for HMenuBar:

Definition at line 271 of file HMenu.h.
Public Member Functions | |
| ErrCode | AddMenu (int32 nID, StringPtr pstrLabel, HMenuPtr &pMenu) |
| Adds a new menu to the menu bar. | |
| ErrCode | Destroy (void) |
| Destroys the menu bar. | |
| ErrCode | RemoveMenu (int32 nID) |
| Removes a menu with the specific ID. | |
| HMenuPtr | GetMenu (int32 nID) |
| Returns a pointer to a menu with a given ID#. | |
| int32 | GetMenuCount (void) const |
| Returns the count of menus currently in the menu bar. | |
| HMenuPtr | GetMenuByCommand (int32 nCmd) |
| Returns a pointer to the menu that contains the requested command. | |
| HMenuPtr | GetNthMenu (int32 index) |
| Returns a pointer to a menu with a given offset. | |
Protected Types | |
| typedef std::map< int32, HMenuPtr > | HMenuMap |
Protected Attributes | |
| HMenuMap | m_menus |
| STL map of menu objects. | |
|
||||||||||||||||
|
Adds a menu with the specified ID and label to the menu bar. The menus must be added in order, and if the menu already exists, it is NOT added again.
|
|
|
Destroys the menu bar and all associated menu objects
Reimplemented from HWidget. |
|
|
Searches the array of menus and removes the first menu with the requested ID #.
|
|
|
Searches the array of menus and returns the first menu with the given ID#. Note that not finding the desired menu isn't an error, because the caller may be trying to verify that a menu doesn't already exist.
|
|
|
|
|
|
Searches the array of menus and returns a ptr to the menu that contains the requested command, or NULL if the command is not associated with any menu. If the same command appears in more than one menu--which is allowed but not recommended--only the first one will be returned.
|
|
|
Searches the array of menus and returns the menu at the requested index
|
2006.01.09-16:37