Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreEyeDropperTool.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_EYE_DROPPER_TOOL__
8#define __HDI_CORE_EYE_DROPPER_TOOL__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreMacros.h"
13
14#include "hdicoreCursor.h"
15#include "hdicorePathStyle.h"
16#include "hdicoreTool.h"
17
18namespace hdi
19{
20 namespace core
21 {
22 class PathStyle;
23
43 {
44 public:
52 static EyeDropperTool* const create();
53
63 static EyeDropperTool* const instance();
64
70 static void destroy();
71
83 virtual AIToolHandle aiToolHandle() const;
84
92 virtual bool selected() const;
93
100 virtual void select();
101
107 virtual void deselect();
108
116 virtual std::string title() const;
117
125 virtual std::string tip() const;
126
136 virtual ArtboardPoint cursorLoc() const;
137
145 virtual Callback* const trackCallback() const;
146
154 virtual void setTrackCallback(const Callback& cb_);
155
163 virtual Callback* const dragCallback() const;
164
172 virtual void setDragCallback(const Callback& cb_);
173
181 virtual Callback* const mouseUpCallback() const;
182
190 virtual void setMouseUpCallback(const Callback& cb_);
191
202 virtual bool shiftKeyDown() const;
203
217 virtual bool commandKeyDown() const;
218
230 virtual bool optionKeyDown() const;
231
242 virtual bool controlKeyDown() const;
243
259 virtual PathStyle currentStyle() const;
260
261
262 private:
266 bool __firing;
267
271 Tool __tool;
272
276 Cursor __cursor;
277
281 std::string __prevTool;
282
286 bool __oldArtSnap;
287
291 bool __oldArtBoundsSnap;
292
296 bool __oldArtboardSnap;
297
301 bool __oldGridSnap;
302
306 Callback* __trackCB;
307
311 Callback* __dragCB;
312
316 Callback* __mouseUpCB;
317
324
331
338
344 EyeDropperTool& operator=(const EyeDropperTool&);
345
351 void __deselected();
352
358 void __track();
359
365 void __drag();
366
372 void __mouseUp();
373
379 ArtColor __cursorColor() const;
380 };
381 }
382}
383
384#endif
385// HDI_CORE_AIP_MODE
386
387#endif
388// __HDI_CORE_EYE_DROPPER_TOOL__
Describes the color of art on the artboard.
Definition: hdicoreArtColor.h:40
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:31
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Represents a cursor that can be shown on the screen, as well as metadata about the current cursor.
Definition: hdicoreCursor.h:26
Hidden eye dropper tool, to be used programmatically only, that allows for selection of a color from ...
Definition: hdicoreEyeDropperTool.h:43
virtual Callback *const trackCallback() const
Gets the registered callback for the tool tracking event (mouse move)
virtual bool optionKeyDown() const
Determines whether the option key is down.
virtual void setDragCallback(const Callback &cb_)
Sets the callback for the drag event.
virtual std::string tip() const
Gets the eye dropper tool's tip string.
virtual void setTrackCallback(const Callback &cb_)
Sets the callback for the tool tracking event (mouse move)
virtual void deselect()
Deselects the eye dropper tool, causing the previously selected tool to become current again.
virtual void setMouseUpCallback(const Callback &cb_)
Sets the callback for the mouse up event.
virtual PathStyle currentStyle() const
Gets the current path style for the eye dropper tool.
virtual AIToolHandle aiToolHandle() const
Gets the tool handle for the eye dropper tool.
virtual bool shiftKeyDown() const
Determines whether the shift key is down.
virtual bool commandKeyDown() const
Determines whether the command key is down.
virtual Callback *const dragCallback() const
Gets the registered callback for the drag event.
virtual std::string title() const
Gets the eye dropper tool's title.
virtual void select()
Sets the eye dropper tool as the current tool, storing the previously selected tool for later resumin...
static void destroy()
Destroys the singleton instance of the EyeDropperTool class.
static EyeDropperTool *const instance()
Acquires the singleton instance of the EyeDropperTool class.
virtual bool controlKeyDown() const
Determines whether the control key is down.
virtual bool selected() const
Gets whether the eye dropper tool is the currently selected tool.
virtual ArtboardPoint cursorLoc() const
Gets the current location of the cursor.
virtual Callback *const mouseUpCallback() const
Gets the registered callback for the mouse up event.
static EyeDropperTool *const create()
Creates the singleton instance of the EyeDropperTool class.
Describes all styling attributes of a path.
Definition: hdicorePathStyle.h:442
Base class for all tools; stores hit data, cursor loc, dialogs, etc.; receives tool-related messages.
Definition: hdicoreTool.h:35
Header file for manipulating cursors inside of a plugin.
Header file for a variety of plugin convenience macros.
Header file for path style-related classes.
Header file for Illustrator tool manipulation.