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

#include <IAnimationAttributeSuite.h>

Inheritance diagram for IAnimationAttributeSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IANIMATIONATTRIBUTESUITE }
 
enum  PropertyType { kAnimationOpacity = 0, kAnimationRotation, kAnimationScaleX, kAnimationScaleY }
 
enum  { kFirstKeyFrame = 0, kLastKeyFrame = 0xffffffff }
 

Public Member Functions

virtual bool HasMultipleSelections () const =0
 
virtual ErrorCode ApplyMotionPreset (const UIDRef &presetRef)=0
 
virtual bool CanApplyMotionPreset (void) const =0
 
virtual bool GetMotionPresetApplied (UID &presetUID) const =0
 
virtual bool CanApplyAnimation (void) const =0
 
virtual bool GetBaseMotionPresetNameApplied (PMString &presetName) const =0
 
virtual bool HasMSOAsTimingParent (bool *pMixed=nil) const =0
 
virtual bool HasAnimationApplied (bool *pMixed=nil) const =0
 
virtual bool HasCustomAnimationSettings (bool *pMixed=nil) const =0
 
virtual void SetShowAnimationProxy (bool turnOn)=0
 
virtual bool GetShowAnimationProxy () const =0
 
virtual bool GetName (PMString &name) const =0
 
virtual bool SetName (const PMString &newName)=0
 
virtual bool GetAnimationHideInitially (bool &hideInitially) const =0
 
virtual bool SetAnimationHideInitially (bool hiddenUntilAnimated)=0
 
virtual bool GetAnimationHideAfter (bool &hideAfter) const =0
 
virtual bool SetAnimationHideAfter (bool hideAfter)=0
 
virtual bool GetAnimationDuration (PMReal &duration) const =0
 
virtual bool SetAnimationDuration (const PMReal &duration)=0
 
virtual bool SetAnimationPlays (const uint32 &numPlays)=0
 
virtual bool GetAnimationPlays (uint32 &numPlays) const =0
 
virtual bool GetAnimationPlaysLoop (bool &playsLoop) const =0
 
virtual bool SetAnimationPlaysLoop (bool setToLoop)=0
 
virtual bool GetApplicableTriggerEvents (std::vector< EventTriggerType > &applicableList) const =0
 
virtual bool GetNumAnimationTriggerEvents (uint32 &numTriggers) const =0
 
virtual bool GetNthAnimationTriggerEvent (uint32 which, EventTriggerType &trigger) const =0
 
virtual bool AddAnimationTriggerEvent (const EventTriggerType &triggerEvent)=0
 
virtual bool RemoveAnimationTriggerEvent (const EventTriggerType &triggerEvent)=0
 
virtual bool CanReverseAnimationForEvent (const EventTriggerType &triggerEvent) const =0
 
virtual bool GetReverseAnimationForEvent (const EventTriggerType &trigger, bool &canbeReversed) const =0
 
virtual bool SetReverseAnimationForEvent (const EventTriggerType &triggerEvent, bool setToReverse)=0
 
virtual bool GetAnimateOption (AnimationOptions &animateOption) const =0
 
virtual bool SetAnimateOption (const AnimationOptions &animateOption)=0
 
virtual bool GetSimpleEaseType (AnimationEaseType &easeType) const =0
 
virtual bool SetSimpleEaseType (const AnimationEaseType &easeType)=0
 
virtual bool GetAnimationTranformOffsetPoint (PMPoint &offsetPoint) const =0
 
virtual bool SetAnimationTranformOffsetPoint (const PMPoint &offsetPoint)=0
 
virtual bool GetAnimationMotionPath (AnimationPathDataList &path) const =0
 
virtual bool SetAnimationMotionPath (const AnimationPathDataList &path)=0
 
virtual bool GetAnimationMotionPath (PMPathPointList &path) const =0
 
virtual bool SetAnimationMotionPath (const PMPathPointList &path)=0
 
virtual bool CanSetAnimationMotionPathFromSelection () const =0
 
virtual bool SetAnimationMotionPathFromSelection ()=0
 
virtual bool CanUpdateAnimationMotionPathFromSelection () const =0
 
