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

#include <IBehaviorSuite.h>

Inheritance diagram for IBehaviorSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IBEHAVIORSUITE }
 

Public Member Functions

virtual bool16 CanApplyActions () const =0
 
virtual bool16 IsEventSupported (IBehaviorEvent *inEvent) const =0
 
virtual bool16 CanMoveAction (const UID &actionToMove, const ActionEvent &newEvent, int32 newPosition)=0
 
virtual void GetActions (const ActionEvent &forEvent, IDataBase *&db, std::vector< UID > &actions) const =0
 
virtual void GetEventAndActions (IDataBase *&db, std::vector< std::pair< ActionEvent, UID > > &actions) const =0
 
virtual ErrorCode AddAction (const ActionEvent &forEvent, IBehaviorData *actionData, UID &newAction)=0
 
virtual ErrorCode ReplaceAction (const ActionEvent &forEvent, const UID &actionToReplace, IBehaviorData *actionData)=0
 
virtual ErrorCode DuplicateAction (const ActionEvent &forEvent, const UID &actionToDuplicate, UID &newAction)=0
 
virtual ErrorCode DeleteAction (const UID &actionToDelete)=0
 
virtual ErrorCode MoveAction (const UID &actionToMove, const ActionEvent &newEvent, int32 newPosition)=0
 
virtual ErrorCode EnableAction (const UID &actionToEnable, const bool16 &enable=kTrue)=0
 
virtual ErrorCode DeleteAllActions ()=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

Selection suite for manipulating behaviors on selections that can have behaviors (e.g. Form Fields)

This suite also doesn't operate on multiple selections.

See Also
IBehaviorList

Member Function Documentation

virtual ErrorCode IBehaviorSuite::AddAction (const ActionEvent & forEvent,
IBehaviorDataactionData,
UIDnewAction 
)
pure virtual

Add an action to an event.

Parameters
forEventThe event for which the action is to be executed
actionDataIBehaviorData interface on action boss to be added.
Returns
The result of command execution
virtual bool16 IBehaviorSuite::CanApplyActions () const
pure virtual
Returns
kTrue if the selection can have attached behaviors, i.e. everything has a IBehaviorList
virtual bool16 IBehaviorSuite::CanMoveAction (const UIDactionToMove,
const ActionEvent & newEvent,
int32 newPosition 
)
pure virtual

Tests whether the action can be moved to the new event and new position. Actions that can have targets appear in the action list before actions that do not have targets and they cannot be mixed.

Parameters
actionToMoveUID for action to be moved
newEventThe new event of the action
newPositionThe new position within the event of the action.
Returns
kTrue if it can be moved or kFalse
virtual ErrorCode IBehaviorSuite::DeleteAction (const UIDactionToDelete)
pure virtual

Delete an action

Parameters
actionToDeleteUID for action to be deleted
Returns
The result of command execution
virtual ErrorCode IBehaviorSuite::DeleteAllActions ()
pure virtual

Remove all actions for all events.

Returns
The result of command execution
virtual ErrorCode IBehaviorSuite::DuplicateAction (const ActionEvent & forEvent,
const UIDactionToDuplicate,
UIDnewAction 
)
pure virtual

Duplicate an action

Parameters
forEventThe event for which the action is to be executed
actionToDuplicateUID for action to be duplicated
Returns
The result of command execution
virtual ErrorCode IBehaviorSuite::EnableAction (const UIDactionToEnable,
const bool16 & enable = kTrue 
)
pure virtual

Enable or disable an action for PDF export. If disabled, the action will show up the behavior UI without a checkbox, and will not be exported to the PDF file.

Parameters
actionToEnableUID for action to be enabled or disabled
enableIf kTrue, enabled the action, else, disable it
Returns
The result of command execution
virtual void IBehaviorSuite::GetActions (const ActionEvent & forEvent,
IDataBase *& db,
std::vector< UID > & actions 
) const
pure virtual

Get a list of actions for a particular event

Parameters
forEventEvent to examine
db,onexit, the Database of the actions
actions,onexit, a lists of action UIDs that are executed for forEvent
virtual void IBehaviorSuite::GetEventAndActions (IDataBase *& db,
std::vector< std::pair< ActionEvent, UID > > & actions 
) const
pure virtual

Get a list of all actions for all events

Parameters
db,onexit, the Database of the actions
actions,onexit, a lists of action UID/event pairs
virtual bool16 IBehaviorSuite::IsEventSupported (IBehaviorEventinEvent) const
pure virtual
Returns
kTrue if the selection supports inEvent. For example, if inEvent is format, and the selection is a form field, this would return kTrue for text fields, but kFalse for push button fields.
virtual ErrorCode IBehaviorSuite::MoveAction (const UIDactionToMove,
const ActionEvent & newEvent,
int32 newPosition 
)
pure virtual

Move an action, either reordering it within its owning event or moving it to another event.

Parameters
actionToMoveUID for action to be moved
newEventThe new event of the action
newPositionThe new position within the event of the action.
Returns
The result of command execution
virtual ErrorCode IBehaviorSuite::ReplaceAction (const ActionEvent & forEvent,
const UIDactionToReplace,
IBehaviorDataactionData 
)
pure virtual

Replace one action with another.

Parameters
forEventThe event for which the action is to be executed
actionToReplaceUID for action to be replaced
actionDataIBehaviorData interface on the new action
Returns
The result of command execution