InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDocumentUIUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: hhorton
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 _H_IDocumentUIUtils
25 #define _H_IDocumentUIUtils
26 
27 #include "IPMUnknown.h"
28 #include "IDocument.h"
29 #include "IDataBase.h"
30 #include "IErrorState.h"
31 #include "AppUIID.h"
32 #include <boost/function.hpp>
33 #include "IDocumentPresentation.h"
34 #include "Utils.h"
35 #include "CAlert.h"
36 
37 class PaletteRef;
38 
44 typedef unary_presentation_predicate FindPresentation_CriteriaFunc;
45 typedef unary_presentation_predicate* FindPresentation_Criteria;
46 typedef std::vector<FindPresentation_Criteria> FindPresentation_PreferCriteria;
47 
52 typedef binary_presentation_predicate FindRelatedPresentation_CriteriaFunc;
53 typedef binary_presentation_predicate* FindRelatedPresentation_Criteria;
54 typedef std::vector<FindRelatedPresentation_Criteria> FindRelatedPresentation_PreferCriteria;
55 
57 
61 {
62 public:
63  enum { kDefaultIID = IID_IDOCUMENTUIUTILS };
64 
70  virtual IDocumentPresentation* GetActiveDocumentPresentation() = 0; // FIXME_OWL2: remove or convert to inline call to GetDocumentPresentationFromActiveContext when we understand more subtle cases
71 
81 
87  virtual IDocumentPresentation* FindPresentationForDocument(IDataBase* db, const FindPresentation_Criteria& acceptCriteria, const FindPresentation_PreferCriteria& preferCriteria) = 0;
88 
94  virtual uint32 FindPresentationsForDocument(IDataBase* db, PresentationSequence&, const FindPresentation_Criteria& acceptCriteria, const FindPresentation_PreferCriteria& preferCriteria) = 0;
95 
101 
112  virtual uint32 FindRelatedPresentations(IDataBase* db, IDocumentPresentation* me, PresentationSequence& myRelatives,
113  const FindRelatedPresentation_Criteria& acceptCriteria, const FindRelatedPresentation_PreferCriteria& preferCriteria,
114  bool16 includeMe = kTrue) = 0;
115 
119  virtual void CascadeFloatingDocumentWindows( bool16 currentDocOnly ) = 0;
120 
123  virtual void TileDocumentWindows() = 0;
124 
127  //virtual void NextWindow() = 0;
128  // Cycle through document tabs in the active pane
129  virtual void CycleNextPresentationToFront() = 0;
130  // Cycle through top level document bearing windows (CS3 behavior)
131  virtual void CycleNextPresentationWindowToFront() = 0;
132 
135  //virtual void PreviousWindow() = 0;
136  // Cycle through document tabs in the active pane
137  virtual void CycleLastPresentationToFront() = 0;
138  // Cycle through top level document bearing windows (CS3 behavior)
139  virtual void CycleLastPresentationWindowToFront() = 0;
140 
146  //virtual void AdjustDocumentWindowsBounds(ClassID theTriggeringChange = kInvalidClass) = 0;
147  virtual void AdjustDocumentPresentationsBounds(ClassID theTriggeringChange = kInvalidClass) = 0;
148 
154  //virtual void AdjustDocumentWindowBounds(IWindow* docWindow, ClassID theTriggeringChange = kInvalidClass) = 0;
155  virtual void AdjustDocumentPresentationBounds(IDocumentPresentation* presentation, ClassID theTriggeringChange = kInvalidClass) = 0;
156 
157  // Refactored methods (from IDocumentUIUtils)
158 
164  virtual bool16 CloseActivePresentation(bool16 allowCancel = kTrue) = 0;
165 
171  virtual bool16 CloseActiveDocument(bool16 allowCancel = kTrue, UIFlags uiFlags = kFullUI) = 0;
172 
177  //virtual bool16 CloseDocWindow(IWindow* window, bool16 allowCancel = kTrue) = 0;
178  virtual bool16 CloseDocumentPresentation(IDocumentPresentation* presentation, bool16 allowCancel = kTrue) = 0;
179 
184  virtual bool16 RevertActiveDocument(bool16 allowCancel = kTrue) = 0;
185 
189  virtual void UpdatePresentationLabels(IDocument *doc) = 0;
190 
194  virtual void UpdateDocumentIsModifiedIndicators(IDocument *doc = NULL) = 0;
195 
199  virtual void SuspendActivePresentationConsistencyCheck(bool16 suspend = kTrue) = 0;
200 
208  virtual ErrorCode DispatchPresentationSignalToAllResponders( IDocument* document, IDocumentPresentation* presentation, ServiceID serviceID ) const = 0 ;
209 
214 
218 
222  virtual void ShowHideDocumentWindows(bool16 show) = 0;
223 
224 };
225 
226 #endif /* _H_IDocumentUIUtils */