Adobe.com
Contents Suites Classes Class Index Member Index

AITool.h File Reference

#include "AITypes.h"
#include "AIArt.h"
#include "AIEvent.h"
#include "AIFixedMath.h"
#include "AIPlugin.h"
#include "AIToolNames.h"
#include "ASHelp.h"
#include "AIColor.h"
#include <float.h>
#include "AIHeaderBegin.h"
#include "AIHeaderEnd.h"

Go to the source code of this file.

Classes

struct  AIEffectiveToolChangeData
 Information about the change that caused a kAIEffectiveToolChangedNotifier notification. More...
struct  AIAddToolData
 Information needed to add a tool using AIToolSuite::AddTool(). More...
struct  AIAddToolDataPrivate
 For internal use only. More...
struct  AIEventHistoryData
 History Data associated with an Event. More...
struct  AIToolMessage
 The contents of a tool message. More...
struct  AIRadialDeviceMessage
 The content of a radial device message. More...
struct  AIToolNotifyData
 The contents of a tool notification. More...
struct  AIEyedropperDragNotifyData
 The contents of an eyedropper drag notification, kAIEyedropperDragNotifier. More...
struct  AIDocumentInkParams
struct  AIDocumentInkPoint
struct  AIToolDryInkMessage
 The contents of a tool message. More...
struct  AIToolSuite
 This suite allows you to provide plug-in tools for Illustrator. More...

Defines

#define kAIToolSuite   "AI Tool Suite"
#define kAIToolSuiteVersion19   AIAPI_VERSION(19)
#define kAIToolSuiteVersion   kAIToolSuiteVersion19
#define kAIToolVersion   kAIToolSuiteVersion
#define kAIEffectiveToolChangedNotifier   "AI Effective Tool Changed Notifier"
 Sent when effective tool is changed, either permanently or temporarily using modifier keys (such as Cmd, Cntl, or Spacebar).
#define kAIUserToolChangedNotifier   "AI User Tool Changed Notifier"
#define kAIToolSelectedNotifier   "AI Tool Selected Notifier"
 Sent when a tool is selected.
#define kAIToolDeselectedNotifier   "AI Tool Deselected Notifier"
 Sent when a tool is deselected.
#define kAIInvalidateByScrollNotifier   "AI Invalidate By Scroll Notifier"
 Send to notify tools to invalidate their current view when a scroll is happening on the document.
#define kAIToolClearStateNotifier   "AI Tool Clear State Notifier"
 Sent to notify tools that they should clear any editing state that they maintain.
#define kAIToolTitleChangedNotifier   "AI Tool Title Changed Notifier"
 Sent when the title string of a tool is changed.
#define kAIToolTooltipChangedNotifier   "AI Tool Tooltip Changed Notifier"
 Sent when a tool's rollover tooltip is changed.
#define kAIToolHelpIDChangedNotifier   "AI Tool Help ID Changed Notifier"
 Obsolete.
#define kAIToolIconChangedNotifier   "AI Tool Icon Resources Changed Notifier"
 Sent when a tool's icon resources are changed.
#define kAIToolChangedNotifier   "AI Tool Changed Notifier"
#define kAIToolWindowChangedNotifier   "AI Tool Window Changed Notifier"
 Sent when the tool window has changed.
#define kAIToolSuspendNotifier   "AI Tool Suspend Notifier"
#define kAIToolResumeNotifier   "AI Tool Resume Notifier"
#define kAIToolTabletPointerTypeChangedNotifier   "AI Tablet Pointer Type Changed Notifier"
 Sent when AIToolTabletPointerType is changed.
#define kAIToolModifiersChangedNotifier   "AI Tool Modifiers Changed Notifier"
 Sent when the modifier keys for the current tool are changed.
#define kAIToolSuspendedBySpacebarNotifier   "AI Tool Suspended by Spacebar Notifier"
#define kAIToolResumedBySpacebarNotifier   "AI Tool Resumed by Spacebar Notifier"
#define kAIToolSuspendedByCmdKeyNotifier   "AI Tool Suspended by Cmd Key Notifier"
#define kAIToolResumedByCmdKeyNotifier   "AI Tool Resumed by Cmd Key Notifier"
#define kAIEyedropperDragNotifier   "AI Eyedropper Drag Notifier"
 Sent by the eyedropper when it is selected and dragged.
