7#ifndef __HDI_CORE_CURRENT_DOCUMENT__
8#define __HDI_CORE_CURRENT_DOCUMENT__
10#if defined(HDI_CORE_AIP_MODE)
49 typedef std::vector< std::shared_ptr<Art> > ArtVector;
50 typedef std::vector<MatchArtSpec> MatchArtSpecVector;
105 typedef std::unique_ptr<Setup> SetupUP;
106 typedef std::shared_ptr<Setup> SetupSP;
107 typedef std::weak_ptr<Setup> SetupWP;
204 std::unique_ptr<Setup>
setup()
const;
338 bool save(
const std::string& path_,
const FileFormat& ff_,
const bool prompt_ =
true)
const;
356 const std::string& path_,
359 const bool prompt_ =
true
544 std::unique_ptr<DocumentView>
viewAtIndex(
const uint32_t index_)
const;
970 const double tolerance_ = 2.0,
971 const bool adjustToZoom_ =
true
Handles general art-related functionality.
Definition: hdicoreArt.h:51
Represents an individual artboard in the current document.
Definition: hdicoreArtboard.h:35
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:31
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:28
Describes the setup options of an existing document.
Definition: hdicoreCurrentDocument.h:56
Setup()
Constructs a new Setup object with default values.
Size size
Document dimensions.
Definition: hdicoreCurrentDocument.h:61
bool tileFullPages
Ignored when printTiles is false; otherwise, controls whether many tiles are created to print the ent...
Definition: hdicoreCurrentDocument.h:88
double resolution
Bezier resolution in dpi.
Definition: hdicoreCurrentDocument.h:71
virtual ~Setup()
Destructs a Setup object.
bool splitLongPaths
Controls whether long paths are split. Which paths are affected also depends on the bezier resolution...
Definition: hdicoreCurrentDocument.h:77
bool showPlacedImages
Indicates whether placed images are shown.
Definition: hdicoreCurrentDocument.h:66
bool printTiles
Controls whether multiple tiled pages are printed (or just a single page)
Definition: hdicoreCurrentDocument.h:82
Current (focused) document class to allow for metadata access, updating, dictionary access,...
Definition: hdicoreCurrentDocument.h:47
std::unique_ptr< Font > currentFont() const
Gets the current font for the document.
void setModified(const bool mod_)
Sets whether the current document is in a modified state.
PathStyle defaultTextStyle() const
Retrieves the default path style that tools should use when creating text objects.
std::unique_ptr< Pattern > patternAtIndex(const uint32_t index_) const
Gets a given pattern, by its index, in the current doc.
std::unique_ptr< Layer > layerByTitle(const std::string &title_) const
Gets a given layer, by its name, in the current document (case-insensitive)
bool anyArtSelected() const
Gets whether any art is selected at all in the document.
void cut()
Performs a cut operation, removing any selected art objects from the document and placing them in the...
bool applySymbolEditingModeChanges(const Symbol &editSym_)
Ends symbol editing mode, applying the changes made for the given symbol prototype to the symbol sour...
bool inSymbolEditingMode() const
Gets whether the current document is in symbol editing mode (similar to isolation mode,...
bool save() const
Saves the current document, prompting the user if it has not been saved before.
std::unique_ptr< Art > isolatedArt() const
Gets the currently isolated art.
ArtboardRect maxBounds() const
Gets the max bounds rect for the current document.
void setDefaultPathStyle(const PathStyle &style_)
Sets the default path style that tools should use when creating new objects other than text objects.
void copy()
Performs a copy operation, placing any selected art objects from the current document in the clipboar...
void sync() const
Updates cached artwork properties for the current document.
bool applyPatternEditingModeChanges(const Pattern &editPatt_)
Ends pattern editing mode, applying the changes made for the given pattern.
std::unique_ptr< DocumentView > viewAtIndex(const uint32_t index_) const
Gets a given document view, by its index, in the current document.
uint32_t viewCount() const
Gets a count of the views in the current document.
uint32_t patternCount() const
Gets the number of patterns in the document.
ArtVector artAtPoint(const ArtboardPoint &pt_, const HitRequest request_, const double tolerance_=2.0, const bool adjustToZoom_=true) const
Gets a vector of all art found at a given point on the document.
void exitIsolationMode() const
Ends isolation mode in the current document.
RulerUnits rulerUnits() const
Gets the ruler units for the current document.
bool selectedArtPathStyle(PathStyle &style__, PathStyle::Map &map__) const
Gets the path style and map of the currently selected art in the document.
void setDefaultTextStyle(const PathStyle &style_)
Sets the default path style that tools should use when creating text objects.
PlatformDocWindowPtr platformWindow() const
Gets the platform-specific window handle for the document.
void setCurrentLayer(const Layer &layer_)
Sets the currently selected layer in the current document.
bool hasTextFocus() const
Gets whether the current document is in text editing mode.
void setSelectedArtPathStyle(const PathStyle &style_, const PathStyle::Map &map_)
Sets the path style of the currently selected art in the document, taking a map into account.
PathStyle defaultPathStyle() const
Retrieves the default path style that tools should use when creating new objects other than text obje...
std::unique_ptr< Artboard > artboardAtIndex(const uint32_t index_) const
Gets a given artboard, by its index, in the current document.
uint32_t artboardCount() const
Gets the number of artboards in the document.
PathStyle selectedArtPathStyle() const
Gets the path style of the currently selected art in the document.
void exitSymbolEditingMode() const
Ends symbol editing mode in the current document, discarding any changes made to the symbol.
bool enterSymbolEditingMode(const Symbol &toEdit_, const Art *const inst_=NULL)
Enters symbol editing mode for the current document, creating a prototype (i.e. temporary copy) of th...
std::unique_ptr< Layer > layerAtIndex(const uint32_t index_) const
Gets a given layer, by its index, in the current document.
ArtVector matchingArt(const MatchArtSpecVector &specs_) const
Gets a vector of art in the document whose specs match those given.
AIDocumentHandle aiDocumentHandle() const
Gets the document handle around which the target object is wrapped.
void setSelectedArtPathStyle(const PathStyle &style_)
Sets the path style of the currently selected art in the document.
std::unique_ptr< ArtStyle > artStyleAtIndex(const uint32_t index_) const
Gets a given art style, by its index, in the current doc.
void setCurrentArtboard(const Artboard &artboard_)
Sets the currently selected artboard in the current document.
void redraw() const
Forces the art in the current document to be redrawn.
bool save(const std::string &path_, const FileFormat &ff_, const bool prompt_=true) const
Saves the current document with the given parameters, even if the document has not been saved before ...
bool modified() const
Gets whether the current document has been modified.
bool setFocusedText(const TextStory &story_)
Sets the story that should have editing focus, and the editing caret is placed at the start of said s...
bool close() const
Closes the current document.
uint32_t symbolDefCount() const
Gets the number of symbol definitions in the document.
void syncAndRedraw() const
Updates cached artwork properties for the current document, synchronizes the current context,...
double scale() const
Gets the scale of the current doc.
bool insertArtboard(const uint32_t index_, Artboard &ab__) const
Inserts a new artboard at a given position in the artboard list in the current document.
void exitPatternEditingMode() const
Ends pattern editing mode in the current document, discarding any changes made to the pattern.
DocumentColorModel colorModel() const
Gets the color model for the current document.
bool enterIsolationMode(const Art &art_, const bool hideOtherArt_)
Enters isolation mode of the given art object or one of its parents.
bool inIsolationMode() const
Gets whether the current document is in isolation mode.
std::unique_ptr< TextRangeSet > selectedText() const
Gets the set of selected text ranges for the current document.
std::unique_ptr< Artboard > artboardByTitle(const std::string &title_) const
Gets a given artboard, by its name, in the current document (case-insensitive)
uint32_t layerCount() const
Gets a count of the layers in the current document.
std::unique_ptr< Layer > firstLayer() const
Gets the first layer in the list in the current document.
ArtVector artOfType(const MatchArtType type_) const
Gets a vector of art in the document whose type matches the given type.
std::string filePath() const
Gets the complete path to the current document.
std::unique_ptr< ai::Dictionary > dictionary()
Gets the built-in document data dictionary object for the current document.
void paste()
Pastes the contents of the clipboard on the current document.
ArtVector selectedArt() const
Gets a vector of all currently selected art in the document.
Grid *const grid() const
Gets the grid object for the current document.
std::unique_ptr< Symbol > symbolDefAtIndex(const uint32_t index_) const
Gets a given symbol definition, by its index, in the current doc.
uint32_t artStyleCount() const
Gets the number of art styles in the document.
bool inPatternEditingMode() const
Gets whether the current document is in pattern editing mode (similar to isolation mode,...
std::unique_ptr< Setup > setup() const
Gets the setup options for the current document.
std::unique_ptr< Layer > currentLayer() const
Gets the currently selected layer of the current document.
std::unique_ptr< Layer > lastLayer() const
Gets the last layer in the list in the current document.
std::string fileName() const
Gets the name of the current document.
std::unique_ptr< TextStory > focusedText() const
Gets the story that has editing focus (i.e. has some selected range)
void setCurrentFont(const Font &font_)
Sets the current font for the document.
void deselectAllArt() const
Deselects all currently selected art.
std::unique_ptr< Artboard > currentArtboard() const
Gets the current (active) artboard in the document.
void redo() const
Redoes the most recent redoable transaction for the current document (same as the user using the redo...
bool enterPatternEditingMode(const Pattern &toEdit_)
Enters pattern editing mode for the current document.
bool save(const std::string &path_, const FileFormat &ff_, const FileFormat::Options opt_, const bool prompt_=true) const
Saves the current document with the given parameters and options, even if the document has not been s...
std::unique_ptr< DocumentView > currentView() const
Gets the current view for the current document.
void undo() const
Undoes the most recent undoable transaction for the current document (same as the user using the undo...
void loseTextFocus()
Ends text editing mode for the current document.
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:183
Allows manipulation of Illustrator's built-in grids.
Definition: hdicoreGrid.h:23
Allows access to a wide variety of Illustrator app-related runtime attributes, documents,...
Definition: hdicoreIllustrator.h:47
Allows for layer metadata access, visibility manipulation, locking, etc.
Definition: hdicoreLayer.h:39
Acts as a StrokeStyle value map, indicating which values are "known".
Definition: hdicorePathStyle.h:448
Describes all styling attributes of a path.
Definition: hdicorePathStyle.h:442
Handles general pattern-related functionality.
Definition: hdicorePattern.h:30
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:25
Handles general symbol-related functionality.
Definition: hdicoreSymbol.h:27
Definition: hdicoreTextStory.h:33
Header file for geometric point manipulation on the Illustrator artboard.
Header file for geometric rectangle manipulation on the Illustrator artboard.
Header file for path style-related classes.
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
HitRequest
Describes the types of hit tests that can be performed (AKA a hit request)
Definition: hdicoreTypes.h:348
MatchArtType
Indicates a type of art (when searching the document artwork tree for art objects)
Definition: hdicoreTypes.h:184
RulerUnits
Indicates the ruler units of a document.
Definition: hdicoreTypes.h:531