InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IActiveTopicListContext.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michel Hutinel
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 // Comments: This interface saves the informations about the Active TopicList context.
24 //
25 //========================================================================================
26 
27 #ifndef __IActiveTopicListContext__
28 #define __IActiveTopicListContext__
29 
30 #include "IPMUnknown.h"
31 #include "IndexingID.h"
32 #include "IIndexOptions.h"
33 #include "K2Vector.h"
34 #include "UIDRef.h"
35 
36 class ISubject;
37 class ICommand;
38 
43 {
44  public:
46  fCommand(NULL),
47  fTopicListUIDRef(NULL, kInvalidUID),
48  fSelectionNeedsUpdate(kFalse),
49  fSectionId(-1),
50  fNodeId(-1),
51  fPageRefId(-1),
52  fXRefId(-1)
53  {};
54 
55  ICommand* fCommand;
56  UIDRef fTopicListUIDRef;
57  bool16 fSelectionNeedsUpdate;
58  int32 fSectionId;
59  int32 fNodeId;
60  int32 fPageRefId;
61  int32 fXRefId;
62 };
63 
70 {
71  public:
72  enum { kDefaultIID = IID_IACTIVETOPICLISTCONTEXT };
73 
74  typedef enum {
75  kActiveDocumentChange = 0,
76  kDocumentClosed = 1,
77  kActiveBookChange = 2,
78  kBookContentChange = 3,
79  kTopicListCreation = 4,
80  kTopicListDeletion = 5,
81  kAppShutDown = 6,
82  kDocumentWorkspaceLanguageChanged = 7
83  } UpdateReason;
84 
89  virtual const IIndexOptions::Scope GetScope() const = 0;
90 
95  virtual void SetScope(const IIndexOptions::Scope scope) = 0;
96 
103  virtual const UIDRef& GetActiveTopicList(bool16 buildIfNeeded = kTrue, bool16* pIsBuiltByActiveContext = NULL) = 0;
104 
110  virtual UIDRef GetDefaultTopicList(const UIDRef& docRef) const = 0;
111 
115  virtual void GetActiveBookName(PMString& bookName) = 0;
116 
120  virtual UIDRef GetActiveDocument() const = 0;
121 
125  virtual UIDRef GetActiveBook() const = 0;
126 
130  virtual void GetOpenedDocListFromActiveBook(K2Vector<UIDRef>& docList) const = 0;
131 
136  virtual UIDRef GetActiveTopicListFromActiveDocument() const = 0;
137 
141  virtual const bool16 IsBookAble() = 0;
142 
148  virtual int32 GetNumActiveComponents() const = 0;
149 
154  virtual UIDRef GetNthActiveComponent(int32 nth) const = 0;
155 
162  virtual void UpdateContext(IActiveTopicListContext::UpdateReason reason, const UIDRef& updaterRef, bool16 doNotify = kTrue) = 0;
163 
173  virtual void OnTopicListModification(const ClassID& theChange, ISubject* theSubject, const PMIID &protocol, void* changedBy, UIDRef* topicListRef = NULL, bool16 doNotify = kTrue) = 0;
174 
178  virtual void InvalidateActiveTopicList() = 0;
179 };
180 
181 #endif // __IActiveTopicListContext__