Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | List of all members
hdi::core::BuiltinTool Class Reference

Class for accessing and querying built-in Illustrator tools. More...

#include <hdicoreBuiltinTool.h>

Public Types

enum  AdobeTool {
  HorizontalTypeTool = 10, HorizontalAreaTypeTool = 20, HorizontalPathTypeTool = 30, VerticalTypeTool = 40,
  VerticalAreaTypeTool = 50, VerticalPathTypeTool = 60, RTLHorizontalTypeTool = 70, RTLHorizontalAreaTypeTool = 80,
  RTLHorizontalPathTypeTool = 90, TextPositioningTool = 100, LineTool = 110, ArcTool = 120,
  RectangleTool = 130, RoundedRectangleTool = 140, EllipseTool = 150, PolygonTool = 160,
  StarTool = 170, SpiralTool = 180, PluginEllipseTool = 190, PluginRectangleTool = 200,
  SelectTool = 210, DirectSelectTool = 220, DirectObjectSelectTool = 230, ToggleSelectTool = 240,
  ToggleDirectSelectTool = 250, ScaleTool = 260, RotateTool = 270, ReflectTool = 280,
  ShearTool = 290, FreeTransformTool = 300, ColumnGraphTool = 310, StackedColumnGraphTool = 320,
  LineGraphTool = 330, PieGraphTool = 340, AreaGraphTool = 350, ScatterGraphTool = 360,
  BarGraphTool = 370, StackedBarGraphTool = 380, RadarGraphTool = 390, ScrollTool = 400,
  FreehandTool = 410, FreehandSmoothTool = 420, FreehandEditorTool = 430, FreehandEraseTool = 440,
  PenTool = 450, ScissorsTool = 460, KnifeTool = 470, ReshapeTool = 480,
  WidthTool = 490, StencilTool = 493, NaturalJoinTool = 496, BlendTool = 500,
  MeasureTool = 510, PageTool = 520, ZoomTool = 530, AddAnchorPointTool = 540,
  DeleteAnchorPointTool = 550, ConvertAnchorPointTool = 560, GradientVectorTool = 570, BrushTool = 580,
  EyedropperTool = 590, MeshEditingTool = 600, PatternTileTool = 610, DirectLassoTool = 620,
  MagicWandTool = 630, RectangularGridTool = 640, PolarGridTool = 650, PerspectiveGridTool = 660,
  PerspectiveSelectionTool = 670, FlareTool = 680, WarpTool = 690, NewTwirlTool = 700,
  PuckerTool = 710, BloatTool = 720, ScallopTool = 730, CrystallizeTool = 740,
  WrinkleTool = 750, CurvatureTool = 755, SliceTool = 760, SliceSelectTool = 770,
  SymbolSprayerTool = 780, SymbolShifterTool = 790, SymbolScruncherTool = 800, SymbolSizerTool = 810,
  SymbolSpinnerTool = 820, SymbolStainerTool = 830, SymbolScreenerTool = 840, SymbolStylerTool = 850,
  PlanarPaintbucketTool = 860, PlanarFaceSelectTool = 870, EraserTool = 880, CropTool = 890,
  BlobTool = 900, LiveMergeTool = 910, PlaceGunTool = 920, ChartsTool = 930,
  ShaperTool = 940, SymmetryTool = 950
}
 Describes the built-in Illustrator tools that can be acquired.
 

Public Member Functions

 BuiltinTool ()
 Constructs an empty BuiltinTool object. More...
 
 BuiltinTool (const BuiltinTool &tool_)
 Constructs a new BuiltinTool object from an existing BuiltinTool object (copy constructor) More...
 
 BuiltinTool (const AdobeTool tool_)
 Constructs a new BuiltinTool object by acquiring the underlying built-in Illustrator tool. More...
 
virtual ~BuiltinTool ()
 Destructs a BuiltinTool object. More...
 
virtual BuiltinTooloperator= (const BuiltinTool &rhs_)
 Assigns one BuiltinTool object to another. More...
 
virtual bool operator== (const BuiltinTool &rhs_) const
 Tests whether a given BuiltinTool object is the same as another. More...
 
virtual bool operator!= (const BuiltinTool &rhs_) const
 Tests whether a given BuiltinTool object is not the same as another. More...
 
virtual AIToolHandle aiToolHandle () const
 Gets the tool handle around which the target object is wrapped. More...
 
virtual bool isEmpty () const
 Gets whether the target BuiltinTool object is empty (constructed with the default ctor) More...
 