#define kCallerRadialDevice   "AI Radial Device"
 The radial device caller.
#define kSelectorAIRadialDeviceRotated   "Radial Device Rotated"
 ingroup Selectors Sent when the radial device is rotated
#define kSelectorAIRadialDeviceClicked   "Radial Device Clicked"
 ingroup Selectors Sent when the radial device is clicked
#define kCallerAITool   "AI Tool"
 The tool caller.
#define kSelectorAIEditToolOptions   "AI Edit Options"
 Sent when the tool has been selected (double-clicked) in the Tool palette.
#define kSelectorAITrackToolCursor   "AI Track Cursor"
 Sent when the tool is selected and as the cursor is moved over the artboard with the button up.
#define kSelectorAIToolMouseDown   "AI Mouse Down"
 Sent when the mouse button is pressed.
#define kSelectorAIToolMouseDrag   "AI Mouse Drag"
 Sent on drag (cursor move with button down).
#define kSelectorAIToolMouseUp   "AI Mouse Up"
 Either follows the mouse-down selector immediately or ends the mouse-drag selectors.
#define kSelectorAISelectTool   "AI Select"
 Sent to a plug-in when its tool has been selected, to allow initialization.
#define kSelectorAIDeselectTool   "AI Deselect"
 Sent to a plug-in when a different tool is selected, to allow cleanup of any run-time variables.
#define kSelectorAIReselectTool   "AI Reselect"
 Sent when an already-selected tool is reselected, with both kAIToolDeselectedNotifier and kAIToolSelectedNotifier.
#define kSelectorAIToolDecreaseDiameter   "AI Decrease Diameter"
 Sent when shortcut '[' is activated to decrease a diameter.
#define kSelectorAIToolIncreaseDiameter   "AI Increase Diameter"
 Sent when shortcut ']' is activated to increase a diameter.
#define kSelectorAIAlternateSelectionToolQuery   "AI Alternate Selection Tool Query"
 Sent when the user requests a switch to an alternate selection tool by pressing Ctrl (in Windows) or Cmd (in MacOS) key, while using a tool that allows alternate selection tool, to determine whether the alternate selection tool is ready to be selected.
#define kSelectorAIAlternateSelectionToolActivate   "AI Alternate Selection Tool Activate"
 Sent when the user switches to an alternate selection tool by pressing Ctrl (in Windows) or Cmd (in MacOS) key while using a tool that allows alternate selection tool.
#define kSelectorAIAlternateSelectionToolDeActivate   "AI Alternate Selection Tool DeActivate"
 Sent when the user switches back from a temporary alternate selection tool.
#define kAcceptAlternateSelectionToolReply   'ASTR'
 Return code for response to kSelectorAIAlternateSelectionToolQuery when the alternate selection tool is ready for selection.
#define kSelectorAIToolDrawDryInk   "AI Tool Draw Dry Ink"
 This can be used to get strokes directly without listening to mouse down, drag and up events.
#define kNoTool   -2
 An AIToolType value that creates a new group or toolset.
#define kPluginToolOffset   1000
 Tool numbers less than this value are built-in, numbers greater than this are plug-in.
#define kToolCantTrackCursorErr   'TLTK'
 See AIToolSuite.
#define kToolTimeDurationSecond   ((AIToolTime)1.0)
#define kToolTimeDurationMillisecond   ((AIToolTime)(kToolTimeDurationSecond/1000))
#define kToolTimeDurationNoWait   ((AIToolTime)0.0)
#define kToolTimeDurationForever   ((AIToolTime)(-1.0))
#define kToolNormalIconDictKey   "ToolNormalIconDictKey"
#define kToolDarkNormalIconDictKey   "ToolDarkNormalIconDictKey"

Typedefs

typedef ai::int16 AIToolType
 A tool number used to indicate a tool group or toolset.
