InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IActionComponent Class Referenceabstract

#include <IActionComponent.h>

Inheritance diagram for IActionComponent:
IPMUnknownCActionComponentBPIActionComponentBscDEHActionComponentBscDlgActionComponentBscDNDActionComponentBscKitActionComponentBscL10NActionComponentBscMnuActionComponentBscPnlActionComponentBscShpActionComponentBscSlDlgActionComponentBscTAActionComponentCdlChtUIActionComponentCelPnlActionComponentCstAFltActionComponentCstUniActionComponentCusCondTxtActionComponentCusDtLnkUIActionComponentCustomHttpLinkUIActionComponentDataUpdaterUIActionComponentDCLSizActionComponentDocWchActionComponentDynMnuActionComponentDynPnActionComponentDynPnMgrActionComponentFrmLblUIActionComponentGTTxtEdtActionComponentHiDPIActionComponentHidTxtEdActionComponentINXErrLogUIActionComponentLnkWtchActionComponentPDFVTUIActionComponentPicIcoActionComponentPnlTrvActionComponentPreflightRuleUIActionComponentPrnSelActionComponentPrtMemActionComponentPstLstUIActionComponentSnapActionComponentSnipRunActionComponentStrMutActionComponentSuppUIActionComponentTblAttActionComponentTblBscActionComponentTKIActionComponentTranFxUIActionComponentTxtExpActionComponentVDActionComponentWatermarkUIActionComponentWavTlActionComponentWFPActionComponentWLBCmpActionComponentXDocBkUIActionComponentXMLMrkActionComponent

Public Types

enum  { kDefaultIID = IID_IACTIONCOMPONENT }
 

Public Member Functions

virtual void UpdateActionStates (IActiveContext *ac, IActionStateList *listToUpdate, GSysPoint mousePoint=kInvalidMousePoint, IPMUnknown *widget=nil)=0
 
virtual void DoAction (IActiveContext *ac, ActionID actionID, GSysPoint mousePoint=kInvalidMousePoint, IPMUnknown *widget=nil)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface that action components should implement.

Member Function Documentation

virtual void IActionComponent::DoAction (IActiveContextac,
ActionID actionID,
GSysPoint mousePoint = kInvalidMousePoint,
IPMUnknownwidget = nil 
)
pure virtual

The action component should do the requested action. Note this will never be called except when the action is enabled.

Parameters
acpointer to the active context
actionIDidentifies which action this action component should perform
mousePointcontains the global mouse location at time of event causing action (e.g. context menus). kInvalidMousePoint if not known or relevant.
widgetcontains 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. NB: Don't assume it's a widget from your panel (menu scripting may access any menu at any time).

Implemented in DataUpdaterUIActionComponent, BscShpActionComponent, HidTxtEdActionComponent, CusCondTxtActionComponent, PnlTrvActionComponent, PstLstUIActionComponent, FrmLblUIActionComponent, CusDtLnkUIActionComponent, DynMnuActionComponent, BscL10NActionComponent, PrtMemActionComponent, INXErrLogUIActionComponent, SnipRunActionComponent, BscDlgActionComponent, TblAttActionComponent, BscSlDlgActionComponent, CdlChtUIActionComponent, CstAFltActionComponent, WLBCmpActionComponent, XDocBkUIActionComponent, WatermarkUIActionComponent, XMLMrkActionComponent, BPIActionComponent, BscMnuActionComponent, CustomHttpLinkUIActionComponent, PDFVTUIActionComponent, TblBscActionComponent, TranFxUIActionComponent, WFPActionComponent, BscDEHActionComponent, BscPnlActionComponent, BscTAActionComponent, DocWchActionComponent, CstUniActionComponent, SuppUIActionComponent, DCLSizActionComponent, DynPnMgrActionComponent, GTTxtEdtActionComponent, TxtExpActionComponent, BscKitActionComponent, PicIcoActionComponent, LnkWtchActionComponent, DynPnActionComponent, CelPnlActionComponent, PreflightRuleUIActionComponent, PrnSelActionComponent, StrMutActionComponent, SnapActionComponent, WavTlActionComponent, BscDNDActionComponent, VDActionComponent, TKIActionComponent, and HiDPIActionComponent.

virtual void IActionComponent::UpdateActionStates (IActiveContextac,
IActionStateListlistToUpdate,
GSysPoint mousePoint = kInvalidMousePoint,
IPMUnknownwidget = nil 
)
pure 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
acpointer to the active context
listToUpdatecontains the items that client code should update the state for. Note that all states begin as disabled unselected.
mousePointcontains the global mouse location at time of event causing action (e.g. context menus). kInvalidMousePoint if not known or relevant.
widgetcontains 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. NB: Don't assume it's a widget from your panel (menu scripting may access any menu at any time).

Implemented in DynMnuActionComponent, CusDtLnkUIActionComponent, PstLstUIActionComponent, DataUpdaterUIActionComponent, FrmLblUIActionComponent, CdlChtUIActionComponent, CstAFltActionComponent, DCLSizActionComponent, DocWchActionComponent, SuppUIActionComponent, BPIActionComponent, TblBscActionComponent, BscMnuActionComponent, DynPnMgrActionComponent, HidTxtEdActionComponent, WLBCmpActionComponent, CustomHttpLinkUIActionComponent, CusCondTxtActionComponent, PrnSelActionComponent, SnipRunActionComponent, INXErrLogUIActionComponent, and CActionComponent.