Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreDocumentView.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_DOCUMENT_VIEW__
8#define __HDI_CORE_DOCUMENT_VIEW__
9
10#if defined(HDI_CORE_AIP_MODE)
11
13#include "hdicoreArtboardRect.h"
14#include "hdicorePoint.h"
15#include "hdicoreRect.h"
16
17namespace hdi
18{
19 namespace aip
20 {
21 class DocumentView;
22 }
23
24 namespace core
25 {
30 {
31 public:
36 {
37 UnknownScreenMode = 0,
38 NoDocumentsScreenMode = 10,
39 NormalScreenMode = 20,
40 FullScreenWithMenuMode = 30,
41 FullScreenWithoutMenuMode = 40,
42 PresentationMode = 50
43 };
44
57
66
74 DocumentView(const AIDocumentViewHandle aiDocView_);
75
81 virtual ~DocumentView();
82
92 virtual DocumentView& operator=(const DocumentView& rhs_);
93
105 virtual AIDocumentViewHandle aiDocumentViewHandle() const;
106
114 virtual bool isEmpty() const;
115
123 virtual ArtboardRect bounds() const;
124
132 virtual ArtboardPoint center() const;
133
141 virtual void setCenter(const ArtboardPoint& center_);
142
151 virtual double zoom() const;
152
161 virtual void setZoom(const double zoom_);
162
171 virtual double displayZoom() const;
172
181 virtual void setDisplayZoom(const double zoom_);
182
190 virtual ScreenMode screenMode() const;
191
199 virtual void setScreenMode(const ScreenMode mode_);
200
213 virtual bool rotation(ArtboardPoint& pt__, Angle& angle__) const;
214
226 virtual void setRotation(const ArtboardPoint& pt_, const Angle& angle_);
227
236 virtual void resetRotation();
237
251
265
278 virtual Rect artworkRectToViewRect(const ArtboardRect& artRect_);
279
292 virtual ArtboardRect viewRectToArtworkRect(const Rect& viewRect_);
293
307
321
335
357 bool operator==(const DocumentView& rhs_) const;
358
368 bool operator!=(const DocumentView& rhs_) const;
369
370
371 private:
372 friend aip::DocumentView* __accessImpl(const DocumentView&);
373 friend DocumentView __accessCtor(aip::DocumentView*&);
374
378 void* __data;
379
385 void* __impl() const;
386
392 DocumentView(aip::DocumentView*&);
393 };
394
395 typedef std::unique_ptr<DocumentView> DocumentViewUP;
396 typedef std::shared_ptr<DocumentView> DocumentViewSP;
397 typedef std::weak_ptr<DocumentView> DocumentViewWP;
398
399 extern aip::DocumentView* __accessImpl(const DocumentView&);
400 extern DocumentView __accessCtor(aip::DocumentView*&);
401 }
402}
403
404#endif
405// HDI_CORE_AIP_MODE
406
407#endif
408// __HDI_CORE_DOCUMENT_VIEW__
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:31
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:28
Allow for interacting the document views (windows)
Definition: hdicoreDocumentView.h:30
virtual AIDocumentViewHandle aiDocumentViewHandle() const
Gets the document view handle around which the target object is wrapped.
virtual ArtboardPoint center() const
Gets the center of the portion of the document that is currently visible in its window.
DocumentView(const AIDocumentViewHandle aiDocView_)
Constructs a new DocumentView object from an AIDocumentViewHandle.
virtual bool isEmpty() const
Gets whether the target DocumentView object is empty (constructed with the default ctor)
bool operator==(const DocumentView &rhs_) const
Checks whether one DocumentView object represents the same Illustrator view as another.
virtual double displayZoom() const
Gets the current display zoom level of the document. This is the zoom value that the user sees on the...
virtual ArtboardPoint viewPointToArtworkPointUnrotated(const Point &viewPt_)
Converts a point on the screen to a point on the document without taking into account the view rotati...
virtual ScreenMode screenMode() const
Gets the current screen mode of the document (full, windowed, etc.)
virtual Rect artworkRectToViewRect(const ArtboardRect &artRect_)
Converts a rect on the document to an absolute rect on the screen.
virtual void setZoom(const double zoom_)
Sets the current zoom level of the document. This is the scale factor from artwork coordinates to win...
DocumentView(const DocumentView &dv_)
DocumentView copy constructor.
virtual ~DocumentView()
DocumentView destructor.
bool operator!=(const DocumentView &rhs_) const
Checks whether one DocumentView object does not represent the same Illustrator view as another.
virtual Rect artworkRectToViewRectUnrotated(const ArtboardRect &artRect_)
Converts a rect on the document to an absolute rect on the screen without taking into account the vie...
virtual ArtboardRect viewRectToArtworkRectUnrotated(const Rect &viewRect_)
Converts a rect on the screen to a rect on the document without taking into account the view rotation...
ScreenMode
Describes the current layout of Illustrator's window(s)
Definition: hdicoreDocumentView.h:36
virtual void setScreenMode(const ScreenMode mode_)
Sets the current screen mode of the document (full, windowed, etc.)
virtual ArtboardPoint viewPointToArtworkPoint(const Point &viewPt_)
Converts a point on the screen to a point on the document.
virtual DocumentView & operator=(const DocumentView &rhs_)
Assigns one DocumentView object to another.
virtual void setRotation(const ArtboardPoint &pt_, const Angle &angle_)
Sets the point and angle of rotation for the document view.
virtual double zoom() const
Gets the current zoom level of the document. This is the scale factor from artwork coordinates to win...
virtual ArtboardRect bounds() const
Gets the bounds of the portion of the document that is currently visible in its window.
virtual bool rotation(ArtboardPoint &pt__, Angle &angle__) const
Gets the point and angle of rotation for the document view.
virtual void resetRotation()
Resets the angle of rotation for the document view back to zero degrees.
virtual ArtboardRect viewRectToArtworkRect(const Rect &viewRect_)
Converts a rect on the screen to a rect on the document.
virtual Point artworkPointToViewPoint(const ArtboardPoint &artPt_)
Converts a point on the document to an absolute point on the screen.
virtual Point artworkPointToViewPointUnrotated(const ArtboardPoint &artPt_)
Converts a point on the document to an absolute point on the screen without taking into account the v...
virtual void setCenter(const ArtboardPoint &center_)
Moves the document view to be centered on the given point.
virtual void setDisplayZoom(const double zoom_)
Sets the current display zoom level of the document. This is the zoom value that the user sees on the...
DocumentView()
Constructs an empty DocumentView object.
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:38
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Header file for geometric point manipulation on the Illustrator artboard.
Header file for geometric rectangle manipulation on the Illustrator artboard.
Header file for describing 2D points.
Header file for describing rectangles.