7#ifndef __HDI_CORE_DOCUMENT__
8#define __HDI_CORE_DOCUMENT__
16 #if defined(HDI_CORE_AIP_MODE)
21 #elif defined(HDI_CORE_PSP_MODE)
32 #if defined(HDI_CORE_AIP_MODE)
35 #elif defined(HDI_CORE_PSP_MODE)
45 #if defined(HDI_CORE_AIP_MODE)
57 PreviewModeDefault = 10,
58 PreviewModePixel = 20,
59 PreviewModeOverprint = 30
67 TransparencyGridNone = 0,
68 TransparencyGridLightGray = 10,
69 TransparencyGridGray = 20,
70 TransparencyGridDarkGray = 30,
71 TransparencyGridRed = 40,
72 TransparencyGridOrange = 50,
73 TransparencyGridGreen = 60,
74 TransparencyGridBlue = 70,
75 TransparencyGridPurple = 80
83 RasterResolutionScreen = 10,
84 RasterResolutionMedium = 20,
85 RasterResolutionHigh = 30
96 ArtboardLayoutColumn = 10,
97 ArtboardLayoutRowLR = 20,
98 ArtboardLayoutRowRL = 30,
99 ArtboardLayoutGridByRowLR = 40,
100 ArtboardLayoutGridByColumnLR = 50,
101 ArtboardLayoutGridByRowRL = 60,
102 ArtboardLayoutGridByColumnRL = 70
210 #if defined(HDI_CORE_AIP_MODE)
228 Document(
const std::string& preset_,
const bool showDialog_);
239 #elif defined(HDI_CORE_PSP_MODE)
267 #if defined(HDI_CORE_AIP_MODE)
280 #elif defined(HDI_CORE_PSP_MODE)
292 virtual int32_t psDocumentID()
const;
332 virtual void print(
const bool showDialog_)
const;
341 virtual std::string
url()
const;
372 #if defined(HDI_CORE_AIP_MODE)
413 #if defined(HDI_CORE_PSP_MODE)
421 virtual Point center()
const;
430 virtual Size dimensions()
const;
440 virtual void setDimensions(
const Size& s_,
const ImageInterpolation ii_);
449 virtual ColorSpace colorSpace()
const;
459 virtual void setColorSpace(
const ColorSpace cs_,
const bool ml_);
468 virtual double resolution()
const;
478 virtual void setResolution(
const double res_,
const ImageInterpolation ii_);
487 virtual int16_t depth()
const;
496 virtual void setDepth(
const int16_t d_);
505 virtual Point rulerOrigin()
const;
514 virtual bool smartGuidesVisible()
const;
523 virtual bool guidesVisible()
const;
532 virtual bool rulersVisible()
const;
541 virtual bool hasBackgroundLayer()
const;
550 virtual std::unique_ptr<Layer> backgroundLayer()
const;
559 virtual double zoomLevel()
const;
568 virtual double pixelScaleFactor()
const;
577 virtual std::string colorProfile()
const;
586 virtual std::string formatName()
const;
595 virtual uint32_t layerCount()
const;
604 virtual std::unique_ptr<Layer> firstLayer()
const;
613 virtual std::unique_ptr<Layer> lastLayer()
const;
623 virtual std::unique_ptr<Layer> layerByTitle(
const std::string& title_)
const;
633 virtual std::unique_ptr<Layer> layerAtIndex(
const uint32_t index_)
const;
643 virtual std::unique_ptr<Layer> insertLayer(
const uint32_t pos_);
654 virtual std::unique_ptr<Layer> currentLayer();
663 virtual void setCurrentLayer(
const Layer& layer_);
672 virtual uint32_t channelCount()
const;
682 virtual std::string channelName(
const uint32_t ci_)
const;
692 virtual bool channelVisible(
const uint32_t ci_)
const;
701 virtual void setCurrentChannel(
const uint32_t ci_);
712 virtual std::unique_ptr<XMPMeta> getXMP()
const;
723 virtual void setXMP(
const XMPMeta& xmp_);
729 #if defined(HDI_CORE_AIP_MODE)
730 friend aip::Document* __accessImpl(
const Document&);
731 friend Document __accessCtor(aip::Document*&);
739 #elif defined(HDI_CORE_PSP_MODE)
740 friend psp::Document* __accessImpl(
const Document&);
741 friend Document __accessCtor(psp::Document*&);
761 void* __impl()
const;
764 typedef std::unique_ptr<Document> DocumentUP;
765 typedef std::shared_ptr<Document> DocumentSP;
766 typedef std::weak_ptr<Document> DocumentWP;
768 #if defined(HDI_CORE_AIP_MODE)
769 extern aip::Document* __accessImpl(
const Document&);
770 extern Document __accessCtor(aip::Document*&);
771 #elif defined(HDI_CORE_PSP_MODE)
772 extern psp::Document* __accessImpl(
const Document&);
773 extern Document __accessCtor(psp::Document*&);
Describes an art style.
Definition hdicoreArtStyle.h:30
Represents options when creating a new Illustrator document.
Definition hdicoreDocument.h:50
ArtboardLayout
Controls how artboards are placed when creating a new document.
Definition hdicoreDocument.h:95
RulerUnits rulerUnits
Controls the ruler units of the document.
Definition hdicoreDocument.h:155
double artboardSpacing
How many points each artboard should be spaced from its neighbor.
Definition hdicoreDocument.h:133
PreviewMode
Controls the preview mode of a new document.
Definition hdicoreDocument.h:56
std::string title
UTF-8 title of the document. Empty ("") will result in a title like "Untitled-1", etc.
Definition hdicoreDocument.h:113
uint32_t artboardCount
Number of artboards in the document. Cannot exceed maxArtboardCount.
Definition hdicoreDocument.h:123
TransparencyGrid transparencyGrid
Controls the transparency grid color of the document.
Definition hdicoreDocument.h:165
RasterResolution
Controls the raster resolution of a new document.
Definition hdicoreDocument.h:82
ArtboardLayout artboardLayout
Controls how the artboards are placed.
Definition hdicoreDocument.h:128
RasterResolution rasterResolution
Controls the raster resolution of the document.
Definition hdicoreDocument.h:170
virtual ~Preset()
Destructs a Preset object.
PreviewMode previewMode
Controls the preview mode of the document.
Definition hdicoreDocument.h:160
Preset()
Constructs a new Preset object with default values.
uint32_t artboardRowOrColumnSize
How many artboards should appear in each row or column before wrapping occurs.
Definition hdicoreDocument.h:145
DocumentColorModel colorModel
Controls the color model of the document.
Definition hdicoreDocument.h:150
static const uint32_t maxArtboardCount
Maximum number of artboards that Illustrator documents will support.
Definition hdicoreDocument.h:108
Size size
Width and height of the document artboard.
Definition hdicoreDocument.h:118
TransparencyGrid
Controls the transparency grid color of a new document.
Definition hdicoreDocument.h:66
Allows one to interact with a document and its metadata (differs from CurrentDocument class)
Definition hdicoreDocument.h:43
Document()
Constructs an empty Document object.
uint32_t artStyleCount() const
Gets the number of art styles in the document.
virtual void print(const bool showDialog_) const
Prints the target document.
virtual bool operator!=(const Document &rhs_) const
Checks whether one Document object does not represent the same document as another.
virtual bool isEmpty() const
Gets whether the target Document object is empty (constructed with the default ctor)
uint32_t symbolDefCount() const
Gets the number of symbol definitions in the document.
std::unique_ptr< ArtStyle > artStyleAtIndex(const uint32_t index_) const
Gets a given art style, by its index, in the target doc.
Document(const Preset &preset_, const bool showDialog_)
Creates a new document, and makes it current, from new document parameters.
virtual bool exists() const
Gets whether the document exists (is open or in the clipboard)
Document(const AIDocumentHandle aiDoc_)
Constructs a new Document object from an AIDocumentHandle.
virtual void activate() const
Activates (makes current) the target document.
virtual Document & operator=(const Document &rhs_)
Assigns one Document object to another.
virtual ~Document()
Document destructor.
Document(const std::string &preset_, const bool showDialog_)
Creates a new document, and makes it current, from a startup preset.
virtual AIDocumentHandle aiDocumentHandle() const
Gets the document handle around which the target object is wrapped.
virtual bool operator==(const Document &rhs_) const
Checks whether one Document object represents the same document as another.
Document(const Document &doc_)
Document copy constructor.
virtual std::string url() const
Gets the document URL.
std::unique_ptr< Symbol > symbolDefAtIndex(const uint32_t index_) const
Gets a given symbol definition, by its index, in the target doc.
virtual void close() const
Closes the target document.
virtual void save() const
Saves the target document.
Allows for layer metadata access, visibility manipulation, locking, etc.
Definition hdicoreLayer.h:39
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition hdicorePoint.h:38
Contains a width and height for a rectangular shape.
Definition hdicoreSize.h:25
Handles general symbol-related functionality.
Definition hdicoreSymbol.h:27
Header file for describing 2D points.
Header file for describing 2D dimensions (width and height)
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
DocumentColorModel
Indicates the color model of new document.
Definition hdicoreTypes.h:366
RulerUnits
Indicates the ruler units of a document.
Definition hdicoreTypes.h:531