ArcObjects Library Reference (SystemUI)  

ITool Interface

Provides access to members that define a tool.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Tools are similar to buttons but they also require interaction with the application's display. The Zoom In command is a good example of a tool--you click or drag a rectangle over a map before the display is redrawn to show the map contents in more detail.

When To Use

Use the ITool interface to query the properties of a built-in tool or to create your own COM tool.

When you are creating a new COM tool, you need to implement both the ICommand interface and the ITool interface in your class code. With the ITool interface you can define what occurs on events such as mouse move, mouse button press/release, keyboard key press/release, double-click, and right click.

Members

Description
Read-only property Cursor The mouse pointer for this tool.
Method Deactivate Causes the tool to no longer be the active tool.
Method OnContextMenu Context menu event occured at the given xy location.
Method OnDblClick Occurs when a mouse button is double clicked when this tool is active.
Method OnKeyDown Occurs when a key on the keyboard is pressed when this tool is active.
Method OnKeyUp Occurs when a key on the keyboard is released when this tool is active.
Method OnMouseDown Occurs when a mouse button is pressed when this tool is active.
Method OnMouseMove Occurs when the mouse is moved when this tool is active.
Method OnMouseUp Occurs when a mouse button is released when this tool is active.
Method Refresh Occurs when a screen display in the application is refreshed.

CoClasses that implement ITool

