InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMotionPresetUtils Class Referenceabstract
Inheritance diagram for IMotionPresetUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMOTIONPRESETUTILS }
 

Public Member Functions

virtual IMotionPresetMgrQueryMotionPresetManager (IDataBase *iDB=nil) const =0
 
virtual ErrorCode CopyMotionPresetData (const IMotionPresetData *iSrcPreset, IMotionPresetData *iDstPreset) const =0
 
virtual IMotionPresetDataQueryPageItemPresetData (const UIDRef &pageItemRef, int32 whichAnimation)=0
 
virtual IPMUnknownQueryPageItemAnimationData (const UIDRef &pageItemRef)=0
 
virtual UID GetPageItemAnimationPresetUID (const UIDRef &pageItemRef) const =0
 
virtual IAnimationCoreCreateAnimationCore (const UIDRef &presetRef=UIDRef::gNull)=0
 
virtual ErrorCode SetMotionPresetSettings (const UIDRef &presetRef, bool doSetName, const PMString &newName, bool doSetDescription, const PMString &newDescription)=0
 
virtual ErrorCode ConstructMotionXMLDataFromMotionData (const WideString &rawString, boost::shared_ptr< uint8 > &xmlBuffer, size_t &size)=0
 
virtual ErrorCode ValidatePresetName (IMotionPresetMgr *iPresetMgr, const PMString &presetName) const =0
 
virtual ISubjectQueryPresetWorkspaceSubject (IDataBase *iDB) const =0
 
virtual IMotionPresetMgrQueryMotionPresetManagerFromScript (const IScriptRequestData *data, IScript *script) const =0
 
virtual void GetMotionPathPoints (const UIDRef &pageItemRef, PMPathPointList &motionPath, PMPathPointList &easingPath)=0
 
virtual PMMatrix FlashToInnerMatrix (const UIDRef &pageItemRef)=0
 
virtual void DrawMotionPaths (GraphicsData *gd, const UIDRef &pageItemRef)=0
 
virtual void CreateMotionPath (GraphicsData *gd, const PMPathPointList &motionPath)=0
 
virtual void CreateEasingPath (GraphicsData *gd, const PMPathPointList &easingPath)=0
 
virtual bool GetPresetGroupName (const PMString &presetName, PMString &presetGroupName)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual ErrorCode IMotionPresetUtils::ConstructMotionXMLDataFromMotionData (const WideStringrawString,
boost::shared_ptr< uint8 > & xmlBuffer,
size_t & size 
)
pure virtual

Construct the motion xml data from the specified motion preset data.

Parameters
rawStringis the motion preset data. It's the preset's xml description.
xmlBufferis the shared buffer containing the motion xml data.
sizeis the size of the buffer
Returns
kSuccess or an error code.
virtual ErrorCode IMotionPresetUtils::CopyMotionPresetData (const IMotionPresetDataiSrcPreset,
IMotionPresetDataiDstPreset 
) const
pure virtual

Copy motion preset data.

Parameters
iSrcPresetis the source preset data to copy from.
iDstPresetis the preset to which the data is to be copied. If iDstPreset does not have edit privilege, then nothing is copied.
virtual IAnimationCore* IMotionPresetUtils::CreateAnimationCore (const UIDRefpresetRef = UIDRef::gNull)
pure virtual

Returs the animation object for the specified motion preset.

Parameters
presetRefis the motion preset. If it is null, then an empty animation object is created.
Returns
the animation object for the specified motion preset.
virtual void IMotionPresetUtils::CreateEasingPath (GraphicsDatagd,
const PMPathPointListeasingPath 
)
pure virtual

Given a list of path points for the easing path, create the path using the graphics data. Caller must still call gPort->stroke()

Parameters
gd[IN] The graphics data to draw to
easingPath[IN] A list of PMPathPoints for the easing path
virtual void IMotionPresetUtils::CreateMotionPath (GraphicsDatagd,
const PMPathPointListmotionPath 
)
pure virtual

Given a list of path points for the motion path, create the path using the graphics data. Caller must still call gPort->stroke()

Parameters
gd[IN] The graphics data to draw to
motionPath[IN] A list of PMPathPoints for the easing path
virtual void IMotionPresetUtils::DrawMotionPaths (GraphicsDatagd,
const UIDRefpageItemRef 
)
pure virtual

Given an item interface, draw its motion paths for "motion" and "easing".

Parameters
gd[IN] The graphics data to draw to
pageItemRef[IN] is the UIDRef of the page item with motion data.
virtual PMMatrix IMotionPresetUtils::FlashToInnerMatrix (const UIDRefpageItemRef)
pure virtual

