InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDrawOptions.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Stephens
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 // Description:
24 // The purpose of this interface is to provide a central location for the various
25 // display settings which have an effect on performance. These settings do NOT affect
26 // printed output and hence do not include settings such as multi vs single line
27 // composition.
28 //
29 // There are 3 standard sets of settings (kFast, kNormal, kHighQuality) allowing
30 // the user to quickly switch between their own definition of these sets as defined
31 // by the settings within the set. The interface is extensible in that third parties
32 // can add their own sets identified by their own setID (which should be their pluginID
33 // plus a constant).
34 //
35 //========================================================================================
36 
37 #ifndef __IDrawOptions__
38 #define __IDrawOptions__
39 
40 #include "IPMUnknown.h"
41 
42 class DrawOptionsSet;
50 class IDrawOptions : public IPMUnknown
51 {
52 public:
54  enum { kDefaultIID = IID_IDRAWOPTIONS };
55 
67  enum
68  {
69  kUseDefault = kMaxUInt32,
70  kFastGroup = 0,
71  kTypicalGroup,
72  kHighQualityGroup,
73  kNavigatorGroup,
74  kFastScrollGroup,
75  kSepPrvGroup,
76  kFlatPrvGroup,
77  kSnapshotUtilsPrvGroup
78  };
79 
86  typedef enum
87  {
88  kRasterGrayOut = 0,
89  kRasterProxy,
90  kRasterHighRes
91  } RasterDisplay;
92 
99  typedef enum
100  {
101  kVectorGrayOut = 0,
102  kVectorProxy,
103  kDisplayList
104  } VectorDisplay;
105 
114  typedef enum
115  {
116  kXPOff = 0,
117  kXPLow,
118  kXPMedium,
119  kXPHigh,
120  kXPMaximum
121  } Transparencies;
122 
123 
126  virtual int32 GetCount(void) const = 0;
127 
133  virtual void SetSet(const DrawOptionsSet& set) = 0;
134 
138  virtual void RemoveSet(uint32 setID) = 0;
139 
143  virtual bool8 SetActiveSetID(uint32 setID) = 0; // returns kTrue if successful
144 
147  virtual uint32 GetActiveSetID(void) const = 0;
148 
154  virtual bool8 GetSetByID(uint32 setID, DrawOptionsSet* result) const = 0;
155 
161  virtual DrawOptionsSet GetSetByIndex(int32 setIndex) const = 0;
162 
166  virtual void SetIgnoreOverrides(bool8 ignore) = 0;
167 
170  virtual bool8 GetIgnoreOverrides(void) const = 0;
171 
176  virtual void SetSaveLocalOverrides(bool8 save) = 0;
177 
181  virtual bool8 GetSaveLocalOverrides() const = 0;
182 
183 };
184 
187 const IDrawOptions::RasterDisplay kDefaultFastRaster = IDrawOptions::kRasterGrayOut;
188 const IDrawOptions::VectorDisplay kDefaultFastVector = IDrawOptions::kVectorGrayOut;
189 const IDrawOptions::Transparencies kDefaultFastXP = IDrawOptions::kXPOff;
190 const bool16 kDefaultFastAntiAlias = kFalse;
191 const double kDefaultFastGreekBelow = 7.0;
192 
195 const IDrawOptions::RasterDisplay kDefaultTypicalRaster = IDrawOptions::kRasterProxy;
196 const IDrawOptions::VectorDisplay kDefaultTypicalVector = IDrawOptions::kVectorProxy;
197 const IDrawOptions::Transparencies kDefaultTypicalXP = IDrawOptions::kXPMedium;
198 const bool16 kDefaultTypicalAntiAlias = kTrue;
199 const double kDefaultTypicalGreekBelow = 7.0;
200 
203 const IDrawOptions::RasterDisplay kDefaultHighQualityRaster = IDrawOptions::kRasterHighRes;
204 const IDrawOptions::VectorDisplay kDefaultHighQualityVector = IDrawOptions::kDisplayList;
205 const IDrawOptions::Transparencies kDefaultHighQualityXP = IDrawOptions::kXPHigh;
206 const bool16 kDefaultHighQualityAntiAlias = kTrue;
207 const double kDefaultHighQualityGreekBelow = 7.0;
208 
211 const IDrawOptions::RasterDisplay kDefaultNavigatorRaster = IDrawOptions::kRasterProxy;
212 const IDrawOptions::VectorDisplay kDefaultNavigatorVector = IDrawOptions::kVectorProxy;
213 const IDrawOptions::Transparencies kDefaultNavigatorXP = IDrawOptions::kXPOff;
214 const bool16 kDefaultNavigatorAntiAlias = kFalse;
215 const double kDefaultNavigatorGreekBelow = 7.0;
216 
219 const IDrawOptions::RasterDisplay kDefaultFastScrollRaster = IDrawOptions::kRasterProxy;
220 const IDrawOptions::VectorDisplay kDefaultFastScrollVector = IDrawOptions::kVectorProxy;
221 const IDrawOptions::Transparencies kDefaultFastScrollXP = IDrawOptions::kXPOff;
222 const bool16 kDefaultFastScrollAntiAlias = kTrue;
223 const double kDefaultFastScrollGreekBelow = 7.0;
224 
231 public:
235 
239  {
240  if ( this != &copy )
241  {
242  setID = copy.setID;
243  raster = copy.raster;
244  vector = copy.vector;
245  xp = copy.xp;
246  antiAlias = copy.antiAlias;
247  greekBelow = copy.greekBelow;
248  }
249 
250  return *this;
251  }
252 
255  bool16 operator == (const DrawOptionsSet& other) const
256  {
257  return
258  setID == other.setID
259  && raster == other.raster
260  && vector == other.vector
261  && xp == other.xp
262  && antiAlias == other.antiAlias
263  && greekBelow == other.greekBelow;
264  }
265 
268  uint32 setID;
282  bool16 antiAlias;
283 };
284 
285 #endif