virtual bool UpdateAnimationMotionPathFromSelection ()=0
 
virtual bool GetTotalNumFrames (uint32 &numFrames) const =0
 
virtual bool GetNumKeyFrames (const PropertyType &propType, uint32 &numKeyFrames) const =0
 
virtual bool GetKeyFrame (const PropertyType &propType, int32 which, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetValueAtKeyFrame (const PropertyType &propType, uint32 keyframe, PMReal &value) const =0
 
virtual bool SetKeyFrame (const PropertyType &propType, uint32 keyframe, const PMReal &value=0)=0
 
virtual bool RemoveKeyFrame (const PropertyType &propType, uint32 keyframe)=0
 
virtual bool RemoveAllKeyFrames (const PropertyType &propType)=0
 
virtual bool CanSaveAnimationSettings () const =0
 
virtual bool SaveAnimationSettings (const PMString &newPresetName)=0
 
virtual bool CanSaveACopyAnimationSettings () const =0
 
virtual bool SaveACopyAnimationSettings (const IDFile &newPresetFile)=0
 
virtual bool CanRemoveAnimationPreset () const =0
 
virtual bool RemoveAnimationPreset ()=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

This is the high level animation attribute suite for the current selection. The animation attributes are represented by one data interface, IID_IANIMATIONATTRIBUTEDATA. The settings that are allowed are:

motion preset

duration of the animation

number of time the animation plays

animation path offset

a list of keyframe properties:

    motion path

    opacity

    rotation

    scale x

    scale y

Additionally, page event triggering the animation can be added or removed. Animation can be self-triggered. When it is self-triggered by roll off, the animation can bet set to play in reverse.

See Also
AnimationTypes.h
IAnimationAttributeData.h
IDynamicEventTimingMgr.h
IDynamicEventTimingFacade.h

Member Enumeration Documentation

anonymous enum

Short hand to refer to first and last keyframe for the given property.

Member Function Documentation

virtual bool IAnimationAttributeSuite::AddAnimationTriggerEvent (const EventTriggerType & triggerEvent)
pure virtual

Adds animation trigger event to the selection. If there's multiple selection, the event is added for all items in the selection. If the selection already has the event, it is ignored. Animation trigger event can be one of EventTriggerType.

See Also
AnimationTypes.h
Parameters
triggerEventis the animation trigger events to apply to the selection.
Returns
true if seuccessful.
virtual ErrorCode IAnimationAttributeSuite::ApplyMotionPreset (const UIDRefpresetRef)
pure virtual

Apply the spcified motion preset to the current selection.

Parameters
presetRefis the preset to apply
Returns
kSuccess if successfull otherwise returns an error code.
virtual bool IAnimationAttributeSuite::CanApplyAnimation (void ) const
pure virtual

Checks if animation can be applied to the selection.

Returns
true if selection contains at least one item and item can have attribute applied.
virtual bool IAnimationAttributeSuite::CanApplyMotionPreset (void ) const
pure virtual

Checks if motion preset can be applied to the selection.

Returns
true if selection has at least one item and item can have motion preset applied.
virtual bool IAnimationAttributeSuite::CanRemoveAnimationPreset () const
pure virtual
Returns
true if can remove current animation preset.
virtual bool IAnimationAttributeSuite::CanReverseAnimationForEvent (const EventTriggerType & triggerEvent) const
pure virtual

Returns true if animation can be reversed for the specified trigger event in the selection.

Parameters
triggerEventis the animation trigger events to reverse animation.
Returns
true if animation can be reversed.
virtual bool IAnimationAttributeSuite::CanSaveACopyAnimationSettings () const
pure virtual

This is possible only if there's an unique selection. Otherwise returns false if multiple selection.

Returns
true if can save a copy of the current animation preset and settings to a file.
virtual bool IAnimationAttributeSuite::CanSaveAnimationSettings () const
pure virtual

Return true if can save current page item animation settings. This is possible only if there's an unique selection. Otherwise returns false if multiple selection.

Returns
true if can save current page item animation settings.
virtual bool IAnimationAttributeSuite::CanSetAnimationMotionPathFromSelection () const
pure virtual

Sets animation path in the selection. There must be two items selected. If one item has animation applied, it is removed and the path geometry PMPathPointList from the other is used. If there's an existing path, the old path is removed first. If neither item has animation applied, the top item is used as the source for apply motion to the other item.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::CanUpdateAnimationMotionPathFromSelection () const
pure virtual

Determine if animation motion path be be updated. There must be a motion path item selected.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::GetAnimateOption (AnimationOptions & animateOption) const
pure virtual

Gets the current animate option from the selection

See Also
AnimationTypes.h
Parameters
animateOptionis the current animate option.
Returns
false if there's mixed selection or failed.
virtual bool IAnimationAttributeSuite::GetAnimationDuration (PMRealduration) const
pure virtual

Gets animation duration in the selection.

Parameters
durationis the animation duration.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetAnimationHideAfter (bool & hideAfter) const
pure virtual

Get page item hidden after setting.

Parameters
hideAfteris the page item hidden after animated setting.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetAnimationHideInitially (bool & hideInitially) const
pure virtual

Get page item hidden initially setting.

Parameters
hideInitiallyis the page item hidden initially setting.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetAnimationMotionPath (AnimationPathDataList & path) const
pure virtual

Gets animation motion path in the selection

Parameters
pathis the motion path.
Returns
false if there's mixed selection or failed.
virtual bool IAnimationAttributeSuite::GetAnimationMotionPath (PMPathPointListpath) const
pure virtual

Gets animation motion path in the selection

Parameters
pathis the motion path is a list of path points.
Returns
false if there's mixed selection or failed.
virtual bool IAnimationAttributeSuite::GetAnimationPlays (uint32 & numPlays) const
pure virtual

Gets number of times animation plays in the selection.

Parameters
numPlaysis the number of times the animation plays.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetAnimationPlaysLoop (bool & playsLoop) const
pure virtual

Get the animation's loop setting.

Parameters
playsLoopis true if animation is set to loop in the selection.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetAnimationTranformOffsetPoint (PMPointoffsetPoint) const
pure virtual

Gets animation transform offset point in the selection

Parameters
offsetPointis the animation transform offset point.
Returns
false if there's mixed selection or failed.
virtual bool IAnimationAttributeSuite::GetApplicableTriggerEvents (std::vector< EventTriggerType > & applicableList) const
pure virtual

Get the applicable trigger events for the current selection.

Parameters
applicableListis the list of applicable trigger events that can be assigned for the current selection (excluding button events).
Returns
true if unique selection otherwise false if mixed or multiple selection.
virtual bool IAnimationAttributeSuite::GetBaseMotionPresetNameApplied (PMStringpresetName) const
pure virtual

Return the name of the app preset applied. If mixed selection, an empty string is returned.

Parameters
thename of the app preset applied before custom settings.
Returns
true if selection is unique.
virtual bool IAnimationAttributeSuite::GetKeyFrame (const PropertyType & propType,
int32 which,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Gets animation property nth keyframe and value in the selection.

Parameters
propTypeis the property to get
whichis the nth keyframe.
keyframeis the keyframe returned.
valueis the value at keyframe.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::GetMotionPresetApplied (UIDpresetUID) const
pure virtual

Gets the motion preset UID applied to the selection.

Returns
true if it is an unique preset; return false if mixed.
virtual bool IAnimationAttributeSuite::GetName (PMStringname) const
pure virtual

Get name of page item Note that this is the same as setting name through IPageItemNameFacade.h

See Also
IPageItemNameFacade.h
Parameters
nameis the page item name returned.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetNthAnimationTriggerEvent (uint32 which,
EventTriggerType & trigger 
) const
pure virtual

Gets nth animation trigger event in the selection. Trigger events can be one of EventTriggerType.

See Also
AnimationTypes.h
Parameters
whichis the index in then event triggers list.
triggerEventsis the event trigger to get.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::GetNumAnimationTriggerEvents (uint32 & numTriggers) const
pure virtual

Gets the number of event triggers.

Parameters
numTriggersis the number of event triggers for this selection.
Returns
true if unique selection otherwise false if mixed selection.
virtual bool IAnimationAttributeSuite::GetNumKeyFrames (const PropertyType & propType,
uint32 & numKeyFrames 
) const
pure virtual

Gets number of keyframes for the animation's property.

Parameters
propTypeis the property to get
numKeyFramesis the number of keyframes.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::GetReverseAnimationForEvent (const EventTriggerType & trigger,
bool & canbeReversed 
) const
pure virtual

Returns whether or not the animation is reverse for the trigger event in the selection.

Parameters
triggerEventis the animation trigger events to reverse animation.
canbeReversedis true if event support reversed animation.
Returns
true if to reverse animation.
virtual bool IAnimationAttributeSuite::GetShowAnimationProxy () const
pure virtual
Returns
true if to show a proxy for end of animation in the layout window/
virtual bool IAnimationAttributeSuite::GetSimpleEaseType (AnimationEaseType & easeType) const
pure virtual

Gets the current simple ease type from the selection

See Also
AnimationTypes.h
Parameters
easeTypeis the current simple ease type.
Returns
false if there's mixed selection or failed.
virtual bool IAnimationAttributeSuite::GetTotalNumFrames (uint32 & numFrames) const
pure virtual

Gets total number of frames for the duration of animation.

Parameters
numFramesis the total number of frames.
virtual bool IAnimationAttributeSuite::GetValueAtKeyFrame (const PropertyType & propType,
uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets animation property value at the specified keyframe in the selection.

Parameters
propTypeis the property to get
keyframeis the keyframe. keyframe can also be set to either kFirstKeyFrame or kLastKeyFrame.
valueis the value at keyframe.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::HasAnimationApplied (bool * pMixed = nil) const
pure virtual

Return true if one of more items in the selection have animation applied.

Parameters
pMixedif not nil is set to true if mixed selection.
Returns
true if selection has animation applied.
virtual bool IAnimationAttributeSuite::HasCustomAnimationSettings (bool * pMixed = nil) const
pure virtual

Returns true if selection has custom animation settings applied.

Parameters
pMixedif not nil is set to true if mixed selection.
Returns
true if selection has custom animation settings applied.
virtual bool IAnimationAttributeSuite::HasMSOAsTimingParent (bool * pMixed = nil) const
pure virtual

Returns true if selection can be a target of an MSO state timing manager.

Parameters
pMixedif not nil is set to true if mixed selection.
Returns
true if selection can be a target of an MSO state timing manager.
virtual bool IAnimationAttributeSuite::HasMultipleSelections () const
pure virtual
    Returns true if current selection contains multiple selections.

s

virtual bool IAnimationAttributeSuite::RemoveAllKeyFrames (const PropertyType & propType)
pure virtual

Removes all animation property keyframes in the selection.

Parameters
propTypeis the property to remove.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::RemoveAnimationPreset ()
pure virtual

Remove the animation preset associated with the current selection from the preset list and remove animation settings from the current selection. If multiple selection, animation is removed from all items in the selection.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::RemoveAnimationTriggerEvent (const EventTriggerType & triggerEvent)
pure virtual

Remove animation trigger events from the selection. If there's mulitple selection, the event is removed for all items in the selection. If the selection does not have this event, it is ignored. Animation trigger events is one of EventTriggerType.

See Also
AnimationTypes.h
Parameters
triggerEventis the animation trigger events to remove from the selection.
Returns
true if seuccessful.
virtual bool IAnimationAttributeSuite::RemoveKeyFrame (const PropertyType & propType,
uint32 keyframe 
)
pure virtual

Removes animation property value at the specified keyframe in the selection.

Parameters
propTypeis the property to remove.
keyframeis the keyframe to remove. keyframe can also be set to either kFirstKeyFrame or kLastKeyFrame.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::SaveACopyAnimationSettings (const IDFilenewPresetFile)
pure virtual

Save a copy of the current selection animation settings as a preset file.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::SaveAnimationSettings (const PMStringnewPresetName)
pure virtual

Save current selection animation settings and reload as preset.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimateOption (const AnimationOptions & animateOption)
pure virtual

Sets the animate option for the selection.

See Also
AnimationTypes.h
Parameters
animateOptionis animation options to set.
Returns
true if successful.
virtual bool IAnimationAttributeSuite::SetAnimationDuration (const PMRealduration)
pure virtual

Sets animation duration in the selection.

Parameters
durationis the new duration to apply to the selection.
virtual bool IAnimationAttributeSuite::SetAnimationHideAfter (bool hideAfter)
pure virtual

Set the flag to true if page item should be hidden after animated.

Parameters
hideAfteris true if hidden after animated.
Returns
true if successful, otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimationHideInitially (bool hiddenUntilAnimated)
pure virtual

Set the flag to true if page item should be hidden until animated.

Parameters
hiddenUntilAnimatedis true if hidden until animated.
Returns
true if successful, otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimationMotionPath (const AnimationPathDataList & path)
pure virtual

Sets animation path in the selection. It will not be possible to set animation path when there's multiple items in the selection.

Parameters
pathis the animation path to apply.
virtual bool IAnimationAttributeSuite::SetAnimationMotionPath (const PMPathPointListpath)
pure virtual

Sets animation path in the selection. The path is set evenly over the duration. If there's an existing path, the old path is removed first. It will not be possible to set animation path when there's multiple items in the selection.

Parameters
pathis the animation path to apply. path is specified as a list of path points.
Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimationMotionPathFromSelection ()
pure virtual

Sets animation path in the selection. There must be two items selected. If one item has animation applied, it is removed and the path geometry PMPathPointList from the other is used. If there's an existing path, the old path is removed first. If neither item has animation applied, the top item is used as the source for apply motion to the other item.

Returns
true if successful otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimationPlays (const uint32 & numPlays)
pure virtual

Sets number of times the animation plays in the selection.

Parameters
numPlaysis the number of times animation plays to apply to the selection.
virtual bool IAnimationAttributeSuite::SetAnimationPlaysLoop (bool setToLoop)
pure virtual

Sets animation to loop for the current selection.

Parameters
setToLoopis true if to set animation to loop.
Returns
true if successful, otherwise returns false.
virtual bool IAnimationAttributeSuite::SetAnimationTranformOffsetPoint (const PMPointoffsetPoint)
pure virtual

Sets animation transform offset point.

Parameters
offsetPointis the animation offset point to apply.
Returns
true if successful.
virtual bool IAnimationAttributeSuite::SetKeyFrame (const PropertyType & propType,
uint32 keyframe,
const PMRealvalue = 0 
)
pure virtual

Sets animation property value at the specified keyframe in the selection.

Parameters
propTypeis the property to set
keyframeis the keyframe. keyframe can also be set to either kFirstKeyFrame or kLastKeyFrame.
valueis the value at keyframe to set.
Returns
false if there's multiple selection or failed.
virtual bool IAnimationAttributeSuite::SetName (const PMStringnewName)
pure virtual

Set name of page item Note that this is the same as setting name through IPageItemNameFacade.h

See Also
IPageItemNameFacade.h
Parameters
newNamethe new page item name to set.
Returns
true if successful.
virtual bool IAnimationAttributeSuite::SetReverseAnimationForEvent (const EventTriggerType & triggerEvent,
bool setToReverse 
)
pure virtual

Set animation to reverse for the trigger event in the selection.

Parameters
triggerEventis the animation trigger events to reverse animation. is true if to reverse animation.
Returns
true if successful.
virtual void IAnimationAttributeSuite::SetShowAnimationProxy (bool turnOn)
pure virtual

Set to true if to show a proxy for end of animation in the layout window when object is selected. This is a document view setting and not a selection based setting.

Parameters
turnOnis true is to show a proxy.
virtual bool IAnimationAttributeSuite::SetSimpleEaseType (const AnimationEaseType & easeType)
pure virtual

Sets the simple ease type for the selection.

See Also
AnimationTypes.h
Parameters
easeTypeis ease type to set.
Returns
true if successful.
virtual bool IAnimationAttributeSuite::UpdateAnimationMotionPathFromSelection ()
pure virtual

Updates animation path in the selection. There must be a motion path item selected. The motion path's path geometry is used to generate a PMPathPointList and then update the main item. User is still left in motion editing state with motion item selected.

Returns
true if successful otherwise returns false.