![]() |
Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
|
Base class for all tools; stores hit data, cursor loc, dialogs, etc.; receives tool-related messages. More...
#include <hdicoreTool.h>
Public Types | |
enum | Options { NoOptions = 0 , TracksCursorOption = 1 << 0 , DoesntAutoScrollOption = 1 << 1 , BufferedDraggingOption = 1 << 2 , MaintainsEditContextOption = 1 << 3 , WantsToEditTextOption = 1 << 4 , WantsToChangeDiameterOption = 1 << 5 , WantsAlternateSelectionOption = 1 << 6 , HiddenOption = 1 << 7 , DoesntAllowSoftSelectionOption = 1 << 8 , DefaultOptions = (TracksCursorOption | WantsToChangeDiameterOption) } |
Controls various options for a tool. | |
typedef std::vector< ArtboardPoint > | ArtboardPointVector |
Public Member Functions | |
Tool () | |
Constructs an empty Tool object. | |
Tool (const Tool &tool_) | |
Constructs a new Tool object from an existing Tool object (copy constructor) | |
Tool (const Tool &sameGroupAs_, const Tool *const sameSetAs_, const std::string &title_, const std::string &tip_, const IconResourceType iconType_, const int16_t lightIconID_, const int16_t darkIconID_, const Options options_=DefaultOptions) | |
Constructs a new Tool object, optionally in the same set/group as one of your own tools. | |
Tool (const BuiltinTool &sameGroupAs_, const BuiltinTool *const sameSetAs_, const std::string &title_, const std::string &tip_, const IconResourceType iconType_, const int16_t lightIconID_, const int16_t darkIconID_, const Options options_=DefaultOptions) | |
Constructs a new Tool object in the same set/group as a built-in Illustrator tool. | |
Tool (const int16_t sameGroupAs_, const int16_t sameSetAs_, const std::string &title_, const std::string &tip_, const IconResourceType iconType_, const int16_t lightIconID_, const int16_t darkIconID_, const Options options_=DefaultOptions) | |
Constructs a new Tool object in the same set/group as some third-party tool (via handles) | |
virtual | ~Tool () |
Destructs a Tool object. | |
virtual void | destroy () |
Destroys the tool, converting the target object to an empty Tool object (see the default constructor for more info on empty Tool objects) | |
virtual Tool & | operator= (const Tool &rhs_) |
Assigns one Tool object to another. | |
virtual bool | operator== (const Tool &rhs_) const |
Tests whether a given Tool object is the same as another. | |
virtual bool | operator!= (const Tool &rhs_) const |
Tests whether a given Tool object is not the same as another. | |
virtual AIToolHandle | aiToolHandle () const |
Gets the tool handle around which the target object is wrapped. | |
virtual int16_t | number () const |
Gets the tool's number. | |
virtual bool | isEmpty () const |
Gets whether the target Tool object is empty (constructed with the default ctor) | |
virtual bool | selected () const |
Gets whether the target Tool object is the currently selected tool. | |
virtual void | setSelected () |
Sets the target Tool object as the currently selected tool. | |
virtual Options | options () const |
Gets the options set for the tool. | |
virtual void | setOptions (const Options options_) |
Sets the options for the tool. | |
virtual std::string | title () const |
Gets the tool's title. | |
virtual void | setTitle (const std::string &title_) |
Sets the tool's title. | |
virtual std::string | tip () const |
Gets the tool's tip string. | |
virtual void | setTip (const std::string &tip_) |
Sets the tool's tip string. | |
virtual IconResourceType | iconType () const |
Gets which type of icon resource the tool was originally constructed with. | |
virtual int16_t | lightIconID () const |
Gets the light UI icon ID as set when the tool was created. | |
virtual void | setLightIconID (const int16_t imgID_) |
Sets the light UI icon ID. | |
virtual int16_t | darkIconID () const |
Gets the dark UI icon ID as set when the tool was created. | |
virtual void | setDarkIconID (const int16_t imgID_) |
Sets the dark UI icon ID. | |
virtual ArtboardPoint | cursorLoc () const |
Gets the current location of the cursor. | |
virtual void | setCursorLoc (const ArtboardPoint &loc_) |
Stores the current location of the cursor. | |
virtual ArtboardPointVector | mouseDownLocs () const |
Gets the mouse down points for the target tool. | |
virtual ArtboardPointVector | mouseUpLocs () const |
Gets the mouse up points for the target tool. | |
virtual std::unique_ptr< HitData > | mouseDownHitData (const uint32_t index_, const HitRequest request_, const double tolerance_=2.0) const |
Gets hit data for a given point in the mouse down location vector. | |
virtual std::unique_ptr< HitData > | mouseUpHitData (const uint32_t index_, const HitRequest request_, const double tolerance_=2.0) const |
Gets hit data for a given point in the mouse up location vector. | |
virtual std::unique_ptr< HitData > | cursorHitData (const HitRequest request_, const double tolerance_=2.0) const |
Gets hit data for the current cursor location. | |
virtual Callback *const | selectionCallback () const |
Gets the registered callback for the tool selection event. | |
virtual void | setSelectionCallback (const Callback &cb_) |
Sets the callback for the tool selection event. | |
virtual Callback *const | reselectionCallback () const |
Gets the registered callback for the tool reselection event. | |
virtual void | setReselectionCallback (const Callback &cb_) |
Sets the callback for the tool reselection event. | |
virtual Callback *const | deselectionCallback () const |
Gets the registered callback for the tool deselection event. | |
virtual void | setDeselectionCallback (const Callback &cb_) |
Sets the callback for the tool deselection event. | |
virtual Callback *const | trackCallback () const |
Gets the registered callback for the tool tracking event (mouse move) | |
virtual void | setTrackCallback (const Callback &cb_) |
Sets the callback for the tool tracking event (mouse move) | |
virtual Callback *const | mouseDownCallback () const |
Gets the registered callback for the mouse down event. | |
virtual void | setMouseDownCallback (const Callback &cb_) |
Sets the callback for the mouse down event. | |
virtual Callback *const | dragCallback () const |
Gets the registered callback for the drag event. | |
virtual void | setDragCallback (const Callback &cb_) |
Sets the callback for the drag event. | |
virtual Callback *const | mouseUpCallback () const |
Gets the registered callback for the mouse up event. | |
virtual void | setMouseUpCallback (const Callback &cb_) |
Sets the callback for the mouse up event. | |
virtual Callback *const | decreaseDiameterCallback () const |
Gets the registered callback for the decrease diameter event ('[' key) | |
virtual void | setDecreaseDiameterCallback (const Callback &cb_) |
Sets the callback for the decrease diameter event. | |
virtual Callback *const | increaseDiameterCallback () const |
Gets the registered callback for the increase diameter event (']' key) | |
virtual void | setIncreaseDiameterCallback (const Callback &cb_) |
Sets the callback for the increase diameter event. | |
virtual Callback *const | editCallback () const |
Gets the registered callback for the tool edit event (when its icon is double-clicked) | |
virtual void | setEditCallback (const Callback &cb_) |
Sets the callback for the tool edit event. | |
virtual void | resetCursorLocs () |
Clears the mouse down and mouse up location containers. | |
virtual bool | wasDragged () const |
Gets whether the tool has been dragged. | |
virtual bool | shiftKeyDown () const |
Determines whether the shift key is down. | |
virtual bool | commandKeyDown () const |
Determines whether the command key is down. | |
virtual bool | optionKeyDown () const |
Determines whether the option key is down. | |
virtual bool | controlKeyDown () const |
Determines whether the control key is down. | |
virtual ModalDialog *const | inputDialog () const |
Gets the modal input dialog for the target tool. | |
virtual void | setInputDialog (const ModalDialog &dialog_) |
Sets the modal input dialog for the target tool. | |
virtual ModalDialog *const | prefsDialog () const |
Gets the modal prefs dialog for the target tool. | |
virtual void | setPrefsDialog (const ModalDialog &dialog_) |
Sets the modal prefs dialog for the target tool. | |
virtual bool | autoShowPrefsDialog () const |
Gets whether the tool prefs dialog should automatically be shown when the tool is double-clicked in the Illustrator toolbox. | |
virtual void | setAutoShowPrefsDialog (const bool show_) |
Sets whether the tool prefs dialog should automatically be shown when the tool is double- clicked in the Illustrator toolbox. | |
Friends | |
aip::BaseTool * | __accessImpl (const Tool &) |
Tool | __accessCtorTool (const void *) |
Base class for all tools; stores hit data, cursor loc, dialogs, etc.; receives tool-related messages.
hdi::core::Tool::Tool | ( | ) |
Constructs an empty Tool object.
hdi::core::Tool::Tool | ( | const Tool & | tool_ | ) |
hdi::core::Tool::Tool | ( | const Tool & | sameGroupAs_, |
const Tool *const | sameSetAs_, | ||
const std::string & | title_, | ||
const std::string & | tip_, | ||
const IconResourceType | iconType_, | ||
const int16_t | lightIconID_, | ||
const int16_t | darkIconID_, | ||
const Options | options_ = DefaultOptions |
||
) |
Constructs a new Tool object, optionally in the same set/group as one of your own tools.
sameGroupAs_ | Existing reference Tool object for the group the new Tool object belongs in; pass an empty Tool object to force a new group |
sameSetAs_ | Existing reference Tool object for the set the new Tool object belongs in (sets are inside groups); pass NULL for a new set |
title_ | Tool title (must be unique), as UTF-8 |
tip_ | Tool tip (shown when the tool is rolled over in the toolbar), as UTF-8 |
iconType_ | Type of resource to which the icon IDs relate |
lightIconID_ | PNGI or SVG resource ID for the light interface icon |
darkIconID_ | PNGI or SVG resource ID for the dark interface icon |
options_ | Bitwise OR of Options enum values, controlling behavior of the tool |
hdi::core::Tool::Tool | ( | const BuiltinTool & | sameGroupAs_, |
const BuiltinTool *const | sameSetAs_, | ||
const std::string & | title_, | ||
const std::string & | tip_, | ||
const IconResourceType | iconType_, | ||
const int16_t | lightIconID_, | ||
const int16_t | darkIconID_, | ||
const Options | options_ = DefaultOptions |
||
) |
Constructs a new Tool object in the same set/group as a built-in Illustrator tool.
sameGroupAs_ | Existing reference BuiltinTool object for the group the new Tool object belongs in; pass an empty BuiltinTool object to force a new group |
sameSetAs_ | Existing reference BuiltinTool object for the set the new Tool object belongs in (sets are inside groups); pass NULL for a new set |
title_ | Tool title (must be unique), as UTF-8 |
tip_ | Tool tip (shown when the tool is rolled over in the toolbar), as UTF-8 |
iconType_ | Type of resource to which the icon IDs relate |
lightIconID_ | PNGI or SVG resource ID for the light interface icon |
darkIconID_ | PNGI or SVG resource ID for the dark interface icon |
options_ | Bitwise OR of Options enum values, controlling behavior of the tool |
|
explicit |
Constructs a new Tool object in the same set/group as some third-party tool (via handles)
sameGroupAs_ | Tool number for the existing group the new Tool object belongs in; pass -2 for a new group |
sameSetAs_ | Tool number for the existing set the new Tool object belongs in (sets are inside groups); pass -2 for a new set |
title_ | Tool title (must be unique), as UTF-8 |
tip_ | Tool tip (shown when the tool is rolled over in the toolbar), as UTF-8 |
iconType_ | Type of resource to which the icon IDs relate |
lightIconID_ | PNGI or SVG resource ID for the light interface icon |
darkIconID_ | PNGI or SVG resource ID for the dark interface icon |
options_ | Bitwise OR of Options enum values, controlling behavior of the tool |
|
virtual |
Destructs a Tool object.
|
virtual |
Gets the tool handle around which the target object is wrapped.
|
virtual |
Gets whether the tool prefs dialog should automatically be shown when the tool is double-clicked in the Illustrator toolbox.
|
virtual |
Determines whether the command key is down.
|
virtual |
Determines whether the control key is down.
|
virtual |
|
virtual |
Gets the current location of the cursor.
|
virtual |
Gets the dark UI icon ID as set when the tool was created.
|
virtual |
Gets the registered callback for the decrease diameter event ('[' key)
|
virtual |
Gets the registered callback for the tool deselection event.
|
virtual |
Destroys the tool, converting the target object to an empty Tool object (see the default constructor for more info on empty Tool objects)
|
virtual |
Gets the registered callback for the drag event.
|
virtual |
Gets the registered callback for the tool edit event (when its icon is double-clicked)
|
virtual |
Gets which type of icon resource the tool was originally constructed with.
|
virtual |
Gets the registered callback for the increase diameter event (']' key)
|
virtual |
Gets the modal input dialog for the target tool.
|
virtual |
|
virtual |
Gets the light UI icon ID as set when the tool was created.
|
virtual |
Gets the registered callback for the mouse down event.
|
virtual |
Gets hit data for a given point in the mouse down location vector.
index_ | Index of the point in the mouse down vector |
request_ | Type of hit request to perform |
tolerance_ | Point radius around mouse down location in which a hit is valid |
|
virtual |
Gets the mouse down points for the target tool.
|
virtual |
Gets the registered callback for the mouse up event.
|
virtual |
Gets hit data for a given point in the mouse up location vector.
index_ | Index of the point in the mouse up vector |
request_ | Type of hit request to perform |
tolerance_ | Point radius around mouse up location in which a hit is valid |
|
virtual |
Gets the mouse up points for the target tool.
|
virtual |
Gets the tool's number.
|
virtual |
|
virtual |
|
virtual |
Determines whether the option key is down.
|
virtual |
Gets the options set for the tool.
|
virtual |
Gets the modal prefs dialog for the target tool.
|
virtual |
Gets the registered callback for the tool reselection event.
|
virtual |
Clears the mouse down and mouse up location containers.
|
virtual |
Gets whether the target Tool object is the currently selected tool.
|
virtual |
Gets the registered callback for the tool selection event.
|
virtual |
Sets whether the tool prefs dialog should automatically be shown when the tool is double- clicked in the Illustrator toolbox.
show_ | true to show the prefs dialog automatically |
|
virtual |
Stores the current location of the cursor.
loc_ | Current cursor location |
|
virtual |
Sets the dark UI icon ID.
imgID_ | New PNGI resource ID for the dark interface icon for the target tool |
|
virtual |
Sets the callback for the decrease diameter event.
cb_ | The new decrease diameter callback |
|
virtual |
Sets the callback for the tool deselection event.
cb_ | The new deselection callback |
|
virtual |
Sets the callback for the drag event.
cb_ | The new dragging callback |
|
virtual |
Sets the callback for the tool edit event.
cb_ | The new edit callback |
|
virtual |
Sets the callback for the increase diameter event.
cb_ | The new increase diameter callback |
|
virtual |
Sets the modal input dialog for the target tool.
dialog_ | New modal input dialog for the tool |
|
virtual |
Sets the light UI icon ID.
imgID_ | New PNGI resource ID for the light interface icon for the target tool |
|
virtual |
Sets the callback for the mouse down event.
cb_ | The new mouse down callback |
|
virtual |
Sets the callback for the mouse up event.
cb_ | The new mouse up callback |
|
virtual |
Sets the options for the tool.
options_ | A bitwise OR of new Options enum values |
|
virtual |
Sets the modal prefs dialog for the target tool.
dialog_ | New modal prefs dialog for the tool |
|
virtual |
Sets the callback for the tool reselection event.
cb_ | The new reselection callback |
|
virtual |
Sets the target Tool object as the currently selected tool.
|
virtual |
Sets the callback for the tool selection event.
cb_ | The new selection callback |
|
virtual |
Sets the tool's tip string.
tip_ | New rollover tip for the tool, as UTF-8 |
|
virtual |
Sets the tool's title.
title_ | New title for the tool, as UTF-8 |
|
virtual |
Sets the callback for the tool tracking event (mouse move)
cb_ | The new tracking callback |
|
virtual |
Determines whether the shift key is down.
|
virtual |
Gets the tool's tip string.
|
virtual |
Gets the tool's title.
|
virtual |
Gets the registered callback for the tool tracking event (mouse move)
|
virtual |
Gets whether the tool has been dragged.