typedef double AIToolTime
typedef struct _t_AIToolOpaque * AIToolHandle
 Opaque reference to a tool plug-in, never dereferenced.
typedef struct _AIDataStack * AIDataStackRef
 For internal use only.
typedef ai::int16 AIToolTabletPointerType
 An AIToolTabletPointerTypeValue describing a type of pointing device.
typedef ai::int16 AIToolPressure
 An AIToolPressureValue indicating the amount of force being applied with a pressure-sensitive input device, such as a graphic tablet.
typedef ai::int16 AIToolAngle
 An AIToolAngleValue describing values of an input device such as tilt, rotation and bearing of a pen on a graphic tablet.

Enumerations

enum  AIToolOptions {
  kToolWantsToTrackCursorOption = (1<<0), kToolDoesntWantAutoScrollOption = (1<<1), kToolWantsBufferedDraggingOption = (1<<2), kToolMaintainEditContextOption = (1<<3),
  kToolIsTextToolOption = (1<<4), kToolWantsToChangeDiameterOption = (1<<5), kToolWantsAlternateSelectionTool = (1<<6), kToolWantsHiddenToolOption = (1<<7),
  kToolDoesntWantSoftSelectionOption = (1<<8), kToolWantsOSHandleInk = (1<<9), kToolHasAlternateAction = (1<<10), kToolWantsRadialDeviceEvents = (1 << 11),
  kToolDoesntWantArtStyleExecutionSuspender = (1 << 12), kToolHasItsOwnDragLoop = (1 << 13)
}
 

Bit flags for options that can be set by a plug-in tool when it is installed with AIToolSuite::AddTool(), or later with AIToolSuite::SetToolOptions().

More...
enum  AIToolInfoVariable {
  kInfoPageX = 0, kInfoPageY, kInfoSizeX, kInfoSizeY,
  kInfoDistance, kInfoVectorAngle, kInfoScaleX, kInfoScaleY,
  kInfoZoom, kInfoCornerRoundness, kInfoRotAngle, kInfoShearAngle,
  kInfoFontAndSize, kInfoTrackOrKern, kInfoRawRotAngle, kInfoDocX,
  kInfoDocY, kInfoText1, kInfoText2, kInfoText3,
  kInfoText4, kInfoText5, kInfoText6, kInfoLongText3,
  kInfoTextX, kInfoTextY, kInfoTextW, kInfoTextH,
  kInfoNumVars, kInfoBlank, kInfoTextUnicode1, kInfoTextUnicode2,
  kInfoTextUnicode3, kInfoTextUnicode4, kInfoTextUnicode5, kInfoTextUnicode6,
  kInfoLongTextUnicode1, kInfoLongTextUnicode2, kInfoLongTextUnicode3, kInfoLongText1 = kInfoFontAndSize,
  kInfoLongText2 = kInfoTrackOrKern, kInfoEndOfList = -1
}
 

Tool information values.

More...
enum  AIToolTabletPointerTypeValue { kAIToolTabletPointerTypeUnknown = 0, kAIToolTabletPointerTypePen, kAIToolTabletPointerTypeCursor, kAIToolTabletPointerTypeEraser }
 

AIToolTabletPointerType constants that describe the type of input being received from input devices.

More...
enum  AIToolPressureValue { kAIMaxToolPressure = 255, kAIMinToolPressure = 0, kAINormalToolPressure = 127 }
 

AIToolPressure constants that indicate an amount of force applied to a pressure-sensitive input device.

More...
enum  AIToolAngleValue {
  kAIToolAngle0 = 0, kAIToolAngle90 = 90, kAIToolAngleNegative179 = -179, kAIToolAngle180 = 180,
  kAIToolAngle360 = 360, kAIToolMinBearing = kAIToolAngleNegative179, kAIToolMaxBearing = kAIToolAngle180, kAIToolNormalBearing = kAIToolAngle0,
  kAIToolMinRotation = kAIToolAngleNegative179, kAIToolMaxRotation = kAIToolAngle180, kAIToolNormalRotation = kAIToolAngle0, kAIToolMinTilt = kAIToolAngle0,
  kAIToolMaxTilt = kAIToolAngle90, kAIToolNormalTilt = kAIToolMinTilt
}
 

