InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDynamicEventTimingMgr.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 __IDynamicEventTimingMgr__
25 #define __IDynamicEventTimingMgr__
26 
27 #include "DynamicDocumentsID.h"
28 #include "IPMUnknown.h"
29 #include "AnimationTypes.h"
30 #include "vector"
31 #include "ScriptData.h"
32 
70 {
71 public:
72  enum {kDefaultIID = IID_IDYNAMICEVENTTIMINGMGR};
73 
91 
92  class DynamicTarget : boost::noncopyable
93  {
94  friend class DynamicTargetImpl;
95 
96  virtual ~DynamicTarget() {}
97 
98  virtual void AddRef() const = 0;
99  virtual void Release() const = 0;
100 
101  public:
104  virtual UID GetTargetUID () const = 0;
105 
112  virtual uint32 GetRole () const = 0;
113 
121  virtual uint32 GetAction () const = 0;
122 
131  virtual void SetAction (uint32 targetAction) = 0;
132 
135  virtual PMReal GetDelay () const = 0;
136 
140  virtual void SetDelay (const PMReal& targetDelay) = 0;
141 
146  virtual bool HasData (std::vector<uint32>* pDataIDList = nil) const = 0;
147 
153  virtual bool GetData (uint32 dataID, TargetDataType& data) const = 0;
159  virtual bool AddData (uint32 dataID, const TargetDataType& data) = 0;
160 
165  virtual bool RemoveData (uint32 dataID) = 0;
166 
167  public:
168 
169  friend void intrusive_ptr_add_ref(DynamicTarget *t)
170  {
171  t->AddRef();
172  }
173 
174  friend void intrusive_ptr_release(DynamicTarget *t)
175  {
176  t->Release();
177  }
178  };
179 
180  typedef boost::intrusive_ptr<DynamicTarget> DynamicTargetPtr;
181  typedef std::vector<DynamicTargetPtr> DynamicTargetList;
182 
183  enum {kInvalidTimingPosition = 0xffffffff};
184 
191  virtual DynamicTargetPtr CreateDynamicTarget (UID targetUID, uint32 role = kTimingTargetRoleDefault, uint32 action = kTimingTargetVerbPlay) = 0;
196  virtual DynamicTargetPtr CreateDynamicTarget (const DynamicTargetPtr& target) = 0;
203  virtual int32 FindDynamicTarget (const DynamicTargetList& targetlist, DynamicTargetPtr& target) const = 0;
204 
210  virtual int32 FindDynamicTarget (const DynamicTargetList& targetList, UID targetUID, DynamicTargetPtr& target) const = 0;
211 
218  virtual uint32 GetNumDynamicEvents () const = 0;
219 
224  virtual bool AddDynamicEvent (const EventTriggerType& newEventTrigger) = 0;
225 
230  virtual bool RemoveDynamicEvent (const EventTriggerType& whichTrigger) = 0;
231 
236  virtual EventTriggerType GetNthDynamicEvent (uint32 which) const = 0;
237 
247  virtual bool RemoveNthGroup (const EventTriggerType& whichTrigger, uint32 which) = 0;
248 
256  virtual bool MoveNthGroup (const EventTriggerType& whichTrigger, uint32 which, int32 newPosition) = 0;
257 
265  virtual bool GetNthGroupNumPlays (const EventTriggerType& whichTrigger, uint32 which, uint32& numPlays) const = 0;
266 
274  virtual bool SetNthGroupNumPlays (const EventTriggerType& whichTrigger, uint32 which, uint32 newNumPlays) = 0;
275 
283  virtual bool GetNthGroupPlaysLoop (const EventTriggerType& whichTrigger, uint32 which, bool& playsLoop) const = 0;
284 
292  virtual bool SetNthGroupPlaysLoop (const EventTriggerType& whichTrigger, uint32 which, bool playsLoop) = 0;
293 
296  virtual uint32 GetNumGroups (const EventTriggerType& whichTrigger) const = 0;
297 
304  virtual bool GetNthGroupItems (const EventTriggerType& whichTrigger, uint32 whichGroup, DynamicTargetList& itemList) const = 0;
305 
314  virtual bool AddTargetInNthGroup (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, int32 atGroup = -1) = 0;
315 
325  virtual int32 FindTargetInEvent (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, DynamicTargetList& itemList, uint32* pItemPosition = nil) const = 0;
326 
334  virtual bool RemoveTargetInNthGroup (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, uint32 which) = 0;
335 
344  virtual bool ReplaceTargetInNthGroup (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItemToReplace, const DynamicTargetPtr& newTargetItem, uint32 which) = 0;
345 
354  virtual bool ReplaceNthTargetInNthGroup (const EventTriggerType& whichTrigger, uint32 which, uint32 whichTarget, const DynamicTargetPtr& newTargetItem) = 0;
355 
361  virtual bool RemoveTargetInEvent (const EventTriggerType& trigger, const DynamicTargetPtr& targetItem) = 0;
362 
370  virtual bool RemoveTargetForAllEvents (UID itemUID) = 0;
371 
380  virtual bool MoveTargetBeforeNthGroup (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, uint32 oldGroup, uint32 beforeGroup) = 0;
381 
390  virtual bool MoveTargetAfterNthGroup (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, uint32 oldPosition, uint32 afterGroup) = 0;
391 
402  virtual bool MoveTargetIntoNthGroupAt (const EventTriggerType& whichTrigger, const DynamicTargetPtr& targetItem, uint32 oldGroup, uint32 atGroup, int32 atPosition = -1) = 0;
403 
414  virtual bool MoveNthTargetIntoNthGroupAt (const EventTriggerType& whichTrigger, uint32 oldGroup, uint32 whichTarget, uint32 atGroup, int32 atPosition = -1) = 0;
415 
423  virtual bool SetTargetDelayInNthGroup (const EventTriggerType& trigger, const DynamicTargetPtr& targetItem, uint32 whichGroup, const PMReal& delay) = 0;
424 
432  virtual bool SetNthTargetDelayInNthGroup (const EventTriggerType& trigger, uint32 whichGroup, uint32 whichTarget, const PMReal& delay) = 0;
433 
441  virtual bool GetTargetDelayInNthGroup (const EventTriggerType& trigger, const DynamicTargetPtr& targetItem, uint32 whichGroup, PMReal& delay) const = 0;
442 
449  virtual bool SetTargetDataInNthGroup (const EventTriggerType& trigger, const DynamicTargetPtr& targetItem, uint32 whichGroup) = 0;
450 
458  virtual bool SetNthTargetDataInNthGroup (const EventTriggerType& trigger, uint32 whichGroup, uint32 whichTarget,const DynamicTargetPtr& newTargetData) = 0;
459 
466  virtual IDynamicEventTimingMgr::DynamicTargetPtr GetTargetDataInNthGroup (const EventTriggerType& trigger, const DynamicTargetPtr& targetItem, uint32 whichGroup) const = 0;
467 
474  virtual IDynamicEventTimingMgr::DynamicTargetPtr GetNthTargetDataInNthGroup (const EventTriggerType& trigger, uint32 whichGroup, uint32 whichTarget) const = 0;
475 
480  virtual void InvalidateTargets (const UIDList& targetList) = 0;
481 
486  virtual EventTriggerType ValidateTriggerType (const EventTriggerType& whichTrigger) const = 0;
487 };
488 
489 #endif // __IDynamicEventTimingMgr__