InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILayoutControlData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Frits Habermann
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 __ILayoutControlData__
25 #define __ILayoutControlData__
26 
27 #include "IPMUnknown.h"
28 #include "LayoutUIID.h"
29 
30 class IGeometry;
31 class IDocumentLayer;
32 class IHierarchy;
33 class IDocumentLayer;
34 class IDocument;
35 class ISnapTo;
36 class UIDList;
37 
38 
39 
47 {
49  friend class OpenLayoutWinCmd;
51  friend class SetSpreadCmd;
53  friend class NavLayoutWidgetObs;
55  friend class CreatePrintLayoutViewCmd;
56 
57 public:
58  enum { kDefaultIID = IID_ILAYOUTCONTROLDATA };
59 
67  {
68  kFitNone = 0, // Do no modifications to view pct
69  kFitSpread = 1, // Fit current spread in window
70  kFitPage = 2, // Fit current page in window
71  kFitPasteboard = 3 // Fit all spreads in window
72  };
73 
74  // ----- View stuff -----
75 
76 
81  virtual void SetFit(FitSetting fit) = 0;
82 
87  virtual FitSetting GetFit() = 0;
88 
89  // ----- Spread stuff -----
90 
98  virtual void SetSpreadRef(const UIDRef& newSpread, bool16 bDeselect, bool16 bWithinSetPageCmd = kFalse) = 0;
99 public:
100 
101  // ----- Page stuff -----
102 
107  virtual UID GetPage() const= 0;
108 
109 
110  // ----- Layer stuff -----
111 
112 
117  virtual void SetActiveDocLayerUID(UID newActiveLayer) = 0;
118 
119 
124  virtual UID GetActiveDocLayerUID() = 0;
125 
126 
127 
136  virtual UID GetActiveLayerUID(bool16 wantGuidesUID = kFalse, UID docLayerUID = kInvalidUID) = 0;
137 
142  virtual IDocumentLayer* QueryActiveDocLayer() = 0;
143 
149  virtual IHierarchy* QueryActiveLayer(bool16 wantGuidesHierarchy = kFalse) = 0;
150 
151 
152  // ----- Master page stuff -------
153 
160  virtual void GetAllSpreads(UID spreadUID, UIDList *spreadList) = 0;
161 
162  // ----- Document stuff -----
163 
164 private:
172  virtual void SetDocument(IDocument *doc) = 0;
173 public:
174 
180  virtual IDocument* GetDocument() = 0;
181  // Set and get the document that this widget is currently
182  // viewing. SetDocument is called with nil when the layout window is closing.
183  // Allows observers hooked up via layout actions to detach.
184 
185 
186  // ----- Snap to stuff (used by cursor providers only, not trackers) -----
187 
193  virtual void SetCursorSnapTo(ISnapTo* snapTo) = 0;
194 
199  virtual ISnapTo* GetCursorSnapTo() = 0;
200 
201 
206  virtual void Shutdown (void) = 0;
207 
223  virtual void AttachDocObservers(const IDocument* doc) = 0;
224 
229  virtual void DetachWorkspaceObservers(const IDocument* doc) = 0;
230 
235  virtual void DetachDocObservers(const IDocument* doc) = 0;
236 
242  virtual void AttachWorkspaceObservers(const IDocument* doc) = 0;
243 
248  virtual void SetDefaultDocLayer() = 0;
249 
250 
255  virtual const UIDRef& GetSpreadRef() const = 0;
256 
259  virtual void AttachSpreadObservers(const UIDRef& spreadRef) = 0;
260  virtual void DetachSpreadObservers() = 0;
261 };
262 
263 #endif