AIToolAngle constants that describe values of an input device such as tilt, rotation and bearing of a pen on a graphic tablet.

More...
enum  AITabletCapabilities {
  kXCoordinate = 1 << 0, kYCoordinate = 1 << 1, kZCoordinate = 1 << 2, kNormalPressure = 1 << 3,
  kTangentPressure = 1 << 4, kAltitudeOrientation = 1 << 5, kAzimuthOrientation = 1 << 6, kTwistOrientation = 1 << 7
}
 

AITabletCapabilities constants that describe the hardware capabilities of a graphic tablet/ Integrated digitizer.

More...
enum  AIToolMessageFlags { kAIToolMsgInkSimulationFlag = 1 << 0, kAIToolMsgModifierKeyPressedDuringInk = 1 << 1, kAIToolMsgIsDragOver = 1 << 2 }

Detailed Description


Define Documentation

#define kAIToolChangedNotifier   "AI Tool Changed Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the current tool is changed to a different tool.
#define kAIToolResumedByCmdKeyNotifier   "AI Tool Resumed by Cmd Key Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the original tool is restored from a temporary switch back to kSelectTool, kDirectSelectTool, or kDirectObjectSelectTool. Sent when the Ctrl or Cmd key is released.
#define kAIToolResumedBySpacebarNotifier   "AI Tool Resumed by Spacebar Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the user releases the spacebar (or Alt key(while in Text tool) or Ctrl+spacebar, or Ctrl+Alt+spacebar) to resume using the original tool.
#define kAIToolResumeNotifier   "AI Tool Resume Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the cursor enters a document window.
#define kAIToolSuite   "AI Tool Suite"
#define kAIToolSuiteVersion   kAIToolSuiteVersion19
#define kAIToolSuiteVersion19   AIAPI_VERSION(19)
#define kAIToolSuspendedByCmdKeyNotifier   "AI Tool Suspended by Cmd Key Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when kSelectTool, kDirectSelectTool, or kDirectObjectSelectTool is temporarily reselected by pressing Ctrl(Windows) or Cmd(Macintosh) key while using another tool. For example, if kDirectSelectTool is selected and you then choose the eraser tool, pressing the Ctrl or Cmd key temporarily switches back to kDirectSelectTool, and sends this notification.
#define kAIToolSuspendedBySpacebarNotifier   "AI Tool Suspended by Spacebar Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the user presses the space bar or Alt key(while in Text Tool) to select the scroll tool (kScrollTool) or zoom tool (kZoomTool), or presses Ctrl+spacebar, or Ctrl+Alt+spacebar while using another tool.
#define kAIToolSuspendNotifier   "AI Tool Suspend Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when the cursor leaves a document window.
#define kAIToolVersion   kAIToolSuiteVersion
#define kAIUserToolChangedNotifier   "AI User Tool Changed Notifier"
Deprecated:
Use kAIEffectiveToolChangedNotifier instead Sent when a property of a plug-in tool is changed, such as its options, title, icon, or tooltip.
#define kNoTool   -2

An AIToolType value that creates a new group or toolset.

See Toolsets and Groups in the Tools Palette

#define kPluginToolOffset   1000

Tool numbers less than this value are built-in, numbers greater than this are plug-in.

See Toolsets and Groups in the Tools Palette and AIToolSuite::GetToolNumberFromName()

#define kSelectorAIRadialDeviceClicked   "Radial Device Clicked"

ingroup Selectors Sent when the radial device is clicked

#define kSelectorAIRadialDeviceRotated   "Radial Device Rotated"

ingroup Selectors Sent when the radial device is rotated

#define kToolDarkNormalIconDictKey   "ToolDarkNormalIconDictKey"
#define kToolNormalIconDictKey   "ToolNormalIconDictKey"
#define kToolTimeDurationForever   ((AIToolTime)(-1.0))
#define kToolTimeDurationMillisecond   ((AIToolTime)(kToolTimeDurationSecond/1000))
#define kToolTimeDurationNoWait   ((AIToolTime)0.0)
#define kToolTimeDurationSecond   ((AIToolTime)1.0)

