![]() | InDesign SDK 20.5 |
#include <CTool.h>

Public Member Functions | |
| CTool (IPMUnknown *boss) | |
| CTool (IPMUnknown *boss, int32 toolInfo, bool16 isCreation, bool16 isSelection) | |
| virtual void | ReadWrite (IPMStream *s, ImplementationID prop) |
| virtual void | Init (RsrcID iconID, const PluginID &pluginID) |
| virtual void | InitWidget (const WidgetID &widgetId, RsrcID iconID, const PluginID &pluginID, PMRect toolRect=kStandardToolRect) |
| virtual void | Select () |
| virtual void | Deselect () |
| virtual bool | IsSelected () |
| virtual ICursorProvider * | GetCursorProvider () const |
| virtual void | SetCursorProvider (ICursorProvider *newProvider) |
| virtual bool16 | IsCreationTool () const |
| virtual bool16 | IsSelectionTool () const |
| virtual bool16 | IsTextTool () const |
| virtual const PMString & | GetName () const |
| virtual void | SetName (const PMString &newName) |
| virtual const PMString & | GetToolHint () const |
| virtual void | SetToolHint (const PMString &newHint) |
| virtual const IDFile & | GetToolIconFile () const |
| virtual const ClassID & | GetToolType () const |
| virtual void | SetToolType (const ClassID &newToolType) |
| virtual ActionID | GetActionID () const |
| virtual void | SetActionID (ActionID action) |
| virtual void | DisplayOptions () |
| virtual void | DisplayAltOptions () |
| virtual bool16 | IsToolOfType (ITool::ToolType toolInformation) const |
| virtual ScriptID | GetScriptID () const |
| virtual bool16 | IsToolNone () const |
Protected Member Functions | |
| virtual PMString | BuildHintString (PMString &theDescriptionString, PMString &theShiftHint, PMString &theCommandCtrlHint, PMString &theOptionAltHint, PMString &theArrowsHint, PMString &extrasString) |
| virtual PMString | BuildHintString (PMString &theDescriptionString, PMString &theShiftHint, PMString &theCommandCtrlHint, PMString &theOptionAltHint, PMString &theArrowsHint, K2Vector< PMString > &theExtraModifiersHint, PMString &extrasString) |
Protected Attributes | |
| ICursorProvider * | fCursorProvider |
| bool16 | fIsCreation |
| bool16 | fIsSelection |
| ClassID | fToolType |
| int32 | fToolInformation |
| bool | fSelected |
Additional Inherited Members | |
Public Types inherited from ITool | |
| enum | { kDefaultIID = IID_ITOOL } |
| enum | ToolType { kNone = 0, kLayoutSelectionTool = 1, kTextSelectionTool = 2, kTableSelectionTool = 4, kLayoutManipulationTool = 8, kTextManipulationTool = 16, kTableManipulationTool = 32, kLayoutCreationTool = 64, kTextCreationTool = 128, kTableCreationTool = 256, kPathManipulationTool = 512, kViewModificationTool = 1024, kJGridTool = 2048, kPageSelectionTool = 4096 } |
Base implementation for tools. Clients implementing a new tool typically subclass CTool and override just the methods they need to. Most tool implementations only override a few methods: Init, sometimes DisplayOptions.
| virtual |
Subclasses which override this method should call this Deselect before doing anything – it notifies the selection that the tool is changing
Implements ITool.
| virtual |
| virtual |
| virtual |
| virtual |
| virtual |
| inlinevirtual |
Returns the ScriptID associated with this particular tool such that scripts can ask the toolBox for the ScriptID of the current tool. The list of ScriptIDs for the toolbox tools are defined by en_ToolBoxTools (kToolBoxEnumScriptElement).
Implements ITool.
Reimplemented in SnapTool, SineWaveTool, and SawWaveTool.
| virtual |
Get the tool hint of the tool.
Implements ITool.
| virtual |
Get the current tool's toolbox icon resource file.
Implements ITool.
| virtual |
Get tool type. This type determines which tools are mutually exclusive. The ClassID for the tool type is defined to be the ClassID of the default tool for that type. Traditional tools in the toolbox have a tooltype of kPointerToolBoss. This method is fully implemented by CTool. Subclasses usually have no need to override.
Implements ITool.
| virtual |
CTool does nothing in Init. Custom tool impls typically override this method and call SetName("My Tool") and InitWidget(kMyToolWidgetId, iconID, pluginID);
Implements ITool.
Reimplemented in SnapTool, SineWaveTool, and SawWaveTool.
| virtual |
CTool implements this to initialize the associated control view with the passed in WidgetID & icon/PNG.
| virtual |
| virtual |
Returns true if the tool is selected, false otherwise
Implements ITool.
| virtual |
| virtual |
| virtual |
Returns bool16 whether the tool is this none tool i.e. ITool::kNone
Implements ITool.
| virtual |
| virtual |
Subclasses which override this method should call this Select before doing anything – it notifies the selection that the tool is changing
Implements ITool.
| virtual |
| virtual |
| virtual |
| virtual |
Set the tool hint of the tool.
Implements ITool.
| virtual |
Set tool type. This type determines which tools are mutually exclusive. The ClassID for the tool type is defined to be the ClassID of the default tool for that type. Traditional tools in the toolbox have a tooltype of kPointerToolBoss. This method is fully implemented by CTool. Subclasses usually have no need to override.
Implements ITool.