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

#include <IXMLDupElementsCmdData.h>

Inheritance diagram for IXMLDupElementsCmdData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLDUPELEMENTSCMDDATA }
 

Public Member Functions

virtual void SetSource (const XMLReference &sourceXMLRef)=0
 
virtual void SetDestination (const XMLReference &destXMLRef, int32 destIndex)=0
 
virtual const XMLReferenceGetDestinationXMLRef (void) const =0
 
virtual const XMLReferenceGetSourceXMLRef (int32 index) const =0
 
virtual int32 GetDestinationIndex ()=0
 
virtual int32 SourceSize ()=0
 
virtual void SetCreatedElements (const K2Vector< XMLReference > &duplicatedElements)=0
 
virtual const K2Vector
< XMLReference > & 
GetCreatedElements ()=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 used by command for duplicating XML elements. If the target range is set up, it will be used to determine where the elements are to be duplicated to, else they will be duplicated in place. Descendants of the nodes being duplicated will be added in to the processing; it is the sub-tree descending from a given node that is duplicated, for each node.

Member Function Documentation

virtual const K2Vector<XMLReference>& IXMLDupElementsCmdData::GetCreatedElements ()
pure virtual

Accessor for newly duplicated elements.

Returns
a list of duplicated elements
virtual int32 IXMLDupElementsCmdData::GetDestinationIndex ()
pure virtual

Accessor for the position in the list of children of the destination node where the duplicated nodes are heading, stored on this interface

Returns
int32 index in parent of duplicated node(s)
virtual const XMLReference& IXMLDupElementsCmdData::GetDestinationXMLRef (void ) const
pure virtual

Accessor for destination node that is to be new parent for duplicated nodes

Returns
XMLReference for destination node stored on this interface
virtual const XMLReference& IXMLDupElementsCmdData::GetSourceXMLRef (int32 index) const
pure virtual

Accessor for entries in the list of source nodes to be duplicated stored on this interface, by index in the list

Parameters
indexzero-based index, specifying position of interest for a source node, 0 < index < SourceSize()
Returns
XMLReference for source node at specified index in list of nodes to be duplicated
virtual void IXMLDupElementsCmdData::SetCreatedElements (const K2Vector< XMLReference > & duplicatedElements)
pure virtual

Specify the list of duplicated elements. Used by the command when duplication is complete to post the results.

Parameters
duplicatedElementsthe list of newly duplicated elements
virtual void IXMLDupElementsCmdData::SetDestination (const XMLReferencedestXMLRef,
int32 destIndex 
)
pure virtual

Specify a destination node in the structure tree to be parent to newly created duplicate items. The behaviour of the command if no destination is specified is to duplicate each item added in SetSource() with a destination equal to the end of that source, as a sibling element.

Parameters
destXMLRefnew parent for duplicated nodes
destIndexspecify an index in the list of children, or e.g. IIDXMLElement::kEndIndex to add as last child
virtual void IXMLDupElementsCmdData::SetSource (const XMLReferencesourceXMLRef)
pure virtual

SetSource() must be called at least once, and can be called as many times as needed to set up source XML nodes to duplicate.

Parameters
sourceXMLRefspecifies element to add to list of nodes to duplicate
virtual int32 IXMLDupElementsCmdData::SourceSize ()
pure virtual

Accessor for the number of nodes in the source list, i.e. indicates how many times SetSource was called with distinct XMLReference's on this.

Returns
int32 giving number of nodes in source list