InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAnimationData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: SusanCL
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IAnimationData__
25 #define __IAnimationData__
26 
27 #include "IPMUnknown.h"
28 #include "DynamicDocumentsID.h"
29 #include "PMPathPoint.h"
30 #include "AnimationTypes.h"
31 
32 #include <map>
33 
34 class IPathGeometry;
35 class PMMatrix;
36 class PMRect;
37 class PMPathPoint;
38 
39 
48 class IAnimationData : public IPMUnknown
49 {
50 public:
51 
52  enum {kDefaultIID = IID_IANIMATIONDATA};
53 
56  virtual UID GetPresetUID () const = 0;
57 
62  virtual bool SetPresetUID (UID presetUID) = 0;
63 
66  virtual uint32 GetNumPlays () const = 0;
67 
72  virtual bool SetNumPlays (uint32 numPlays) = 0;
73 
76  virtual bool GetPlaysLoop () const = 0;
77 
82  virtual bool SetPlaysLoop (bool setToLoop) = 0;
83 
86  virtual bool GetHideInitially () const = 0;
87 
92  virtual bool SetHideInitially (bool setHideInitially) = 0;
93 
96  virtual bool GetHideAfter() const = 0;
97 
102  virtual bool SetHideAfter (bool setHideAfter) = 0;
103 
106  virtual AnimationOptions GetAnimateOption () const = 0;
107 
112  virtual bool SetAnimateOption (const AnimationOptions& animateOption) = 0;
113 
118  virtual bool SetDuration (const PMReal& durationInSecond) = 0;
119 
122  virtual PMReal GetDuration () const = 0;
123 
127  virtual bool SetFrameRate (int32 frameRatePerSecond) = 0;
128 
131  virtual int32 GetFrameRate () const = 0;
132 
135  virtual AnimationEaseType GetSimpleEaseType () const = 0;
136 
140  virtual bool SetSimpleEaseType (const AnimationEaseType& easeType) = 0;
141 
147  virtual bool SetTransformOffsetPoint (const PMPoint& offsetPoint) = 0;
148 
151  virtual PMPoint GetTransformOffsetPoint () const = 0;
152 
157  virtual bool Get2DKeyFramePath (AnimationPathDataList& pathFrames) const = 0;
158 
164  virtual bool Get2DPathPoints (PMPathPointList& path, bool& isRoving) const = 0;
165 
170  virtual bool Set2DKeyFramePath (const AnimationPathDataList& path) = 0;
171 
178  virtual bool Set2DPathPoints (const PMPathPointList& path, bool isRoving) = 0;
179 
182  virtual uint32 GetOpacityKeyFrameCount () const = 0;
183 
184  /* Gets the nth keyframe and opacity value.
185  @param nth is the nth keyframe value pair to get.
186  @param keyframe is the keyframe
187  @param value is the value at keyframe.
188  @return true if successful.
189  */
190  virtual bool GetOpacityKeyFrame (uint32 nth, uint32& keyframe, PMReal& value) const = 0;
196  virtual bool GetOpacityKeyFrame (uint32 keyframe, PMReal& value) const = 0;
197 
203  virtual bool SetOpacityKeyFrame (uint32 keyframe, const PMReal& value) = 0;
204  /* Removes the specified opacity key frame
205  @param keyframe is the keyframe to remove.
206  @return true if successful.
207  */
208  virtual bool RemoveOpacityKeyFrame (uint32 keyframe) = 0;
209 
212  virtual uint32 GetRotationKeyFrameCount () const = 0;
213  /* Gets the nth keyframe and rotation value.
214  @param nth is the nth keyframe value pair to get.
215  @param keyframe is the keyframe
216  @param value is the value at keyframe.
217  @return true if successful.
218  */
219  virtual bool GetRotationKeyFrame (uint32 nth, uint32& keyframe, PMReal& value) const = 0;
224  virtual bool GetRotationKeyFrame (uint32 keyframe, PMReal& value) const = 0;
230  virtual bool SetRotationKeyFrame (uint32 keyframe, const PMReal& value) = 0;
235  virtual bool RemoveRotationKeyFrame (uint32 keyframe) = 0;
236 
239  virtual uint32 GetScaleXKeyFrameCount () const = 0;
240  /* Gets the nth keyframe and scale x value.
241  @param nth is the nth keyframe value pair to get.
242  @param keyframe is the keyframe
243  @param value is the value at keyframe.
244  @return true if successful.
245  */
246  virtual bool GetScaleXKeyFrame (uint32 nth, uint32& keyframe, PMReal& value) const = 0;
247  /* Gets the nth keyframe and scale x value.
248  @param nth is the nth keyframe value pair to get.
249  @param keyframe is the keyframe
250  @param value is the value at keyframe.
251  @return true if successful.
252  */
253  virtual bool GetScaleXKeyFrame (uint32 keyframe, PMReal& value) const = 0;
259  virtual bool SetScaleXKeyFrame (uint32 keyframe, const PMReal& value) = 0;
264  virtual bool RemoveScaleXKeyFrame (uint32 keyframe) = 0;
265 
268  virtual uint32 GetScaleYKeyFrameCount () const = 0;
275  virtual bool GetScaleYKeyFrame (uint32 nth, uint32& keyframe, PMReal& value) const = 0;
282  virtual bool GetScaleYKeyFrame (uint32 keyframe, PMReal& value) const = 0;
288  virtual bool SetScaleYKeyFrame (uint32 keyframe, const PMReal& value) = 0;
293  virtual bool RemoveScaleYKeyFrame (uint32 keyframe) = 0;
294 
298  virtual void Copy (const IAnimationData* iOtherData) = 0;
303  virtual bool Equals (const IAnimationData* iOtherData) const = 0;
304 };
305 
306 #endif // __IAnimationData__