Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreCursor.h
Go to the documentation of this file.
1
6
7#ifndef __HDI_CORE_CURSOR__
8#define __HDI_CORE_CURSOR__
9
10#include "hdicorePoint.h"
11#include "hdicoreTypes.h"
12
13namespace hdi
14{
15 namespace pui
16 {
17 class Cursor;
18 }
19
20 namespace core
21 {
25 class Cursor
26 {
27 public:
33 static const int16_t noneImageID = 0;
34
39 {
40 BrushCursor = 10,
41 CrosshairsCursor = 20,
42 CrosshairsAddCursor = 30,
43 CrosshairsAnchorCursor = 40,
44 CrosshairsCircleBoldCursor = 50,
45 CrosshairsCircleBrokenCursor = 60,
46 CrosshairsCircleWholeCursor = 70,
47 CrosshairsCloseCursor = 80,
48 CrosshairsContinueCursor = 90,
49 CrosshairsDeleteCursor = 100,
50 CrosshairsEllipsisCursor = 110,
51 CrosshairsNoCursor = 120,
52 CrosshairsSquareBrokenCursor = 130,
53 DirectMoveCursor = 140,
54 DirectMoveCopyCursor = 150,
55 DirectSelectCursor = 160,
56 DirectSelectAddCursor = 170,
57 DirectSelectBehindCursor = 180,
58 EyeDropperCursor = 190,
59 EyeDropperFilledCursor = 200,
60 FistCursor = 210,
61 HandCursor = 220,
62 MoveCursor = 230,
63 MoveCopyCursor = 240,
64 PenCursor = 250,
65 PenAddCursor = 260,
66 PencilCursor = 270,
67 PenCloseCursor = 280,
68 PenContinueCursor = 290,
69 PenCornerCursor = 300,
70 PenNewCursor = 310,
71 PenSubstractCursor = 320,
72 PenWeldCursor = 330,
73 RotateBottomCenterCursor = 340,
74 RotateBottomLeftCursor = 350,
75 RotateBottomRightCursor = 360,
76 RotateMidLeftCursor = 370,
77 RotateMidRightCursor = 380,
78 RotateTopCenterCursor = 390,
79 RotateTopLeftCursor = 400,
80 RotateTopRightCursor = 410,
81 ScaleDeclineCursor = 420,
82 ScaleHorizontalCursor = 430,
83 ScaleInclineCursor = 440,
84 ScaleVerticalCursor = 450,
85 SelectCursor = 460,
86 SelectBehindCursor = 470,
87 WatchCursor = 480,
88 ZoomInCursor = 490,
89 ZoomNoneCursor = 500,
90 ZoomOutCursor = 510
91 };
92
104
112 Cursor(const Cursor& c_);
113
121 Cursor(const AdobeCursor cursor_);
122
137 const int16_t cursorID_,
138 const int16_t cursorID3to2x_,
139 const int16_t cursorID2x_,
140 const Point& hotSpot_
141 );
142
159 const int16_t cursorID_,
160 const int16_t cursorID3to2x_,
161 const int16_t cursorID2x_,
162 const int16_t cursorID3x_,
163 const int16_t cursorID4x_,
164 const Point& hotSpot_
165 );
166
175
184 Cursor& operator=(const Cursor& rhs_);
185
191 virtual ~Cursor();
192
200 virtual bool isEmpty() const;
201
207 virtual void enable();
208
216 virtual Point hotSpot() const;
217
226 virtual bool operator==(const Cursor& rhs_) const;
227
236 virtual bool operator!=(const Cursor& rhs_) const;
237
245 static Point screenLoc();
246
254 static void mouseDown(const Point& pt_);
255
263 static void mouseUp(const Point& pt_);
264
274 static void click(const Point& pt_);
275
276
277 private:
278 friend pui::Cursor* __accessImpl(const Cursor&);
279
283 void* __data;
284
290 void* __impl() const;
291 };
292
293 typedef std::unique_ptr<Cursor> CursorUP;
294 typedef std::shared_ptr<Cursor> CursorSP;
295 typedef std::weak_ptr<Cursor> CursorWP;
296
297 extern pui::Cursor* __accessImpl(const Cursor&);
298 }
299}
300
301#endif
302// __HDI_CORE_CURSOR__
Represents a cursor that can be shown on the screen, as well as metadata about the current cursor.
Definition hdicoreCursor.h:26
static Point screenLoc()
Gets the absolute location of the cursor on the screen.
static const int16_t noneImageID
Default image ID to indicate that no image should be used.
Definition hdicoreCursor.h:33
virtual bool operator==(const Cursor &rhs_) const
Tests whether a given Cursor object is the same as another.
virtual bool operator!=(const Cursor &rhs_) const
Tests whether a given Cursor object is not the same as another.
static void mouseUp(const Point &pt_)
Simulates a mouse up (with no modifier keys) at an absolute location on the screen.
static void mouseDown(const Point &pt_)
Simulates a mouse down (with no modifier keys) at an absolute location on the screen.
AdobeCursor
Describes the built-in Adobe cursors that can be acquired.
Definition hdicoreCursor.h:39
Cursor & operator=(const Cursor &rhs_)
Assigns one Cursor object to another.
virtual ~Cursor()
Destructs a Cursor object.
Cursor(const int16_t cursorID_, const int16_t cursorID3to2x_, const int16_t cursorID2x_, const int16_t cursorID3x_, const int16_t cursorID4x_, const Point &hotSpot_)
Constructs a new Cursor object from a PNG image and a hot spot.
virtual void enable()
Shows the cursor (sets it as current)
static Cursor CurrentCursor()
Named constructor to acquire a Cursor object for whichever cursor image is current.
Cursor()
Constructs an empty Cursor object.
virtual Point hotSpot() const
Gets the cursor hot spot.
virtual bool isEmpty() const
Gets whether the target Cursor object is empty (constructed with the default ctor)
Cursor(const int16_t cursorID_, const int16_t cursorID3to2x_, const int16_t cursorID2x_, const Point &hotSpot_)
Constructs a new Cursor object from a PNG image and a hot spot.
Cursor(const AdobeCursor cursor_)
Constructs a new Cursor object from a built-in Adobe cursor.
Cursor(const Cursor &c_)
Constructs a new Cursor object from an existing Cursor object (copy constructor)
static void click(const Point &pt_)
Simulates a click (with no modifier keys) at an absolute location on the screen.
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition hdicorePoint.h:38
Header file for describing 2D points.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.