![]() | InDesign SDK 20.5 |
#include <IMenuManager.h>

Public Types | |
| enum | { kDefaultIID = IID_IMENUMANAGER } |
Public Member Functions | |
| virtual void | AddMenuItem (ActionID actionID, PMString menuPath, PMReal menuPos, bool16 isDynamic, bool16 isOwnerDraw=kFalse, uint32 iconPluginID=0, uint32 iconRsrcID=0)=0 |
| virtual void | RemoveAllMenusForAction (ActionID actionID)=0 |
| virtual void | RemoveMenuItem (PMString menuPath, ActionID actionID)=0 |
| virtual void | RemoveSubmenuAndChildren (PMString menuPath)=0 |
| virtual void | HandlePopupMenu (PMString popupLabel, GSysPoint whereToPop, GSysPoint mousePoint, bool16 removeDisabledItems=kTrue, IPMUnknown *widget=nil, GSysRect *excludeRect=nil)=0 |
| virtual bool16 | IsMenuUp () const =0 |
| virtual void | RemoveIconOfActionID (ActionID actionID, PMString menuPath)=0 |
| virtual void | SetIconForMenuPath (const ActionID actionID, const PMString menuPath, uint32 iconPluginID=0, uint32 iconRsrcID=0)=0 |
| virtual PMRect | GetMenuBounds (PMString inMenuName)=0 |
| virtual void | ShowMenuItem (PMString menuPath, PMRect &position)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Interface to menu manager.
| pure virtual |
Add a menu item.
| actionID | identifier associated with the menu item; kInvalidActionID for a submenu entry |
| menuPath | to add a menu item, pass the full path of the submenu on which to add the menu item (e.g., "Main:&File"), the name associated with the actionID param will determine the menu item's name (e.g., kSaveActionID for "&Save"); to add a submenu entry, append a ":" to the full path of the submenu including the submenu's name (e.g., "Main:&Edit:Prefere&nces:") and pass kInvalidActionID for the actionID param to add a separator, append a "-" to the full path of the of the submenu on which to add the separator (e.g., "Main:&Edit:-") and pass a valid ActionID for the actionID param (but not one that's registered with the IActionManager) |
| menuPos | the menu position - menu items on the same menu are sorted based on this number; menu items with the same number are sorted alphabetically |
| isDynamic | isDynamic indicates that this menu item requires a call to 'IDynamicMenu::RebuildMenu' before menu enable/display. |
| isOwnerDraw | indicates that this menu item is drawn by the IOwnerDrawItem interface on the action component instead of being drawn by platform menu code |
| iconPluginID | is the pluginID of the icon(if any) associated with the menu item |
| iconRsrcID | is the resource ID of the icon(if any) associated with the menu item |
Given the menu name, return the global bounds of a main menu item.
| inMenuName | name of the main menu item for which the global bounds are needed |
| pure virtual |
Display and react to user choice of a popup menu.
| popupLabel | name for the popup menu (key) |
| whereToPop | contains global coordinate to specify where popup should be displayed |
| mousePoint | contains global location of mouse at when mouse was clicked. May be the same as whereToPop. |
| removeDisabledItems | |
| widget | contains the popup menu, may be nil. |
| excludeRect | contains global coordinate rect, may be nil. For Win Only, popup menu should not overlap the excludeRect. Takes precedence over widget bounds, when provided. |
| pure virtual |
Call to find out if the menu is popped up and the user is interacting with the menu.
| pure virtual |
Deletes all the menu items for this actionID
| actionID | identifier associated with the menu item |
For internal use only. Remove icon of menu action id with icon.
| actionID | identifier associated with the menu item; kInvalidActionID for a submenu entry |
| menuPath | to add a menu item, pass the full path of the submenu on which to add the menu item (e.g., "Main:&File"), the name associated with the actionID param will determine the menu item's name (e.g., kSaveActionID for "&Save"); to add a submenu entry, append a ":" to the full path of the submenu including the submenu's name (e.g., "Main:&Edit:Prefere&nces:") and pass kInvalidActionID for the actionID param to add a separator, append a "-" to the full path of the of the submenu on which to add the separator (e.g., "Main:&Edit:-") and pass a valid ActionID for the actionID param (but not one that's registered with the IActionManager) |
Deletes the specified menu item - i.e. Pass "Main:&File" and kNewActionID to delete 'New...' from the file menu. If you pass a submenu item, it's entry (and associated positioning information) will be removed, but not the menu items on that submenu. As a result the submenu will still appear, but at the bottom of the containing menu.
| menuPath | the full path name of the menu item |
| actionID | identifier associated with the menu item |
| pure virtual |
Deletes the specified submenu entry and all of its menu items - i.e. Pass "Main:&File:&New:" to delete the 'New' submenu and its contents from the file menu
| menuPath | the full path name of the submenu with a ":" appended |
| pure virtual |
For internal use only. Set icon of menu action id with icon.
| actionID | identifier associated with the menu item; kInvalidActionID for a submenu entry |
| menuPath | to add a menu item, pass the full path of the submenu on which to add the menu item (e.g., "Main:&File"), the name associated with the actionID param will determine the menu item's name (e.g., kSaveActionID for "&Save"); to add a submenu entry, append a ":" to the full path of the submenu including the submenu's name (e.g., "Main:&Edit:Prefere&nces:") and pass kInvalidActionID for the actionID param to add a separator, append a "-" to the full path of the of the submenu on which to add the separator (e.g., "Main:&Edit:-") and pass a valid ActionID for the actionID param (but not one that's registered with the IActionManager) |
| iconPluginID | is the pluginID of the icon(if any) associated with the menu item |
| iconRsrcID | is the resource ID of the icon(if any) associated with the menu item |