DynMnuDynamicMenu implements the IDynamicMenu interface. Builds the menu each time it is exposed.
| Binds the C implementation class onto its ImplementationID making the C code callable by the application * DynMnuDynamicMenu::DynMnuDynamicMenu | ( | IPMUnknown * | boss | ) | |
Constructor.
- Parameters
| boss | interface ptr from boss object on which this interface is aggregated. |
| DynMnuDynamicMenu::~DynMnuDynamicMenu | ( | | ) | |
| UIDList DynMnuDynamicMenu::GetSpreadUIDs | ( | | ) | |
| protected |
Gets the UIDs for spreads 1..n in the front document. This method will always return a UIDList with length > 0, event though the [0] entry may be kInvalidUID. It is the responsibility of the caller to insure that [0] is a valid UID and the Idatabase* is is not nil.
- Returns
- List of front document spread UIDs
This method controls what menu items appear at any given time. InDesign calls this method when the menu is exposed and any menu entry in the MenuDef resource uses the kSDKDefIsDynamicMenuFlag. Control is exercised by rebuilding this action component's valid menus with the menu and action managers. This example implementation builds the menus and action IDs based on the number of spreads in the front document.
- Parameters
| dynamicActionID | ID of menu hit just before this method is called. |
| widget | contains the widget that invoked this action. May be nil. e.g. Useful to use as a basis for Utils<IWidgetUtils>()->QueryRelatedWidget(...) to find widgets in a panel after its popup menu is hit. |
Implements IDynamicMenu.