Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreDocument.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_DOCUMENT__
8 #define __HDI_CORE_DOCUMENT__
9 
10 #include "hdicoreSize.h"
11 #include "hdicoreTypes.h"
12 
13 namespace hdi
14 {
15  namespace plugin
16  {
17  class Document;
18  }
19 
20  namespace core
21  {
22  class ArtStyle;
23  class Symbol;
24 
28  class Document
29  {
30  public:
34  class Preset
35  {
36  public:
41  {
42  PreviewModeDefault = 10,
43  PreviewModePixel = 20,
44  PreviewModeOverprint = 30
45  };
46 
51  {
52  TransparencyGridNone = 0,
53  TransparencyGridLightGray = 10,
54  TransparencyGridGray = 20,
55  TransparencyGridDarkGray = 30,
56  TransparencyGridRed = 40,
57  TransparencyGridOrange = 50,
58  TransparencyGridGreen = 60,
59  TransparencyGridBlue = 70,
60  TransparencyGridPurple = 80
61  };
62 
67  {
68  RasterResolutionScreen = 10, // 72 ppi
69  RasterResolutionMedium = 20, // 150 ppi
70  RasterResolutionHigh = 30 // 300 ppi
71  };
72 
80  {
81  ArtboardLayoutColumn = 10,
82  ArtboardLayoutRowLR = 20,
83  ArtboardLayoutRowRL = 30,
84  ArtboardLayoutGridByRowLR = 40,
85  ArtboardLayoutGridByColumnLR = 50,
86  ArtboardLayoutGridByRowRL = 60,
87  ArtboardLayoutGridByColumnRL = 70
88  };
89 
93  #if HDI_CORE_COMPILE_AI22_PLUS
94  static const uint32_t maxArtboardCount = 1000;
95  #elif HDI_CORE_COMPILE_AI21_MINUS
96  static const uint32_t maxArtboardCount = 100;
97  #endif
98 
102  std::string title;
103 
108 
112  uint32_t artboardCount;
113 
118 
123 
135 
140 
145 
150 
155 
160 
166  Preset();
167 
173  virtual ~Preset();
174  };
175 
186  Document();
187 
195  Document(const Document& doc_);
196 
204  Document(const AIDocumentHandle aiDoc_);
205 
214  Document(const std::string& preset_, const bool showDialog_);
215 
224  Document(const Preset& preset_, const bool showDialog_);
225 
231  virtual ~Document();
232 
241  virtual Document& operator=(const Document& rhs_);
242 
254  virtual AIDocumentHandle aiDocumentHandle() const;
255 
263  virtual bool isEmpty() const;
264 
270  virtual void save() const;
271 
277  virtual void close() const;
278 
284  virtual void activate() const;
285 
293  virtual void print(const bool showDialog_) const;
294 
302  virtual std::string url() const;
303 
311  virtual bool exists() const;
312 
321  virtual bool operator==(const Document& rhs_) const;
322 
332  virtual bool operator!=(const Document& rhs_) const;
333 
341  uint32_t artStyleCount() const;
342 
351  std::auto_ptr<ArtStyle> artStyleAtIndex(const uint32_t index_) const;
352 
360  uint32_t symbolDefCount() const;
361 
370  std::auto_ptr<Symbol> symbolDefAtIndex(const uint32_t index_) const;
371 
372 
373  private:
374  friend plugin::Document* __accessImpl(const Document&);
375  friend Document __accessCtor(plugin::Document*&);
376 
380  void* __data;
381 
387  void* __impl() const;
388 
394  Document(plugin::Document*&);
395  };
396 
397  typedef std::auto_ptr<Document> DocumentAP;
398 
399  extern plugin::Document* __accessImpl(const Document&);
400  extern Document __accessCtor(plugin::Document*&);
401  }
402 }
403 
404 #endif
405 // __HDI_CORE_DOCUMENT__
RasterResolution rasterResolution
Controls the raster resolution of the document.
Definition: hdicoreDocument.h:159
TransparencyGrid transparencyGrid
Controls the transparency grid color of the document.
Definition: hdicoreDocument.h:154
PreviewMode
Controls the preview mode of a new document.
Definition: hdicoreDocument.h:40
RulerUnits rulerUnits
Controls the ruler units of the document.
Definition: hdicoreDocument.h:144
Represents options when creating a new Illustrator document.
Definition: hdicoreDocument.h:34
Size size
Width and height of the document artboard.
Definition: hdicoreDocument.h:107
ArtboardLayout
Controls how artboards are placed when creating a new document.
Definition: hdicoreDocument.h:79
RasterResolution
Controls the raster resolution of a new document.
Definition: hdicoreDocument.h:66
PreviewMode previewMode
Controls the preview mode of the document.
Definition: hdicoreDocument.h:149
DocumentColorModel colorModel
Controls the color model of the document.
Definition: hdicoreDocument.h:139
RulerUnits
Indicates the ruler units of a document.
Definition: hdicoreTypes.h:594
Allows one to interact with a document and its metadata (differs from CurrentDocument class) ...
Definition: hdicoreDocument.h:28
Header file for describing 2D dimensions (width and height)
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
TransparencyGrid
Controls the transparency grid color of a new document.
Definition: hdicoreDocument.h:50
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:24
uint32_t artboardCount
Number of artboards in the document. Cannot exceed maxArtboardCount.
Definition: hdicoreDocument.h:112
Definition: hdicoreaiArray.h:12
uint32_t artboardRowOrColumnSize
How many artboards should appear in each row or column before wrapping occurs.
Definition: hdicoreDocument.h:134
double artboardSpacing
How many points each artboard should be spaced from its neighbor.
Definition: hdicoreDocument.h:122
std::string title
UTF-8 title of the document. Empty ("") will result in a title like "Untitled-1", etc...
Definition: hdicoreDocument.h:102
DocumentColorModel
Indicates the color model of new document.
Definition: hdicoreTypes.h:356
ArtboardLayout artboardLayout
Controls how the artboards are placed.
Definition: hdicoreDocument.h:117