InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISelectionManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Martz
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 _ISelectionManager_
28 #define _ISelectionManager_
29 //________________________________________________________________________________________________
30 // INCLUDES
31 //________________________________________________________________________________________________
32  //.......Interface headers....................................................................
33  #include "IPMUnknown.h"
34  #include "ISelectionMessages.h"
35 
36  //.......ID headers...........................................................................
37  #include "ShuksanID.h"
38 
39 //________________________________________________________________________________________________
40 // DEFINES
41 //________________________________________________________________________________________________
42 //#define USE_ILDETASK_FOR_SELATTR_CHANGED 1
43 //#define USE_ILDETASK_FOR_SEL_CHANGED 1
44 //================================================================================================
45 //________________________________________________________________________________________________
46 // CLASS FORWARDS
47 //________________________________________________________________________________________________
48  class SelectionMessage;
49  class IConcreteSelection;
50  class IDefaultCSB;
51  class IDataBase;
52  class PrivateSelectionAccess;
53  class IActiveContext;
54  class InternalSelectionMessage;
55  class IdleTimer;
56 //________________________________________________________________________________________________
57 // CLASS DECLARATION
58 //________________________________________________________________________________________________
63  {
64  //____________________________________________________________________________________________
65  // Do Not copy this idiom
66  //
67  // DO NOT ADD FRIENDS TO THIS CLASS WITHOUT DISCUSSING IT WITH MICAHEL MARTZ
68  //
69  //____________________________________________________________________________________________
70  friend class PrivateSelectionAccess;
71 
72  //____________________________________________________________________________________________
73  // Data Types
74  //____________________________________________________________________________________________
75  public:
76  enum { kDefaultIID = IID_ISELECTIONMANAGER };
77 
78  enum ConcreteBossListType { kEnabledCSBs, kDisabledCSBs, kDefaultCSB, kSelectionCSBs, kAllCSBs };
79  enum ExistsType { kUniqueSelection, kMixedSelection, kAnySelection };
80  enum InterfaceType { kEnabledInterface, kAnyInterface};
81 
83  //____________________________________________________________________________________________
84  // Member functions
85  //____________________________________________________________________________________________
86  public:
87  //........................................................................................
88  // Utility
89  //........................................................................................
95  virtual bool16 IsInterfaceEnabled (const PMIID& interfaceID) const = 0;
96 
103  virtual IPMUnknown* QueryIntegratorSuite (const PMIID& interfaceID, InterfaceType) const = 0;
104 
105  //........................................................................................
106  // View Selection
107  //........................................................................................
115  virtual void Startup (IDataBase* db, const UIDRef& owner) = 0;
119  virtual void Shutdown (void) = 0;
120 
127  virtual IDataBase* GetDataBase (void) const = 0;
128 
135  virtual UIDRef GetSelectionsOwner (void) const = 0;
136 
150  virtual bool16 SelectionExists (ClassID, ExistsType = kAnySelection) const = 0;
151 
152 #ifdef ID_DEPRECATED
153 
158  virtual IConcreteSelection* QueryConcreteSelectionBoss (ClassID) const = 0;
159 #endif // ID_DEPRECATED
160 
165  virtual void BroadcastMessage (SuiteBroadcastData*) const = 0;
166 
176  virtual void SelectAll (IActiveContext* iContext, K2Vector<ClassID>* csbList) const = 0;
177 
183  virtual void DeselectAll (K2Vector<ClassID>* csbList) const = 0;
184 
185 
189  inline void DeselectAllNoBroadcast(K2Vector<ClassID>* csbList) const
190  { //implement this to not notify selection observers so that the UI doesn't flash
191  DeselectAll (csbList);
192  }
193 
198  virtual void DeselectAllExcept (K2Vector<ClassID>* csbKeepList) const = 0;
199 
200  //........................................................................................
201  // Internal Selection Utilities
202  //........................................................................................
206  virtual bool16 BroadcastQueuedMessages (IdleTimer*) = 0;
207 
212 
216  virtual void CSBHasQueuedMessages (ClassID, ISelectionMessage::SelectionMessageType) = 0;
217 
218  private:
222  virtual IConcreteSelection* QueryConcreteSelectionBoss_Private (ClassID) const = 0;
226  virtual IDefaultCSB* QueryDefaultSelectionBoss_Private (void) const = 0;
230  virtual ConcreteSelectionBossCollection* QueryConcreteSelectionBosses_Private (ConcreteBossListType, const PMIID&) const = 0;
231  };
232 
233 #endif // _ISelectionManager_