|
| enum | { kDefaultIID = IID_IACTIONCOMPONENT } |
| |
DynMnuActionComponent implements the actions that are executed when the plug-in's menu items are selected.
DynMnuActionComponent implements IActionComponent based on the partial implementation CActionComponent.
| Binds the C implementation class onto its ImplementationID making the C code callable by the application * DynMnuActionComponent::DynMnuActionComponent | ( | IPMUnknown * | boss | ) | |
Constructor.
- Parameters
| boss | interface ptr from boss object on which this interface is aggregated. |
The action component should do the requested action. Because this plug-in has dynamic menu entries, the ActionIDs received by this method from the action manager is not a closed set. Action IDs for static menu entries are handled as an explicit case in a switch statement. Action IDs for dynamic menu entries are handled by the switch's default case, and are delegated to the DoHandleDynamic() method.
- Parameters
| ac | refers to the current active context, such as the front document |
| actionID | identifies which action this action component should perform |
| mousePoint | contains the global mouse location at time of event causing action (e.g. context menus). kInvalidMousePoint if not relevant. |
| 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 IActionComponent.
This method controls what menu items are enabled at any given time. InDesign calls this method when a menu is exposed if the ActionDef has entries with the enabling type set to kCustomEnabling. This method is the opportunity to enable or disable any of the menu entries in the IActionStateList. This implementation simply enables any item in the action state list for which it can find a valid spread UID in the IActionIDToUIDData interface.
- Parameters
| ac | refers to the current active context, such as the front document |
| listToUpdate | contains the items that client code should update the state for |
| mousePoint | contains the global mouse location at time of event causing action (e.g. context menus). kInvalidMousePoint if not relevant. |
| 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. |
Reimplemented from CActionComponent.