InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLElementCommands.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: robin briggs
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 __IXMLElementCommands__
25 #define __IXMLElementCommands__
26 
27 #include "XMLID.h"
28 #include "XMLReference.h"
29 #include "TableTypes.h" // for GridID
30 #include "TableTagData.h"
31 
32 class ICommand;
33 class ITextStoryThread;
34 class RangeData;
35 class XMLDTDInsertElement;
36 class XMLDTDReplaceElement;
37 
46 {
47  public:
48  enum {kDefaultIID = IID_IXMLELEMENTCOMMANDS};
49 
69  virtual ErrorCode CreateElement(const WideString& tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference& parentXMLR = kInvalidXMLReference, XMLReference *createdElement = nil, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
70 
88  virtual ICommand* CreateElementCommand(const WideString& tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference& parentXMLR = kInvalidXMLReference, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
89 
102  virtual ErrorCode CreateElement(const WideString& tagToApply, UIDRef storyUIDRef, const RangeData& range, const XMLReference& parentXMLR = kInvalidXMLReference, XMLReference *createdElement = nil, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
103 
115  virtual ICommand* CreateElementCommand(const WideString& tagToApply, UIDRef storyUIDRef, const RangeData& range, const XMLReference& parentXMLR = kInvalidXMLReference, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
116 
130  virtual ErrorCode CreateElement(UID tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference& parentXMLRef = kInvalidXMLReference, XMLReference *createdElement = nil, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
131 
144  virtual ICommand* CreateElementCommand(UID tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference& parentXMLRef = kInvalidXMLReference, bool16 doVerify = kTrue, bool16 useExistingMarkers = kFalse) = 0;
145 
159  virtual ErrorCode CreateElement(const WideString& tagToApply, UID contentItem, const XMLReference& parentXMLRef, int32 indexInParent, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
160 
172  virtual ErrorCode CreateElement(UID tagToApply, UID contentItem, const XMLReference& parentXMLRef, int32 indexInParent, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
173 
184  virtual ErrorCode CreateElement(const WideString& tagToApply, const UIDRef& table, GridID anchor, const GridSpan& span, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
185 
196  virtual ErrorCode CreateElement(UID tagToApply, const UIDRef& table, GridID anchor, const GridSpan& span, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
197 
206  virtual ErrorCode CreateElement(const WideString& tagToApply, const UIDRef& tableModelUIDRef, GridID cellGridID, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
207 
216  virtual ErrorCode CreateElement(UID tagToApply, const UIDRef& tableModelUIDRef, GridID cellGridID, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
217 
225  virtual ICommand *CreateElementCommand(UID tagToApply, const UIDRef& tableModelUIDRef, GridID cellGridID, bool16 doVerify = kTrue) = 0;
226 
233  virtual ErrorCode CreateElement(const XMLDTDInsertElement& xmlDTDInsertElement, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
234 
246  virtual ErrorCode CreateElement(UID tagToApply, const UIDRef& storyUIDRef, UID contentItem, bool16 addToDocRefList, XMLReference *createdElement = nil, bool16 doVerify = kTrue) = 0;
247 
257  virtual ErrorCode CreateTableElement(const WideString& tableTagToApply, const WideString& tableCellTagToApply, const UIDRef& storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
258 
259 
268  virtual ICommand *CreateTableElementCommand(const WideString& tableTagToApply, const WideString& tableCellTagToApply, const UIDRef& storyUIDRef, TextIndex textIndex, bool16 doVerify = kTrue) = 0;
269 
270 
280  virtual ErrorCode CreateTableElement(UID tableTagToApply, UID tableCellTagToApply, const UIDRef& storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
281 
282 
291  virtual ICommand *CreateTableElementCommand(UID tableTagToApply, UID tableCellTagToApply, const UIDRef& storyUIDRef, TextIndex textIndex, bool16 doVerify = kTrue) = 0;
292 
293 
302  virtual ErrorCode CreateTableElement(const WideString& tableTagToApply, const WideString& tableCellTagToApply, const UIDRef& tableModelUIDRef, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
303 
304 
312  virtual ICommand *CreateTableElementCommand(const WideString& tableTagToApply, const WideString& tableCellTagToApply, const UIDRef& tableModelUIDRef, bool16 doVerify = kTrue) = 0;
313 
314 
323  virtual ErrorCode CreateTableElement(UID tableTagToApply, UID tableCellTagToApply, const UIDRef& tableModelUIDRef, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
324 
325 
333  virtual ICommand *CreateTableElementCommand(UID tableTagToApply, UID tableCellTagToApply, const UIDRef& tableModelUIDRef, bool16 doVerify = kTrue) = 0;
334 
342  virtual ErrorCode CreateTableElement(const TableTagData& tableTagData, const UIDRef& tableModelUIDRef, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
343 
352  virtual ErrorCode CreateTableElement(const TableTagData& tableTagData, const UIDRef& storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement = nil, bool16 doVerify = kTrue) = 0;
353 
360  virtual ICommand *CreateTableElementCommand(const TableTagData& tableTagData, const UIDRef& tableModelUIDRef, bool16 doVerify = kTrue) = 0;
361 
369  virtual ICommand *CreateTableElementCommand(const TableTagData& tableTagData, const UIDRef& storyUIDRef, TextIndex textIndex, bool16 doVerify = kTrue) = 0;
370 
379  virtual ErrorCode CreateStyleToTagElements(const UIDRef& docUIDRef, UID storyTagUID = kInvalidUID) = 0;
380 
393  virtual ErrorCode DeleteElement(const XMLReference& deleteElementXMLRef, bool16 deleteChildren, bool16 deleteInSameStoryOnly = kFalse, bool16 reconnectChildren = kFalse, bool16 doVerify = kTrue) = 0;
394 
407  virtual ICommand *DeleteElementCommand(const XMLReference& deleteElementXMLRef, bool16 deleteChildren, bool16 deleteInSameStoryOnly = kFalse, bool16 reconnectChildren = kFalse, bool16 doVerify = kTrue) = 0;
408 
418  virtual ErrorCode RangeDeleteElement(const UIDRef& storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex) = 0;
419 
425  virtual ErrorCode RangeDeleteElement(const UIDRef& storyUIDRef, const RangeData& range) = 0;
426 
433  virtual ICommand *RangeDeleteElementCommand(const UIDRef& storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex) = 0;
434 
443  virtual ErrorCode DeleteElementAndContent(const XMLReference& deleteElementXMLRef, bool16 deletePageItems = kFalse) = 0;
444 
445 
456  virtual ErrorCode MoveElement(const XMLReference& moveElementXMLRef, const XMLReference& newParentXMLRef, int32 newIndexInParent, TextIndex contentOffset, bool16 doVerify = kTrue) = 0;
457 
458 
465  virtual ErrorCode PlaceElement(const XMLReference& elementToPlace, const UIDRef& graphicFrame) = 0;
466 
473  virtual ErrorCode UnplaceElement(const UIDRef& elementToUnplace) = 0;
474 
480  virtual ICommand *UnplaceElementCommand(const UIDRef& elementToUnplace) = 0;
481 
488  virtual ErrorCode SetElement(const XMLReference& elementRef, UID tag) = 0;
489 
495  virtual ErrorCode SetElement(const XMLReference& elementRef, const WideString& tag) = 0;
496 
504  virtual ErrorCode SetElement(const XMLDTDReplaceElement& replaceElement) = 0;
505 
510  virtual ErrorCode DeleteElementContent(const XMLReference& elementRef) = 0;
511 
513  kTagByRow,
517  };
518 
527  virtual ErrorCode SetTableTagPreference(const XMLReference& tableElement, TableTagPreference newSetting, const TableTagData& tableTagData) = 0;
528 
537  virtual ErrorCode MakeParentStoryThreadTagged(ITextStoryThread *textStoryThread, bool16 doVerify = kTrue) = 0;
538 
539 
540 };
541 
542 #endif // __IXMLElementCommands__