This reference page is linked to from the following overview topics: Classes Involved in the Action System.
Provides an easy mechanism for plug-ins to produce the menu needed in the ActionItem::GetDynamicMenu() method.
The constructor of this class is used to create the menu and the ActionItem::GetMenu() method returns the appropriate IMenu pointer.
#include <actiontable.h>

Public Types |
|
| enum | DynamicMenuFlags { kDisabled = 1 << 0, kChecked = 1 << 1, kSeparator = 1 << 2 } |
|
Constants used in AddItem. More... |
|
Public Member Functions |
|
| CoreExport | DynamicMenu (DynamicMenuCallback *pCallback) |
| Constructor. |
|
| CoreExport IMenu * | GetMenu () |
| This is the value returned from
ActionItem::GetDynamicMenu(). |
|
| CoreExport void | AddItem (DWORD flags, UINT itemId, MCHAR *pItemTitle) |
| Adds an item to the dynamic menu. |
|
| CoreExport void | BeginSubMenu (MCHAR *pTitle) |
| This begins a new sub menu. |
|
| CoreExport void | EndSubMenu () |
| Ends construction of a sub menu. |
|
| enum DynamicMenuFlags |
Constants used in AddItem.
{
kDisabled = 1 << 0, //< Item is disabled (can't be selected)
kChecked = 1 << 1, //< Item has a check mark beside it or is pressed
kSeparator = 1 << 2, //< Item is a seperator between the previous menu item and the next one.
};
| CoreExport DynamicMenu | ( | DynamicMenuCallback * | pCallback | ) |
Constructor.
| pCallback | Points to the instance of the DynamicMenuCallback class that handles the menu selection. |
| CoreExport IMenu* GetMenu | ( | ) |
This is the value returned from ActionItem::GetDynamicMenu().
This method may be called after menu creation to get a pointer to the IMenu created.
| CoreExport void AddItem | ( | DWORD | flags, |
| UINT | itemId, | ||
| MCHAR * | pItemTitle | ||
| ) |
Adds an item to the dynamic menu.
| flags | One or more of the DynamicMenuFlags. |
| itemId | The ID for the menu item. |
| pItemTitle | The name to appear for the menu item. |
| CoreExport void BeginSubMenu | ( | MCHAR * | pTitle | ) |
This begins a new sub menu.
Items added after this call will appear as sub choices of this one until EndSubMenu() is called.
| pTitle | The name to appear for the sub menu item. |
| CoreExport void EndSubMenu | ( | ) |
Ends construction of a sub menu.
Items added after this call will appear as they did prior to calling BeginSubMenu().