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

#include <ICopyCmdData.h>

Inheritance diagram for ICopyCmdData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICOPYCMDDATA }
 

Public Member Functions

virtual void Set (ICommand *rootCmd, UIDList *inputItems, const UIDRef &parent, IDataExchangeHandler *destinationHandler=nil)=0
 
virtual void SetTransform (const PMMatrix &transform)=0
 
virtual void SetOffset (const PMPoint &offset)=0
 
virtual void SetParent (const UIDRef &parent)=0
 
virtual const UIDRefGetParent () const =0
 
virtual const UIDListGetInputItems () const =0
 
virtual const PMMatrixGetTransform () const =0
 
virtual bool16 GetTransformWasExplicitlySet () const =0
 
virtual const PBPMPointGetOffset () const =0
 
virtual const UIDListGetTotalList ()=0
 
virtual ICommandGetCopyCmd (UID id)=0
 
virtual ICommandGetRootCmd () const =0
 
virtual ICommandGetCopyCmd (ClassID clsID, int32 which, int32 *index=nil)=0
 
virtual void ReleaseDestinationHandler ()=0
 
virtual IDataExchangeHandlerGetDestinationHandler () const =0
 
virtual void SetCopySourceCMSProfilesToTarget (bool16 bCopyProfiles)=0
 
virtual bool16 CopySourceCMSProfilesToTarget () 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

Data interface for copying and duplicating page items.

Member Function Documentation

virtual bool16 ICopyCmdData::CopySourceCMSProfilesToTarget () const
pure virtual

Retrieve value set in SetCopySourceCMSProfilesToTarget for whether color profiles should be copied to target.

Returns
kTrue if color profiles should be copied. kFalse otherwise.
virtual ICommand* ICopyCmdData::GetCopyCmd (UID id)
pure virtual

Return the copy command for an item, may return nil.

Parameters
idUID of item to copy.
Returns
The copy command (ICommand*).
virtual ICommand* ICopyCmdData::GetCopyCmd (ClassID clsID,
int32 which,
int32 * index = nil 
)
pure virtual

Return a particular sub command

Parameters
clsIDthe ClassID of the command you are searching for.
whichspecify the index of command with the given ClassID you are searching for.
indexWhen called recursively, index should always be non-nil.
Returns
ICommand the requested command, may be nil.
virtual IDataExchangeHandler* ICopyCmdData::GetDestinationHandler () const
pure virtual

Returns the target dataHandler. If nil, this means the destination is the clipboard.

Returns
The target data exchange handler.
virtual const UIDList* ICopyCmdData::GetInputItems () const
pure virtual

Returns the list of items that have been set.

Returns
the list of items that have been set.
virtual const PBPMPoint& ICopyCmdData::GetOffset () const
pure virtual

Returns the value from SetOffset. Defaults to 0.0, 0.0

Returns
the offset to move the item(s)
virtual const UIDRef& ICopyCmdData::GetParent () const
pure virtual

Return the parent for the target of the copied items. Could be the scrap, a spread layer, or other.

Parameters
parentthe destination parent for the command (often the scrap or a spread layer)
virtual ICommand* ICopyCmdData::GetRootCmd () const
pure virtual

Returns the command from the Set method above.

Returns
ICommand
virtual const UIDList* ICopyCmdData::GetTotalList ()
pure virtual

Returns the complete list of items, including items from any and all sub-commands.

Returns
A UID list of all copied items.
virtual const PMMatrix& ICopyCmdData::GetTransform () const
pure virtual

Returns the value from SetTransform.

Returns
const PMMatrix&
virtual bool16 ICopyCmdData::GetTransformWasExplicitlySet () const
pure virtual

Used to determine if SetTransform has been called.

Returns
kTrue if SetTransform was called, kFalse otherwise.
virtual void ICopyCmdData::ReleaseDestinationHandler ()
pure virtual

Commands often need access to the dataHandler that will be the target of a copy-to-scrap command. but the lifetime data handlers is very short because we revert scrap databases frequently. ReleaseDestinationHandler should be called soon after the command has completed, and definitely before the affected scrap gets reverted.

virtual void ICopyCmdData::Set (ICommandrootCmd,
UIDListinputItems,
const UIDRefparent,
IDataExchangeHandlerdestinationHandler = nil 
)
pure virtual

Set up the data need for a copy, paste, or duplicate command.

Parameters
rootCmd,rootcommand to hold all sub commands, typically is a kCopyCmdBoss, kDuplicateCmdBoss or other command that supports IID_ICOPYCMDDATA.
inputItemsthe list of items. This interface takes ownership of the pointer.
parentthe destination parent for the command (often the scrap or a spread layer)
destinationHandlerSets the target dataHandler. Defauts to nil, which means the destination is the clipboard.
virtual void ICopyCmdData::SetCopySourceCMSProfilesToTarget (bool16 bCopyProfiles)
pure virtual

If the color profiles from the source document should be copied to the target, set to kTrue.

Parameters
bCopyProfilesIN Set to kTrue if you need to copy color profiles. Defaults to kFalse.
virtual void ICopyCmdData::SetOffset (const PMPointoffset)
pure virtual

If the item being copied (pasted) needs to be offset then an offset should be supplied

Parameters
offsetIN the offset in pasteboard coordinates.
virtual void ICopyCmdData::SetParent (const UIDRefparent)
pure virtual

Set the parent for the target of the copied items. Could be the scrap, a spread layer, or other.

Parameters
theUIDRef of the parent for the target of the copied items.
virtual void ICopyCmdData::SetTransform (const PMMatrixtransform)
pure virtual

If the item being copied was a sub item of a frame or group then we want to capture the transform of all its parents so that when it is pasted it appears correctly oriented.

Parameters
transform