Given an item interface that has motion applied, return a matrix that will map to inner coordinates for the item. The offset point (GetPageItemAnimationTransformOffsetPoint) is taken into account.

Parameters
pageItemRef[IN] is the UIDRef of the page item with motion data.
Returns
PMMatrix a matrix that will map to inner coordinates for the item.
See Also
FlashToInnerMatrix to convert from "flash" coordinates to inner coordinates for the page item.
GetMotionPathPoints, typically this matrix could be applied to the points in order to draw, hittest, etc.
virtual void IMotionPresetUtils::GetMotionPathPoints (const UIDRefpageItemRef,
PMPathPointListmotionPath,
PMPathPointListeasingPath 
)
pure virtual

Given an item interface, fill in a list of PMPathPoints for its easing path and motion path. The points are returned in "flash" coordinate space. This means aligned with the spread, with the 0, 0 point at the upper left of the page item, and 72dpi. The animation offset has not yet been applied. Will return empty lists of item doesn't have motion data associated with it.

Parameters
pageItemRef[IN] is the UIDRef of the page item with motion data.
motionPath[OUT] A list of PMPathPoints representing the motion path
easingPath[OUT] A list of PMPathPoints representing the easing path
See Also
FlashToInnerMatrix to convert from "flash" coordinates to inner coordinates for the page item.
virtual UID IMotionPresetUtils::GetPageItemAnimationPresetUID (const UIDRefpageItemRef) const
pure virtual

Returns the motion preset UID for the specified pageitem's which animation.

Parameters
pageItemRefis the page item.
Returns
the motion preset UID.
virtual bool IMotionPresetUtils::GetPresetGroupName (const PMStringpresetName,
PMStringpresetGroupName 
)
pure virtual

Given a preset name, return the group name that it resides. The group name may be empty indicating the preset does not belong to a group or that it was not found in the current list of presets.

Parameters
presetName[IN] is the preset name.
presetGroupName[OUT] is the preset's group name.
Returns
bool whether or not the preset name was found.
virtual IMotionPresetMgr* IMotionPresetUtils::QueryMotionPresetManager (IDataBaseiDB = nil) const
pure virtual

Returs the motion preset manager for the specified database.

Parameters
iDBis the data base
Returns
IMotionPresetMgr for the specified database.
virtual IMotionPresetMgr* IMotionPresetUtils::QueryMotionPresetManagerFromScript (const IScriptRequestDatadata,
IScriptscript 
) const
pure virtual

Query for the preset manager from the specified IScript.

Parameters
datais the script reset data. This is need to establish the request context.
scriptis the script interface interested.
Returns
the pointer to IMotionPresetMgr.
virtual IPMUnknown* IMotionPresetUtils::QueryPageItemAnimationData (const UIDRefpageItemRef)
pure virtual

Returns the animation data for the given page item.

Parameters
pageItemRefis the page item.
whichAnimationis the nth animation attached to the page item.
Returns
the animation attribute data for this page item.
virtual IMotionPresetData* IMotionPresetUtils::QueryPageItemPresetData (const UIDRefpageItemRef,
int32 whichAnimation 
)
pure virtual

Returns the motion preset data for the given page item's which animation.

Parameters
pageItemRefis the page item.
whichAnimationis the nth animation attached to the page item.
Returns
the motion preset data interface for this page item.
virtual ISubject* IMotionPresetUtils::QueryPresetWorkspaceSubject (IDataBaseiDB) const
pure virtual

Query the preset manager's workspace subject

Parameters
iDBis the workspace database.
Returns
the pointer to ISubject for the preset manager subject
virtual ErrorCode IMotionPresetUtils::SetMotionPresetSettings (const UIDRefpresetRef,
bool doSetName,
const PMStringnewName,
bool doSetDescription,
const PMStringnewDescription 
)
pure virtual

Sets the motion preset's name and description

Parameters
presetRefis UIDRef of the preset to change.
doSetNameis true is setting a new name
newNameis new name for the preset.
doSetDescriptionis true is setting a new description
newDescriptionis new description for the preset.
Returns
the error code.
virtual ErrorCode IMotionPresetUtils::ValidatePresetName (IMotionPresetMgriPresetMgr,
const PMStringpresetName 
) const
pure virtual

Validate the given preset name

Parameters
iPresetMgris the motion preset manager to validate against.
presetNameis the preset name to validate.
Returns
kSuccess otherwise an error code.