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

#include <IPageTransitionFacade.h>

Inheritance diagram for Facade::IPageTransitionFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPAGETRANSITIONFACADE }
 

Public Member Functions

virtual bool SpreadHasPageTransition (UIDRef const &spreadRef) const =0
 
virtual bool SpreadsHavePageTransition (UIDList const &spreadList) const =0
 
virtual ErrorCode GetSpreadPageTransitionDetails (UIDRef const &spreadRef, ClassID *classID=nil, uint32 *direction=nil, uint32 *duration=nil) const =0
 
virtual ErrorCode SetSpreadPageTransitionDetails (UIDList const &uidList, ClassID const &classID, uint32 direction, uint32 duration) const =0
 
virtual bool AllSpreadsHaveSamePageTransition (UIDList const &spreadList, ClassID &resultTransitionClass) const =0
 
virtual ErrorCode ApplyPageTransitionToAllSpreads (UIDList const &spreads, const ClassID &transitionClass, uint32 const &direction, uint32 const &speed) const =0
 
virtual uint32 GetPageTransitionCount () const =0
 
virtual ClassID GetNthPageTransitionClassID (int32 index) const =0
 
virtual PMString GetNthPageTransitionName (int32 index, bool translateName=false) const =0
 
virtual IPageTransitionQueryNthPageTransition (int32 index) const =0
 
virtual IPageTransitionQueryPageTransition (ClassID const &classID) const =0
 
virtual int32 FindPageTransitionIndex (ClassID const &classID) const =0
 
virtual int32 FindPageTransitionIndex (PMString const &name, bool useTranslatedNames=false) const =0
 
virtual ClassID GetPageTransitionClassID (PMString const &name, bool useTranslatedNames=false) const =0
 
virtual PMString GetPageTransitionName (ClassID const &classID, bool translateName=false) const =0
 
virtual bool ValidPageTransitionDirection (ClassID const &classID, const uint32 direction) 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

A high level API for dealing with page transitions. Each spread can have a page transition applied to it. The page transition is defined by a ClassID, direction and duration. Use this facade to determine which page transitions are available, and to Get and Set the page transition information on the spreads. Each page transition is its own boss (ClassID). The IPageTransition interface on the boss defines the type and name of the transition, allowable directions, and a default duration. The directions are enum based, defined in the IPageTransition header file. Allowable directions are specific for each transition. Duration is based on number of ticks, where there are 60 ticks per second. There are defines in IPageTransition.h for the default settings for fast, medium and slow duration times.

See Also
IPageTransition

Please use the IPageTransitionFacade directly via the UtilsBoss if possible, see Utils.h: i.e. Utils<IPageTransitionFacade>()->GetPageTransitionCount( );

Member Function Documentation

virtual bool Facade::IPageTransitionFacade::AllSpreadsHaveSamePageTransition (UIDList const & spreadList,
ClassIDresultTransitionClass 
) const
pure virtual

Check if all the given spreads have the same page transitions applied or not. If there is no spreads passed in, we will collect all the spreads in the document.

Parameters
spreadListIN: The given spread list to be checked.
resultTransitionClassOUT: the transition class that all spreads are applied.
Returns
bool - true if all the spreads has the same page transitions, false otherwise
virtual ErrorCode Facade::IPageTransitionFacade::ApplyPageTransitionToAllSpreads (UIDList const & spreads,
const ClassIDtransitionClass,
uint32 const & direction,
uint32 const & speed 
) const
pure virtual

Apply the given page transition to all the spreads in the UIDList passed in. If the UIDList is empty, it will get the IDocument (based on the database used to create the UIDList), and apply the page transition to all the spreads in the document.

Parameters
spreadsIN: The given spreads to apply, if there is no spread, we will apply to all spreads in the document.
transitionClassIN: The given ClassID of page transition tp apply
directionIN: The given direction of the page transition to apply
speedIN: The given speed of page transition to apply
Returns
ErrorCode - kSuccess if we apply successfully, an error otherwise
virtual int32 Facade::IPageTransitionFacade::FindPageTransitionIndex (ClassID const & classID) const
pure virtual

Retrieves index of page transition with given class ID in the list

Parameters
classIdIN: Class id of page transition
Returns
index index of found item if successful, -1 if not found
virtual int32 Facade::IPageTransitionFacade::FindPageTransitionIndex (PMString const & name,
bool useTranslatedNames = false 
) const
pure virtual

Finds named page transition in list, returning its index if found

