InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IHierarchyUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
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 __IHierarchyUtils__
25 #define __IHierarchyUtils__
26 
27 #include "GenericID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 #include "IHierarchy.h" // for kAtTheEnd
31 
36 {
37 public:
38  enum { kDefaultIID = IID_IHIERARCHYUTILS };
39 
47  virtual ErrorCode AddToHierarchy(IDataBase *db, UID itemToAdd, UID parent, int32 pos = IHierarchy::kAtTheEnd) = 0;
48 
55  virtual ErrorCode AddToHierarchy(const UIDRef& itemToAdd, UID parent, int32 pos = IHierarchy::kAtTheEnd) = 0;
56 
61  virtual ErrorCode RemoveFromHierarchy(const UIDRef& itemToRemove) = 0;
62 
69  virtual void FilterItemsFromOtherSpreads(UID keepSpreadUID, UIDList* itemList) = 0;
70 
76  virtual void CollapsePageUIDsToSpreadUIDs(const UIDList& pageUIDList, UIDList* spreadUIDList, const bool16 bCompleteSpreadsOnly) = 0;
77 
83  virtual void ExpandSpreadUIDsToPageUIDs(const UIDList& spreadUIDList, UIDList* pageUIDList) = 0;
84 
90  virtual void ExpandPageUIDToSection(const UIDRef& pageRef, UIDList* pageUIDList, const bool16 bRequireNamedLayout) = 0;
91 
97  virtual void CollapsePageUIDsToSections(const UIDList& pageUIDList, K2Vector<UIDList>& pagesBySection, const bool16 bRequireNamedLayout) = 0;
98 
104  virtual IHierarchy * QueryEffectiveHierarchyParent(IHierarchy* pi) const = 0;
105 };
106 
107 
108 #endif // __IHierarchyUtils__