InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLNodeSelectionSuite.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Ryan Gano
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 // Note:
24 //
25 //========================================================================================
26 
27 #ifndef _IXMLNodeSelectionSuite_
28 #define _IXMLNodeSelectionSuite_
29 //________________________________________________________________________________________________
30 // INCLUDES
31 //________________________________________________________________________________________________
32 #include "ShuksanID.h"
33 #include "IPMUnknown.h"
34 #include "XMediaUIID.h"
35 #include "XMLID.h"
36 #include "NodeID.h"
37 #include "ISelectionMessages.h"
38 #include "XMLAttributeReference.h"
39 
40 
41 //================================================================================================
42 //________________________________________________________________________________________________
43 // CLASS DECLARATION
44 //________________________________________________________________________________________________
45 //#define IID_IXMLStructureSelection_ISUITE kShuksanPrefix + 128
46 
50  {
51  //____________________________________________________________________________________________
52  // Data Types
53  //____________________________________________________________________________________________
54  public:
55  enum { kDefaultIID = IID_IXMLNODESELECTIONSUITE };
56 
57  //____________________________________________________________________________________________
58  // Member functions
59  //____________________________________________________________________________________________
60  public:
61 
66  virtual void SelectAttribute(const XMLAttributeReference& newItem, Selection::Action selectionMode) = 0;
67 
72  virtual void SelectAttribute(const K2Vector<XMLAttributeReference>* newItems, Selection::Action selectionMode) = 0;
73 
77  virtual void DeselectAttribute(const K2Vector<XMLAttributeReference>* itemsToDeselect) = 0;
78 // virtual void DeselectAllAttributeExcept (const XMLAttributeReference&, bool16) = 0;
79 // virtual void DeselectAllAttribute (bool16 drawit) = 0;
80 
81 
86  virtual void SelectElement(const XMLReference& newItem, Selection::Action selectionMode) = 0;
87 
92  virtual void SelectElement(const K2Vector<XMLReference>* newItems, Selection::Action selectionMode) = 0;
93 
97  virtual void DeselectElement(const K2Vector<XMLReference>* itemsToDeselect) = 0;
98 // virtual void DeselectAllElementExcept (const XMLReference&, bool16) = 0;
99 // virtual void DeselectAllElement (bool16 drawit) = 0;
100 
101 
106  virtual void Select (IPMUnknown* targetBoss, Selection::Action selectionMode) = 0;
107 
111  virtual void DeselectAll (bool8 notifyofSelectionChange = true) = 0;
112 
115  virtual void SelectAll (void) = 0;
116 
117  // Selection Utilities
118 
123  virtual bool16 IsElementSelected (const XMLReference& itemNode) = 0;
124 
129  virtual bool16 IsAttributeSelected (const XMLAttributeReference& itemNode) = 0;
130 
134  virtual bool16 IsEmpty (void) const = 0;
135 
136  // Structure Specific Utilities
137 
142  virtual bool16 IsMixedSelection () const = 0;
143 
144 
149  virtual bool16 IsNonAttributeSelected() const = 0;
150 
155  virtual bool16 IsNonAttributeSelected(const XMLReference& itemNode) const = 0;
156 
157 
161  virtual bool16 IsElementOnlySelection () const = 0;
162 
166  virtual bool16 IsSingleElementSelection () const = 0;
167 
168 
171  virtual bool16 IsCommentOnlySelection() const = 0;
172 
175  virtual bool16 IsSingleCommentSelection() const = 0;
176 
177 
180  virtual bool16 IsPIOnlySelection() const = 0;
181 
184  virtual bool16 IsSinglePISelection() const = 0;
185 
186 
191  virtual bool16 IsAttributeOnlySelection () const = 0;
192 
196  virtual bool16 IsSingleAttributeSelection () const = 0;
197 
198 
203  virtual bool16 AreAnyTextSnippetsSelected () const = 0;
204 
205 
209  virtual bool16 IsDocElementSelected() const = 0;
210 
214  virtual bool16 IsRootElementSelected() const = 0;
215 
219  virtual bool16 IsDOCTYPEElementSelected() const = 0;
220  };
221 
224  {
225  //____________________________________________________________________________________________
226  // Data Types
227  //____________________________________________________________________________________________
228  public:
229  enum ActionType { kDeselectAll};
230 
231  //____________________________________________________________________________________________
232  // Member Functions
233  //____________________________________________________________________________________________
234  virtual ActionType GetActionType (void) const = 0;
235  virtual bool16 GetDrawIt (void) const = 0;
236  };
237 
238 #endif // _IXMLNodeSelectionSuite_