Typedef Documentation

typedef struct _AIDataStack* AIDataStackRef

For internal use only.

typedef ai::int16 AIToolAngle

An AIToolAngleValue describing values of an input device such as tilt, rotation and bearing of a pen on a graphic tablet.

typedef struct _t_AIToolOpaque* AIToolHandle

Opaque reference to a tool plug-in, never dereferenced.

Access with AIToolSuite.

typedef ai::int16 AIToolPressure

An AIToolPressureValue indicating the amount of force being applied with a pressure-sensitive input device, such as a graphic tablet.

typedef ai::int16 AIToolTabletPointerType

An AIToolTabletPointerTypeValue describing a type of pointing device.

Used with a pressure-sensitive input device, such as a graphic tablet.

typedef double AIToolTime
typedef ai::int16 AIToolType

A tool number used to indicate a tool group or toolset.

See Toolsets and Groups in the Tools Palette and AIToolSuite::GetToolNumberFromName()


Enumeration Type Documentation

AITabletCapabilities constants that describe the hardware capabilities of a graphic tablet/ Integrated digitizer.

Enumerator:
kXCoordinate 
kYCoordinate 
kZCoordinate 
kNormalPressure 
kTangentPressure 
kAltitudeOrientation 
kAzimuthOrientation 
kTwistOrientation 

AIToolAngle constants that describe values of an input device such as tilt, rotation and bearing of a pen on a graphic tablet.

Enumerator:
kAIToolAngle0 

Angle constants in degrees.

kAIToolAngle90 
kAIToolAngleNegative179 
kAIToolAngle180 
kAIToolAngle360 
kAIToolMinBearing 

Bearing ranges from -179 to 180 where 0 is up.

kAIToolMaxBearing 
kAIToolNormalBearing 
kAIToolMinRotation 

Rotation ranges from -179 to 180 where 0 is up.

kAIToolMaxRotation 
kAIToolNormalRotation 
kAIToolMinTilt 

Tilt ranges from 0 to 90 where 0 means that the pen barrel is perpendicular to the tablet's plane and 90 means that the pen barrel is parallel to the tablet's plane.

kAIToolMaxTilt 
kAIToolNormalTilt 

Tool information values.

See AIToolSuite::SetToolInfoVars(). All values are real numbers, except these string values, which are platform-encoded strings passed as char*:
kInfoFontAndSize
kInfoTrackOrKern
kInfoText1-6 and kInfoLongText1-3

kInfoTextUnicode1-6 and kInfoLongTextUnicode1-3 refer to the same Info palette slots as kInfoText1-6 and kInfoLongText1-3, but values are ai::UnicodeString*, which is treated as const.

Enumerator:
kInfoPageX 
kInfoPageY 
kInfoSizeX 
kInfoSizeY 
kInfoDistance 
kInfoVectorAngle 
kInfoScaleX 
kInfoScaleY 
kInfoZoom 
kInfoCornerRoundness 
kInfoRotAngle 
kInfoShearAngle 
kInfoFontAndSize 
kInfoTrackOrKern 
kInfoRawRotAngle 
kInfoDocX 
kInfoDocY 
kInfoText1 
kInfoText2 
kInfoText3 
kInfoText4 
kInfoText5 
kInfoText6 
kInfoLongText3 
kInfoTextX 

Pass Custom String for: X Y W H display in info palette.

kInfoTextY 
kInfoTextW 
kInfoTextH 
kInfoNumVars 
kInfoBlank 
kInfoTextUnicode1 
kInfoTextUnicode2 
kInfoTextUnicode3 
kInfoTextUnicode4 
kInfoTextUnicode5 
kInfoTextUnicode6 
kInfoLongTextUnicode1 
kInfoLongTextUnicode2 
kInfoLongTextUnicode3 
kInfoLongText1 
kInfoLongText2 
kInfoEndOfList 
Enumerator:
kAIToolMsgInkSimulationFlag 
kAIToolMsgModifierKeyPressedDuringInk 
kAIToolMsgIsDragOver 

