InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DocWchActionComponent Class Reference
Inheritance diagram for DocWchActionComponent:
CActionComponentIActionComponentIPMUnknown

Public Member Functions

 DocWchActionComponent (IPMUnknown *boss)
 
void DoAction (IActiveContext *ac, ActionID actionID, GSysPoint mousePoint, IPMUnknown *widget)
 
virtual void UpdateActionStates (IActiveContext *ac, IActionStateList *listToUpdate, GSysPoint mousePoint=kInvalidMousePoint, IPMUnknown *widget=nil)
 
- Public Member Functions inherited from CActionComponent
 CActionComponent (IPMUnknown *boss)
 
virtual ~CActionComponent ()
 

Additional Inherited Members

- Public Types inherited from IActionComponent
enum  { kDefaultIID = IID_IACTIONCOMPONENT }
 

Detailed Description

DocWchActionComponent implements the actions that are executed when the plug-in's menu items are selected.

DocWchActionComponent implements IActionComponent based on the partial implementation CActionComponent.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * DocWchActionComponent::DocWchActionComponent (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.

Member Function Documentation

void DocWchActionComponent::DoAction (IActiveContextac,
ActionID actionID,
GSysPoint mousePoint,
IPMUnknownwidget 
)
virtual

The action component is where the menu item's action is taken. When a menu item is selected, the Menu Manager determines which plug-in is responsible for it, and calls its DoAction with the ID for the menu item chosen.

Parameters
acIN Specifies active context – active selection, active view, active doc, etc.
actionIDIN Identifies the menu item that was selected.
mousePointIN Contains the global mouse location at time of event-causing action (e.g. context menus). kInvalidMousePoint if not relevant.
widgetIN 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.

void DocWchActionComponent::UpdateActionStates (IActiveContextac,
IActionStateListlistToUpdate,
GSysPoint mousePoint = kInvalidMousePoint,
IPMUnknownwidget = nil 
)
virtual

The action component is asked to update a list of actions to the proper state. the list of actions is intially disabled and unselected, so it only has to be changed if this state is not correct. Note that action components are never asked to update actions that don't belong to them, or actions they have not specified kCustomEnabling for.

Parameters
acIN Specifies active context – active selection, active view, active doc, etc.
listToUpdateIN contains the items that client code should update the state for
mousePointIN contains the global mouse location at time of event causing action (e.g. context menus). kInvalidMousePoint if not known or relevant.
widgetIN 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.