virtual std::auto_ptr< ThirdPartyPluginplugin () const
 Gets the plugin associated with the tool, if any. More...
 
virtual bool selected () const
 Gets whether the target BuiltinTool object is the currently selected tool. More...
 
virtual void setSelected ()
 Sets the target BuiltinTool object as the currently selected tool. More...
 
virtual std::string title () const
 Gets the tool's title. More...
 
virtual std::string tip () const
 Gets the tool's tip string. More...
 

Detailed Description

Class for accessing and querying built-in Illustrator tools.

Constructor & Destructor Documentation

hdi::core::BuiltinTool::BuiltinTool ( )

Constructs an empty BuiltinTool object.

Author
GW
Date
07/2014
Note
To test if a BuiltinTool object is empty, call isEmpty() on it
Empty BuiltinTool objects do not relate to any actual Illustrator tool; they are designed to be "receivers" of some other BuiltinTool object via the overloaded assignment operator. Empty BuiltinTool objects are useless until such time (though it is safe to call any of their methods).
hdi::core::BuiltinTool::BuiltinTool ( const BuiltinTool tool_)

Constructs a new BuiltinTool object from an existing BuiltinTool object (copy constructor)

Author
GW
Date
07/2014
Parameters
tool_Existing BuiltinTool object
hdi::core::BuiltinTool::BuiltinTool ( const AdobeTool  tool_)

Constructs a new BuiltinTool object by acquiring the underlying built-in Illustrator tool.

Author
GW
Date
07/2014
Parameters
tool_Enum value representing the desired tool
Warning
Some built-in tools are truly built into Illustrator, such that they do not have an associated plugin and also do not have an associated AIToolHandle. In this case, some class methods will not be functional. To determine this situation, call the isEmpty() method and the aiToolHandle() method, looking for false and NULL, respectively.
virtual hdi::core::BuiltinTool::~BuiltinTool ( )
virtual

Destructs a BuiltinTool object.

Author
GW
Date
07/2014

Member Function Documentation

virtual AIToolHandle hdi::core::BuiltinTool::aiToolHandle ( ) const
virtual

Gets the tool handle around which the target object is wrapped.

Author
GW
Date
07/2014
Returns
AIToolHandle for this object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
virtual bool hdi::core::BuiltinTool::isEmpty ( ) const
virtual

Gets whether the target BuiltinTool object is empty (constructed with the default ctor)

Author
GW
Date
07/2014
Returns
true if the target BuiltinTool object is empty, false otherwise
virtual bool hdi::core::BuiltinTool::operator!= ( const BuiltinTool rhs_) const
virtual

Tests whether a given BuiltinTool object is not the same as another.

Author
GW
Date
07/2014
Parameters
rhs_BuiltinTool to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different tools, false otherwise
virtual BuiltinTool& hdi::core::BuiltinTool::operator= ( const BuiltinTool rhs_)
virtual

Assigns one BuiltinTool object to another.

Author
GW
Date
07/2014
Parameters
rhs_Existing BuiltinTool object to copy values from
Returns
The target BuiltinTool object, but with its values updated to match that of the rhs_ argument
virtual bool hdi::core::BuiltinTool::operator== ( const BuiltinTool rhs_) const
virtual

Tests whether a given BuiltinTool object is the same as another.

Author
GW
Date
07/2014
Parameters
rhs_BuiltinTool to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same tool, false otherwise
virtual std::auto_ptr<ThirdPartyPlugin> hdi::core::BuiltinTool::plugin ( ) const
virtual

Gets the plugin associated with the tool, if any.

Author
GW
Date
09/2014
Returns
A new ThirdPartyPlugin object, or NULL for none/error
virtual bool hdi::core::BuiltinTool::selected ( ) const
virtual

Gets whether the target BuiltinTool object is the currently selected tool.

Author
GW
Date
07/2014
Returns
true if the tool is selected, false otherwise
virtual void hdi::core::BuiltinTool::setSelected ( )
virtual

Sets the target BuiltinTool object as the currently selected tool.

Author
GW
Date
09/2014
virtual std::string hdi::core::BuiltinTool::tip ( ) const
virtual

Gets the tool's tip string.

Author
GW
Date
07/2014
Returns
The rollover tip for the tool, as UTF-8
virtual std::string hdi::core::BuiltinTool::title ( ) const
virtual

Gets the tool's title.

Author
GW
Date
07/2014
Returns
The title for the tool, as UTF-8