Parameters
nameIN: Name of page transition to find
useTranslatedNamesIN: Whether to translate page transition names before compare (default is false)
Returns
index index of found item if successful, -1 if not found
virtual ClassID Facade::IPageTransitionFacade::GetNthPageTransitionClassID (int32 index) const
pure virtual

Gets the ClassID of the nth page transition.

Parameters
indexIN: Index of the page transition to get
Returns
ClassID of the nth page transition, or kInvalidClass if failure
virtual PMString Facade::IPageTransitionFacade::GetNthPageTransitionName (int32 index,
bool translateName = false 
) const
pure virtual

Returns name for the nth page transition.

Parameters
indexIN: Index of the page transition to get
translateNameIN: Whether to translate the name returned (default is false)
Returns
PMString containing its name
virtual ClassID Facade::IPageTransitionFacade::GetPageTransitionClassID (PMString const & name,
bool useTranslatedNames = false 
) const
pure virtual

Finds the named page transition in list, returning its ClassID if found

Parameters
nameIN: Name of page transition to find
useTranslatedNamesIN: Whether to translate page transition names before compare (default is false)
Returns
ClassID of specified page transition was found, if not found, kInvalidClass
virtual uint32 Facade::IPageTransitionFacade::GetPageTransitionCount () const
pure virtual

Get number of page transitions defined

Returns
The number of page transitions
virtual PMString Facade::IPageTransitionFacade::GetPageTransitionName (ClassID const & classID,
bool translateName = false 
) const
pure virtual

Finds the named page transition in list, returning its ClassID if found

Parameters
classIDIN: ClassID of page transition to find
translateNamesIN: Whether to translate the page transition name before returning (default is false)
Returns
PMString of the name of page transition was found, if not found, and empty string
virtual ErrorCode Facade::IPageTransitionFacade::GetSpreadPageTransitionDetails (UIDRef const & spreadRef,
ClassIDclassID = nil,
uint32 * direction = nil,
uint32 * duration = nil 
) const
pure virtual

Gets the page transition information for the spread referenced

Parameters
spreadRefIN: The UIDRef of spread to get the page transition information
classIDOUT: The class ID of the transition, may be kInvalidClass if no transition applied
directionOUT: The direction of the transition, as defined in IPageTransition
durationOUT: The duration of the transition (in ticks - 60 ticks per second)
Returns
kSuccess, or ErrorCode
See Also
IPageTransition
virtual IPageTransition* Facade::IPageTransitionFacade::QueryNthPageTransition (int32 index) const
pure virtual

Instantiates nth page transition

Parameters
indexIN: Index of the page transition to instantiate
Returns
AddRef'd pointer to nth IPageTransition, or nil if failure
virtual IPageTransition* Facade::IPageTransitionFacade::QueryPageTransition (ClassID const & classID) const
pure virtual

Instantiates page transition based on class ID

Parameters
classIdIN: class ID of the page transition to instantiate
Returns
AddRef'd pointer to the requested IPageTransition, or nil if failure
virtual ErrorCode Facade::IPageTransitionFacade::SetSpreadPageTransitionDetails (UIDList const & uidList,
ClassID const & classID,
uint32 direction,
uint32 duration 
) const
pure virtual

Sets the page transition information for the spreads included in the given UIDList

Parameters
uidListIN: The UIDList of spreads to set the page transition
classIDIN: The class ID of the transition, may be kInvalidClass if no transition applied
directionIN: The direction of the transition
durationIN: The duration of the transition (in ticks - 60 ticks per second)
Returns
kSuccess, or ErrorCode
virtual bool Facade::IPageTransitionFacade::SpreadHasPageTransition (UIDRef const & spreadRef) const
pure virtual

Determine if the given spread has a page transition defined

Parameters
spreadRefIN: The UIDRef of spread to look for the page transition
Returns
true if there is a page tranition defined for the spread, false otherwise
virtual bool Facade::IPageTransitionFacade::SpreadsHavePageTransition (UIDList const & spreadList) const
pure virtual

Determine if the given spread list has a page transition defined or not. As long as there is one spread has page transition, we return true

Parameters
spreadListIN: The given spread list to check the page transition
Returns
true if there is one spread has page tranition defined; otherwise return false.
virtual bool Facade::IPageTransitionFacade::ValidPageTransitionDirection (ClassID const & classID,
const uint32 direction 
) const
pure virtual

Determine if the given direction is valid for the page transition with given class ID in the list

Parameters
classIdIN: Class id of page transition
uint32IN: Direction of the page transition to check, as defined in IPageTransition
Returns
bool true if given direction is valid for the given ClassID, false otherwise
See Also
IPageTransition