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

#include <IDynamicEventTimingMgr.h>

Inheritance diagram for IDynamicEventTimingMgr:
IPMUnknown

Classes

class  DynamicTarget
 

Public Types

enum  { kDefaultIID = IID_IDYNAMICEVENTTIMINGMGR }
 
enum  { kInvalidTimingPosition = 0xffffffff }
 
typedef ScriptData TargetDataType
 
typedef boost::intrusive_ptr
< DynamicTarget
DynamicTargetPtr
 
typedef std::vector
< DynamicTargetPtr > 
DynamicTargetList
 

Public Member Functions

virtual DynamicTargetPtr CreateDynamicTarget (UID targetUID, uint32 role=kTimingTargetRoleDefault, uint32 action=kTimingTargetVerbPlay)=0
 
virtual DynamicTargetPtr CreateDynamicTarget (const DynamicTargetPtr &target)=0
 
virtual int32 FindDynamicTarget (const DynamicTargetList &targetlist, DynamicTargetPtr &target) const =0
 
virtual int32 FindDynamicTarget (const DynamicTargetList &targetList, UID targetUID, DynamicTargetPtr &target) const =0
 
virtual uint32 GetNumDynamicEvents () const =0
 
virtual bool AddDynamicEvent (const EventTriggerType &newEventTrigger)=0
 
virtual bool RemoveDynamicEvent (const EventTriggerType &whichTrigger)=0
 
virtual EventTriggerType GetNthDynamicEvent (uint32 which) const =0
 
virtual bool RemoveNthGroup (const EventTriggerType &whichTrigger, uint32 which)=0
 
virtual bool MoveNthGroup (const EventTriggerType &whichTrigger, uint32 which, int32 newPosition)=0
 
virtual bool GetNthGroupNumPlays (const EventTriggerType &whichTrigger, uint32 which, uint32 &numPlays) const =0
 
virtual bool SetNthGroupNumPlays (const EventTriggerType &whichTrigger, uint32 which, uint32 newNumPlays)=0
 
virtual bool GetNthGroupPlaysLoop (const EventTriggerType &whichTrigger, uint32 which, bool &playsLoop) const =0
 
virtual bool SetNthGroupPlaysLoop (const EventTriggerType &whichTrigger, uint32 which, bool playsLoop)=0
 
virtual uint32 GetNumGroups (const EventTriggerType &whichTrigger) const =0
 
virtual bool GetNthGroupItems (const EventTriggerType &whichTrigger, uint32 whichGroup, DynamicTargetList &itemList) const =0
 
virtual bool AddTargetInNthGroup (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, int32 atGroup=-1)=0
 
virtual int32 FindTargetInEvent (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, DynamicTargetList &itemList, uint32 *pItemPosition=nil) const =0
 
virtual bool RemoveTargetInNthGroup (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, uint32 which)=0
 
virtual bool ReplaceTargetInNthGroup (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItemToReplace, const DynamicTargetPtr &newTargetItem, uint32 which)=0
 
virtual bool ReplaceNthTargetInNthGroup (const EventTriggerType &whichTrigger, uint32 which, uint32 whichTarget, const DynamicTargetPtr &newTargetItem)=0
 
virtual bool RemoveTargetInEvent (const EventTriggerType &trigger, const DynamicTargetPtr &targetItem)=0
 
virtual bool RemoveTargetForAllEvents (UID itemUID)=0
 
virtual bool MoveTargetBeforeNthGroup (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, uint32 oldGroup, uint32 beforeGroup)=0
 
virtual bool MoveTargetAfterNthGroup (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, uint32 oldPosition, uint32 afterGroup)=0
 
virtual bool MoveTargetIntoNthGroupAt (const EventTriggerType &whichTrigger, const DynamicTargetPtr &targetItem, uint32 oldGroup, uint32 atGroup, int32 atPosition=-1)=0
 
virtual bool MoveNthTargetIntoNthGroupAt (const EventTriggerType &whichTrigger, uint32 oldGroup, uint32 whichTarget, uint32 atGroup, int32 atPosition=-1)=0
 
virtual bool SetTargetDelayInNthGroup (const EventTriggerType &trigger, const DynamicTargetPtr &targetItem, uint32 whichGroup, const PMReal &delay)=0
 
virtual bool SetNthTargetDelayInNthGroup (const EventTriggerType &trigger, uint32 whichGroup, uint32 whichTarget, const PMReal &delay)=0
 
virtual bool GetTargetDelayInNthGroup (const EventTriggerType &trigger, const DynamicTargetPtr &targetItem, uint32 whichGroup, PMReal &delay) const =0
 
virtual bool SetTargetDataInNthGroup (const EventTriggerType &trigger, const DynamicTargetPtr &targetItem, uint32 whichGroup)=0
 
virtual bool SetNthTargetDataInNthGroup (const EventTriggerType &trigger, uint32 whichGroup, uint32 whichTarget, const DynamicTargetPtr &newTargetData)=0
 
virtual
IDynamicEventTimingMgr::DynamicTargetPtr 
GetTargetDataInNthGroup (const EventTriggerType &trigger, const DynamicTargetPtr &targetItem, uint32 whichGroup) const =0
 
virtual
IDynamicEventTimingMgr::DynamicTargetPtr 
GetNthTargetDataInNthGroup (const EventTriggerType &trigger, uint32 whichGroup, uint32 whichTarget) const =0
 
virtual void InvalidateTargets (const UIDList &targetList)=0
 
virtual EventTriggerType ValidateTriggerType (const EventTriggerType &whichTrigger) const =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 a persistent data interface for the timing lists. Timing list is a list of targets (page items) triggered by an animation, page event, or button action event. Objects that can be targets of event triggers are media items (movies, sounds, SWFs), and page item with animation. Objects that can trigger other objects are spreads, page item with animation, and buttons. There can be one or more timing lists per triggering object. Spreads has both page load and page click events. Animation can be self clicked or self rollover only. They must be mutually exclusive, however. Buttons can have object click, release, object rollover, and rolloff.

See Also
AnimationTypes.h

Items in the timing list can be re-ordered. One or more items can be grouped to play at the same time. Each item in the group can have its own time delay. Time delay is cumulative. The first target delay within a group specified the time delay from the time the group starts to play. The next target within the same group is delayed by cumulative delay for the group so far plus its own. If there are no delay specified, then the items in the group played simultaneously.

On a high-level, the data in the timing manager has this relationship:

For each triggering event: Group 0, (target x, target x delay) Group 1, (target y, target y delay) ... Group n, (target 1, target 1 delay), (target 2, target 2 delay), ... (target n, target n delay) ... Group z ...

Additionally, there're group-level play attributes. Each group can be set to play in loop or play one or more times. Group level play attributes will trump individual animation's loop but will not affect individual multiple plays. For single target group, the group-level play attributes are ignored.

Member Typedef Documentation

Data definition for timing target.

The target for the timing list is a simple ref-counted virtual c++ object, DynamicTarget. The attributes which represents a timing target are the item's UID, which role does this item represents, and what actions. In addition, it may also contain one or more pieces of data such as video navigation points, whether to play an animation in reverse, and others. These data are represented by an ID, and a data values.

To create a dynamic target, use one of the two CreateDynamicTarget method provided. To find a dynamic target in a list of dynamic targets, use FindDynamicTarget. It considers that two dynamic targets are equivalent if at least, its UID, role, and action are equal. They are completely equals if UID, role, action, and all data values are equal.type definition for dynamic target data values.

Member Function Documentation

virtual bool IDynamicEventTimingMgr::AddDynamicEvent (const EventTriggerType & newEventTrigger)
pure virtual

Add the specified event trigger

Parameters
newEventTriggeris the event trigger to add.
Returns
true if successful; otherwise false.
virtual bool IDynamicEventTimingMgr::AddTargetInNthGroup (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
int32 atGroup = -1 
)
pure virtual

Add the target in the specified event triggered timing list. If atGroup = -1, add target at the end of the list; otherwise add target in the nth group.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
whichTriggeris the event trigger.
targetItemis the dynamic target item to add to this triggering event.
atGroupis the group (position) to add the item into. Default is -1 which mean to add the item as a new group at the end.
Returns
true if successful; otherwise retruns false.
virtual DynamicTargetPtr IDynamicEventTimingMgr::CreateDynamicTarget (UID targetUID,
uint32 role = kTimingTargetRoleDefault,
uint32 action = kTimingTargetVerbPlay 
)
pure virtual

Construct a DynamicTargetPtr based on the specified UID, role, and action.

Parameters
targetUIDis the targetUID. For button targets, this UID is action UID.
roleis the target's role.
actionis the target's action.
Returns
DynamicTargetPtr for this target.
virtual DynamicTargetPtr IDynamicEventTimingMgr::CreateDynamicTarget (const DynamicTargetPtr & target)
pure virtual

Construct a DynamicTargetPtr based on another DynamicTarget object.

Parameters
targetis the source DynamicTarget object.
Returns
DynamicTargetPtr for this target.
virtual int32 IDynamicEventTimingMgr::FindDynamicTarget (const DynamicTargetList & targetlist,
DynamicTargetPtr & target 
) const
pure virtual

Find the specified dynamic target in the list. The target is considered equal if target's UID, role, and action are equal.

Parameters
targetlistis the list of DynamicTarget objects to search.
targetis the DynamicTarget object to find. If found, the content of the dynamic target from the list is copied.
Returns
the index of the dynamic target in the list. If not found, index is set to -1.
virtual int32 IDynamicEventTimingMgr::FindDynamicTarget (const DynamicTargetList & targetList,
UID targetUID,
DynamicTargetPtr & target 
) const
pure virtual

Find the first specified dynamic target UID in the list. The target UID is the actual target's UID.

Parameters
targetlistis the list of DynamicTarget objects to search.
targetUIDis the target UID to find. If found, the content of that dynamic target from the list is copied.
Returns
the index of the first dynamic target matching the target UID in the list. If not found, index is set to -1.
virtual int32 IDynamicEventTimingMgr::FindTargetInEvent (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
DynamicTargetList & itemList,
uint32 * pItemPosition = nil 
) const
pure virtual

Find the target in the specified event triggered timing list. This assumes targets are unique in the list.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
whichTriggeris the event trigger.
targetItemis the dynamic target item to find in this triggering event.
itemListis the entire item list at this position.
pItemPosition,ifnot nil, contains the position of the itemUID in the itemList.
Returns
the position or the nth group in which the itemUID is found. Returns -1 if itemUID is not found in the list.
virtual EventTriggerType IDynamicEventTimingMgr::GetNthDynamicEvent (uint32 which) const
pure virtual

Returns the nth event trigger

Parameters
whichis the nth event trigger to get.
Returns
the nth event trigger.
virtual bool IDynamicEventTimingMgr::GetNthGroupItems (const EventTriggerType & whichTrigger,
uint32 whichGroup,
DynamicTargetList & itemList 
) const
pure virtual

Get the dynamic items for the specified timing position and trigger event.

Parameters
eventTriggeris the event trigger interested.
whichGroupis the timing position.
itemListcontains a list of items for this position and trigger event.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::GetNthGroupNumPlays (const EventTriggerType & whichTrigger,
uint32 which,
uint32 & numPlays 
) const
pure virtual

Gets the specified event trigger's nth item's number of plays.

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the group item.
numPlaysis the number of times this group plays.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::GetNthGroupPlaysLoop (const EventTriggerType & whichTrigger,
uint32 which,
bool & playsLoop 
) const
pure virtual

Gets whether or not the specified event trigger's nth item is looping.

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the group item.
playsLoopis true if group loops.
Returns
true if successful; other retruns false.
virtual IDynamicEventTimingMgr::DynamicTargetPtr IDynamicEventTimingMgr::GetNthTargetDataInNthGroup (const EventTriggerType & trigger,
uint32 whichGroup,
uint32 whichTarget 
) const
pure virtual

Get target data for nth target item of nth group in the specified trigger.

Parameters
newEventTriggeris the event trigger.
whichGroupis the group position in the timing list for this target.
whichTargetis the position in nth group for this target.
Returns
DynamicTarget if successful; otherwise retruns nil dynamic target pointer.
virtual uint32 IDynamicEventTimingMgr::GetNumDynamicEvents () const
pure virtual

Methods for events.Returns the number of event triggers.

Returns
the number of event triggers.
virtual uint32 IDynamicEventTimingMgr::GetNumGroups (const EventTriggerType & whichTrigger) const
pure virtual

Get the number of timing items for the specified trigger event.

virtual IDynamicEventTimingMgr::DynamicTargetPtr IDynamicEventTimingMgr::GetTargetDataInNthGroup (const EventTriggerType & trigger,
const DynamicTargetPtr & targetItem,
uint32 whichGroup 
) const
pure virtual

Get target data for target item of the nth group in the specified trigger.

Parameters
newEventTriggeris the event trigger.
targetItemis the targe item to get.
whichGroupis the position in the timing list for this target.
Returns
DynamicTarget if successful; otherwise retruns nil dynamic target pointer.
virtual bool IDynamicEventTimingMgr::GetTargetDelayInNthGroup (const EventTriggerType & trigger,
const DynamicTargetPtr & targetItem,
uint32 whichGroup,
PMRealdelay 
) const
pure virtual

Get the dynamic target data at nth group in the specified trigger.

Parameters
newEventTriggeris the event trigger.
targetItemis the targe item to get.
whichGroupis the position in the timing list for this target.
delayis the time delay to get for this target item in the timing list.
Returns
true if successful; otherwise retruns false.
virtual void IDynamicEventTimingMgr::InvalidateTargets (const UIDListtargetList)
pure virtual

Invalidate specified targets. This can occur if targets were deleted, moved, or converted, etc.

Parameters
targetListis the target list to invalidate.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::MoveNthGroup (const EventTriggerType & whichTrigger,
uint32 which,
int32 newPosition 
)
pure virtual

move the specified event trigger's nth item to a new position

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the position to move.
newPositionis the new position to move to. If newPosition is -1, then move to the end of the list.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::MoveNthTargetIntoNthGroupAt (const EventTriggerType & whichTrigger,
uint32 oldGroup,
uint32 whichTarget,
uint32 atGroup,
int32 atPosition = -1 
)
pure virtual

Move item's timing position from old position to the new position for this trigger.

Note
items that have the same timing position play at the same time.
Parameters
whichTriggeris the event trigger to operate on.
oldGroupis the item's old group.
whichTargetis the nth item to move.
atGroupis the new group to move the item to.
atPositionis the position within the new group to move the item to. If atPosition = -1, then move the item to the end of the gorup.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::MoveTargetAfterNthGroup (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
uint32 oldPosition,
uint32 afterGroup 
)
pure virtual

Move item's timing position from old position to a position after the specified position for this trigger.

Note
items that have the same timing position play at the same time.
Parameters
targetItemis the item to move.
whichTriggeris the event trigger to operate on.
oldGroupis the item's old group.
afterGroupis the position to move the item after.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::MoveTargetBeforeNthGroup (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
uint32 oldGroup,
uint32 beforeGroup 
)
pure virtual

Move item's timing position from old position to a position before the specified position for this trigger.

Note
items that have the same timing position play at the same time.
Parameters
whichTriggeris the event trigger to operate on.
targetItemis the item to move.
oldGroupis the item's old group.
beforeGroupis the position to move the item before.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::MoveTargetIntoNthGroupAt (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
uint32 oldGroup,
uint32 atGroup,
int32 atPosition = -1 
)
pure virtual

Move item's timing position from old position to the specified for this trigger.

Note
items that have the same timing position play at the same time.
Parameters
whichTriggeris the event trigger to operate on.
targetItemis the item to move.
oldGroupis the item's old group.
atGroupis the group to move the item to.
atPositionis the position within the group to move the item to. If atPosition = -1, then move the item to the end of the gorup.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::RemoveDynamicEvent (const EventTriggerType & whichTrigger)
pure virtual

Remove the specified event trigger

Parameters
whichTriggeris the event trigger to remove.
Returns
true if successful; otherwise false.
virtual bool IDynamicEventTimingMgr::RemoveNthGroup (const EventTriggerType & whichTrigger,
uint32 which 
)
pure virtual

Methods for group items in a event-based timing list.Remove the specified event trigger's nth item

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the position to remove.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::RemoveTargetForAllEvents (UID itemUID)
pure virtual

Remove the item from all event trigger timing lists. For the spread, we are only tracking items that are triggered by page load or page click. Targets will be removed Permanently from all timing lists.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
itemUIDis the item that may be the target for one or more triggering events.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::RemoveTargetInEvent (const EventTriggerType & trigger,
const DynamicTargetPtr & targetItem 
)
pure virtual

Remove all instances of item from the owner's dynamic event.

Parameters
triggeris the trigger event to remove item from.
targetItemis the item to remove.
Returns
true if successful otherwise return false.
virtual bool IDynamicEventTimingMgr::RemoveTargetInNthGroup (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItem,
uint32 which 
)
pure virtual

Remove target at this position from the specified event trigger.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
whichTriggeris the event trigger to remove.
targetItemis the item that is the target for this triggering event.
whichis the position from which to remove the item.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::ReplaceNthTargetInNthGroup (const EventTriggerType & whichTrigger,
uint32 which,
uint32 whichTarget,
const DynamicTargetPtr & newTargetItem 
)
pure virtual

Replace the target at the nth position in the specified event trigger with the new one.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
whichTriggeris the event trigger to remove.
whichis the nth group in which to replace the item.
whichTargetis the nth target in the nth group to replace the item.
newTargetItemis the new dynamic target item to replace with.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::ReplaceTargetInNthGroup (const EventTriggerType & whichTrigger,
const DynamicTargetPtr & targetItemToReplace,
const DynamicTargetPtr & newTargetItem,
uint32 which 
)
pure virtual

Replace the target at this position from the specified event trigger with the new one.

Note
: For items that are targets of button actions, itemUID is the action UID.
Parameters
whichTriggeris the event trigger to remove.
targetItemToReplaceis the item that is to be replaced.
newTargetItemis the new dynamic target item to replace with.
whichis the nth group in which to replace the item.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::SetNthGroupNumPlays (const EventTriggerType & whichTrigger,
uint32 which,
uint32 newNumPlays 
)
pure virtual

Gets the specified event trigger's nth item's number of plays.

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the group item.
newNumPlaysis the new number of times this group should play.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::SetNthGroupPlaysLoop (const EventTriggerType & whichTrigger,
uint32 which,
bool playsLoop 
)
pure virtual

Sets whether or not the specified event trigger's nth item should loop.

Note
: For items that are targets of button actions, they are referenced directly by the buttons.
Parameters
whichTriggeris the event trigger to remove.
whichis the group item.
playsLoopis true if group loops.
Returns
true if successful; other retruns false.
virtual bool IDynamicEventTimingMgr::SetNthTargetDataInNthGroup (const EventTriggerType & trigger,
uint32 whichGroup,
uint32 whichTarget,
const DynamicTargetPtr & newTargetData 
)
pure virtual

Set dynamic target data for target item at the nth item in the specified trigger.

Parameters
whichTriggeris the event trigger.
whichGroupis the nth group in the timing list for this trigger.
whichTargetis the nth targe item to set.
newTargetDatais the new data to set.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::SetNthTargetDelayInNthGroup (const EventTriggerType & trigger,
uint32 whichGroup,
uint32 whichTarget,
const PMRealdelay 
)
pure virtual

Set time delay in second for nth target item of the nth group in the specified trigger.

Parameters
whichTriggeris the event trigger.
whichGroupis the nth group in the timing list for this target.
whichTargetis the nth targe item to get.
delayis the time delay to set for this item in the timing list.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::SetTargetDataInNthGroup (const EventTriggerType & trigger,
const DynamicTargetPtr & targetItem,
uint32 whichGroup 
)
pure virtual

Set dynamic target data for target item at nth item in the specified trigger.

Parameters
whichTriggeris the event trigger.
targetItemis the targe item to set.
whichGroupis the position in the timing list for this trigger.
Returns
true if successful; otherwise retruns false.
virtual bool IDynamicEventTimingMgr::SetTargetDelayInNthGroup (const EventTriggerType & trigger,
const DynamicTargetPtr & targetItem,
uint32 whichGroup,
const PMRealdelay 
)
pure virtual

Set time delay in second for target item at nth item in the specified trigger.

Parameters
whichTriggeris the event trigger.
targetItemis the targe item to get.
whichGroupis the position in the timing list for this target.
delayis the time delay to set for this item in the timing list.
Returns
true if successful; otherwise retruns false.
virtual EventTriggerType IDynamicEventTimingMgr::ValidateTriggerType (const EventTriggerType & whichTrigger) const
pure virtual

Validate event trigger.

Parameters
whichTriggeris the trigger to validate
Returns
returns the valid trigger or kNoTriggerEvent if trigger is not valid for this timing manager.