CoClasses and Classes Description
AutoCompletePolygonFeatureTool (esriEditor) Tool that uses the AutoCompletePolygon Task to create a new Polygon from a Line sketch geometry.
Controls3DAnalystContourTool (esriControls) Generates the contour that passes through a query point.
Controls3DAnalystSteepestPathTool (esriControls) Generates the steepest path down from a point.
ControlsEditingEditTool (esriControls) Edits features and their geometries.
ControlsEditingSketchTool (esriControls) Adds points to the edit sketch.
ControlsGenericGetPositionTool (esriControls) Tools that can be used to retrieve the cursor coordinates as the user clicks on the map or globe.
ControlsGlobeFixedLineOfSightTool (esriControls) Rotates the observer around the target.
ControlsGlobeFlyTool (esriControls) Flies over the globe.
ControlsGlobeHyperlinkTool (esriControls) Hyperlinks to features on a globe, if more than one hyperlink is under the cursor a dialog is shown allowing the user to select which hyperlink to jump to.
ControlsGlobeIdentifyTool (esriControls) Finds features on a globe, launches a modeless dialog to search fields in globe layers.
ControlsGlobeLookAroundTool (esriControls) Rotates the observer to look around.
ControlsGlobeMeasureTool (esriControls) Measures features on a globe, a floating tooltip is used to show the result. The message property returns a string for the status bar.
ControlsGlobeNavigateTool (esriControls) Navigates the globe.
ControlsGlobeOrbitalFlyTool (esriControls) Flies in orbital trajectories over the globe.
ControlsGlobePanDragTool (esriControls) Trackball style pan tool.
ControlsGlobePanTool (esriControls) Pans the globe.
ControlsGlobeSelectFeaturesTool (esriControls) Selects features by clicking.
ControlsGlobeSwipeTool (esriControls) Interactively reveals layers on a globe.
ControlsGlobeTargetCenterTool (esriControls) Centers view at selected target.
ControlsGlobeTargetPanTool (esriControls) Pans to selected target.
ControlsGlobeTargetZoomTool (esriControls) Zooms to selected target.
ControlsGlobeWalkTool (esriControls) Walks on the globe surface.
ControlsGlobeZoomInOutTool (esriControls) Dynamically zooms in or out the globle.
ControlsInkEraserTool (esriControls) Erases ink from a map or layout.
ControlsInkGenericDrawTool (esriControls) A generic ink drawing tool.
ControlsInkHighlightTool (esriControls) Draws semi-transparent ink on a map or layout.
ControlsInkPenTool (esriControls) Draws colored ink on a map or layout.
ControlsMapHyperlinkTool (esriControls) Hyperlinks to features on a map, if more than one hyperlink is under the cursor a dialog is shown allowing the user to select which hyperlink to jump to.
ControlsMapIdentifyTool (esriControls) Identifies features on a map, launches a modeless identify dialog containing the results.
ControlsMapMeasureTool (esriControls) Measures features on a map, a floating tooltip is used to show the result. The message property returns a string for the status bar.
ControlsMapPanTool (esriControls) Pans the map.
ControlsMapRoamTool (esriControls) Click the mouse left button to start or finish roaming, move the mouse to change roaming direction and speed.
ControlsMapRotateTool (esriControls) Rotates the focus data frame.
ControlsMapSwipeTool (esriControls) Interactively reveals layers on a map.
ControlsMapZoomInTool (esriControls) Zooms in by clicking a point or dragging a box.
ControlsMapZoomOutTool (esriControls) Zooms out by clicking a point or dragging a box.
ControlsMapZoomPanTool (esriControls) Drags up/down with left mouse button down to zoom out/in, or with right mouse button down to pan.
ControlsNetworkAnalystCreateLocationTool (esriControls) Create a Network Location.
ControlsNetworkAnalystSelectLocationTool (esriControls) Select or Move Network Locations.
ControlsNewCircleTool (esriControls) Draws a circle.
ControlsNewCurveTool (esriControls) Draws a cubic Bezier curve.
ControlsNewEllipseTool (esriControls) Draws an ellipse.
ControlsNewFrameTool (esriControls) Creates a new frame element.
ControlsNewFreeHandTool (esriControls) Draws a freehand line.
ControlsNewLineTool (esriControls) Draws a straight line.
ControlsNewMarkerTool (esriControls) Create a new marker graphic element.
ControlsNewPolygonTool (esriControls) Draws a polygon.
ControlsNewRectangleTool (esriControls) Draws a rectangle.
ControlsPagePanTool (esriControls) Pans the map layout by dragging it.
ControlsPageZoomInTool (esriControls) Zooms in on the map layout by clicking a point or dragging a box.
ControlsPageZoomOutTool (esriControls) Zooms out on the map layout by clicking a point or dragging a box.
ControlsRotateElementTool (esriControls) Rotates the selected text or graphic(s).
ControlsSceneFlyTool (esriControls) Flies through the scene.
ControlsSceneNavigateTool (esriControls) Navigates the scene.
ControlsScenePanTool (esriControls) Pans the scene.
ControlsSceneSelectFeaturesTool (esriControls) Selects features by clicking.
ControlsSceneSelectGraphicsTool (esriControls) Selects graphics by clicking.
ControlsSceneSetObserverTool (esriControls) Sets observer position to selected point.
ControlsSceneTargetCenterTool (esriControls) Centers view at selected target.
ControlsSceneTargetZoomTool (esriControls) Zooms to selected target.
ControlsSceneZoomInOutTool (esriControls) Dynamically zooms in and out on the scene.
ControlsSceneZoomInTool (esriControls) Zooms in on the scene.
ControlsSceneZoomOutTool (esriControls) Zooms out on the scene.
ControlsSchematicMoveElementTool (esriSchematicControls) Move the Schematic element.
ControlsSchematicSelectEndTool (esriSchematicControls) Define a Schematic end.
ControlsSchematicSelectRootTool (esriSchematicControls) Define a Schematic root.
ControlsSelectFeaturesTool (esriControls) Selects features by clicking or dragging a box.
ControlsSelectTool (esriControls) Selects, resizes and moves text, graphics and other objects placed on the map.
CutPolygonsTool (esriEditor)
EditTool (esriEditor) Editing tool which edits features.
LineFeatureTool (esriEditor) Tool that creates a new Polyline sketch geometry.
MirrorFeaturesTool (esriEditor)
MxAddressInspectorTool (esriLocationUI) Displays Address of a Location Using Application's Current Locator.
MxLocatorManager2Control (esriLocationUI) Management of the Locators.
PointAtEndOfLineTool (esriEditor) Tool that creates a new Point/Multipoint at the end of a line geometry.
PointFeatureTool (esriEditor) Tool that creates a new Point/Multipoint sketch geometry.
PolygonFeatureTool (esriEditor) Tool that creates a new Polygon sketch geometry.
ReplaceGeometryTool (esriEditor)
ReshapeFeatureTool (esriEditor)
SingleLineSearchControl (esriLocationUI) Make a Search of Address Based on Entered String Using Application's Current Locator.
Tool (esriFramework) Tool CoType.
ToolHost Use this class to host pure C++ tool implementations in a Toolbar.

See Also

ICommand Interface

.NET Samples

Brushing to create a selection (Code Files: BrushingVB) | Synchronized MapControl and PageLayoutControl application (Code Files: ControlsSynchronizer) |

.NET Related Topics

How to use an application as the ToolbarControl buddy | Workaround for ink commands and Microsoft Visual Studio .NET |