Bit flags for options that can be set by a plug-in tool when it is installed with AIToolSuite::AddTool(), or later with AIToolSuite::SetToolOptions().

Enumerator:
kToolWantsToTrackCursorOption 

Set to receive kSelectorAITrackToolCursor, which allows you to control the cursor for your too.

When off (the default), a standard arrow cursor is used for the tool.

kToolDoesntWantAutoScrollOption 

Set to disable automatic scrolling.

When off (the default), the Illustrator window scrolls when a tool reaches the edge. For tools that manipulate artwork, autoscroll is useful. Set this to turn autoscroll off for a tool that draws to the screen directly, like the built-in Brush tool.

kToolWantsBufferedDraggingOption 

Set to buffer the drag selectors and messages and send all of them to the tool at once.

Useful if a tool is calculation intensive. The effect is no longer real-time, but has a smoother final output. When off (the default), the tool processes drag selectors and returns frequently, resulting in near real-time feedback. If there are intensive calculations during the drag selector, the tool could miss drag notifications, resulting in rougher tracking.

kToolMaintainEditContextOption 

Set to maintain the edit context when this tool is selected.

For art objects, keeps all current points and handles selected. For text, keeps the insertion point in the current location. Set this option for navigational tools like the Zoom and Scroll tools.

kToolIsTextToolOption 

Set to maintain the text edit context when the tool is selected, if kToolMaintainEditContextOption is also set.

kToolWantsToChangeDiameterOption 

Set to receive kSelectorAIToolDecreaseDiameter and kSelectorAIToolIncreaseDiameter.

Use if the tool needs to change diameter when either '[' or ']' is pressed.

kToolWantsAlternateSelectionTool 

Set to allow switching to an alternate selection tool when user presses Ctrl (in Windows) or Cmd (in Mac OS).

This option can be set for any plug-in tool. Set the preferred alternate selection tool using AIToolSuite::SetAlternateSelectionToolName(). By default, the alternate tool is kSelectTool(), kDirectSelectTool(), or kDirectObjectSelectTool()

kToolWantsHiddenToolOption 

Set to hide a plugin toolset in the tool box.

Hidden tools can still be used through shortcuts or through suite APIs, but are not shown in the tool box. Must be set or cleared on creation; you cannot change the hidden status with AIToolSuite::SetToolOptions(). Setting this option for a single tool in a toolset has no effect unless it is set for all tools in the toolset. It is recommended that you create a set of hidden tools, then show and hide individual tools by adding them to or removing them from the hidden set.

kToolDoesntWantSoftSelectionOption 

Indicates that the tool does not support soft selection modes, when used with the tablet/pen.

AIToolSuite::SetSoftSelectedTool(). The inverted tablet pen tool will still function as the original tool.

kToolWantsOSHandleInk 

Indicates that tool does want OS to draw its wet ink and provide its final Ink points to render rather than listening to mouse events.

kToolHasAlternateAction 

Indicates that the tool has a double-click action associated with it.

kToolWantsRadialDeviceEvents 

Indicates that the tool wants to handle radial device events such as rotate and click.

kToolDoesntWantArtStyleExecutionSuspender 

Indicates that the tool does not want art style execution suspension while in drag loop.

kToolHasItsOwnDragLoop 

Indicates that the tool handles its own drag loop and don't use the default toolDragLoop.

AIToolPressure constants that indicate an amount of force applied to a pressure-sensitive input device.

Enumerator:
kAIMaxToolPressure 

The maximum pressure applied by a tool.

kAIMinToolPressure 

The minimal pressure applied by a tool.

kAINormalToolPressure 

A default value for when there is no pressure data.

AIToolTabletPointerType constants that describe the type of input being received from input devices.

Enumerator:
kAIToolTabletPointerTypeUnknown 
kAIToolTabletPointerTypePen 

Pen end of a stylus.

kAIToolTabletPointerTypeCursor 

Mouse or other non-pressure-sensitive pointer device.

kAIToolTabletPointerTypeEraser 

Eraser end of a stylus.



Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks