InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLRuleActionFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Lonnie Millett
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 // Purpose:
24 // Processes commands for creating, deleting, and manipulating XML element attributes.
25 //
26 //========================================================================================
27 
28 #ifndef __IXMLRuleActionFacade__
29 #define __IXMLRuleActionFacade__
30 
31 #include "IPMUnknown.h"
32 #include "XMLID.h"
33 #include "XMLReference.h"
34 #include "ISpread.h"
35 
36 class ICommand;
37 
40 namespace Facade
41 {
43  {
44  public:
45  enum {kDefaultIID = IID_IXMLRULEACTIONFACADE};
46 
47 
56  virtual ErrorCode ApplyParagraphStyle(const IIDXMLElement *element, const PMString& styleString, bool16 clearOverrides) = 0;
57 
58 
67  virtual ErrorCode ApplyParagraphStyle(const IIDXMLElement *element, const UIDRef& styleRef, bool16 clearOverrides) = 0;
68 
75  virtual ErrorCode ApplyCharacterStyle(const IIDXMLElement *element, const PMString& styleString) = 0;
76 
84  virtual ErrorCode ApplyCharacterStyle(const IIDXMLElement *element, const UIDRef& styleRef) = 0;
85 
94  virtual ErrorCode ApplyObjectStyle(const IIDXMLElement *element, const PMString& styleName, bool16 clearOverrides, bool16 clearOverridesThruRoot) = 0;
95 
104  virtual ErrorCode ApplyObjectStyle(const IIDXMLElement *element, const UIDRef& styleRef, bool16 clearOverrides, bool16 clearOverridesThruRoot) = 0;
105 
106  enum ElementLocation { kAtStart, kAtEnd };
115  virtual ErrorCode ConvertAttributeToChildElement(IIDXMLElement *element, const PMString& attributeName, ElementLocation location, const PMString& alternateTagName = "", XMLReference* outNewChildElement = nil) = 0;
116 
124  virtual ErrorCode ConvertAttributeToChildElement(IIDXMLElement *element, const WideString& attributeName, ElementLocation location, const WideString& alternateTagName = (WideString)"", XMLReference* outNewChildElement = nil) = 0;
125 
134  //virtual ErrorCode ConvertElementToAttributeOnParent(IIDXMLElement *element, const PMString& alternateAttributeName = "", PMString* outNewAttrName = nil) = 0;
135 
142  virtual ErrorCode ConvertElementToAttributeOnParent(IIDXMLElement *element, const WideString& alternateAttributeName = (WideString)"", WideString* outNewAttrName = nil) = 0;
143 
152  virtual ErrorCode ConvertElementToTable(IIDXMLElement* element, const PMString& tableRowTagName, const PMString& tableCellTagName, UIDRef& newTable ) = 0;
153 
161  virtual ErrorCode ConvertElementToTable(IIDXMLElement* element, const WideString& tableRowTagName, const WideString& tableCellTagName, UIDRef& newTable ) = 0;
162 
169  virtual ErrorCode PlaceIntoFrame(const IIDXMLElement *element, ISpread* spread, const PMRect& pasteboardBounds, UIDRef& newFrame) = 0;
170 
180  virtual ErrorCode PlaceIntoCopy(const IIDXMLElement *element, ISpread* spread, const PMPoint& pasteboardLocation, UID frameToCopy, bool16 retainExistingFrame, UIDRef& newFrame) = 0;
181 
188  virtual ErrorCode PlaceIntoInlineFrame(const IIDXMLElement *element, const PMPoint& dimensions, UIDRef& newFrame) = 0;
189 
197  virtual ErrorCode PlaceIntoInlineCopy(const IIDXMLElement *element, UID frameToCopy, bool16 retainExistingFrame, UIDRef& newFrame) = 0;
198 
205  virtual ErrorCode SetContent(const IIDXMLElement *element, const PMString& filePath, const PMString& baseReleativePath = "") = 0;
206 
207  virtual UID PlaceOntoPage(const IIDXMLElement *element, const UIDRef& pageOrSpread, const PMPoint& placePoint, bool16 autoflow) = 0;
208 
212  virtual UIDList GetElementFrames(const IIDXMLElement *element) = 0;
213  };
214 }
215 #endif // __IXMLRuleActionFacade__