com.esri.arcgis.controls
Interface ICommandHook

All Superinterfaces:
Serializable
All Known Implementing Classes:
ICommandHookProxy

public interface ICommandHook
extends Serializable

Provides access to members that work with HookHelper. Custom control or application needs to implement ICommandHook to be recognized by HookHelper.

Description

Implement the ICommandHook interface in custom controls and applications if you want them to work with HookHelper objects. The HookHelper is designed to help developers write custom commands that will work with the ArcGIS Engine MapControl, PageLayoutControl, ToolbarControl and the ArcMap application as well as custom applications.

Product Availability

Available with ArcGIS Engine.


Method Summary
 IActiveView getActiveView()
          Active view of control or application.
 IOperationStack getOperationStack()
          Operation stack of control or application used for undo/redo operation.
 IPageLayout getPageLayout()
          Page layout of control or application.
 

Method Detail

getActiveView

IActiveView getActiveView()
                          throws IOException,
                                 AutomationException
Active view of control or application.

Description

The IActiveView object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::ActiveView can return the IActiveView of the hook by using this property.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.carto.IActiveView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPageLayout

IPageLayout getPageLayout()
                          throws IOException,
                                 AutomationException
Page layout of control or application. Return NULL if not supporting page layout.

Description

The IPageLayout object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::PageLayout can return the IPageLayout of the hook by using this property.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.carto.IPageLayout
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOperationStack

IOperationStack getOperationStack()
                                  throws IOException,
                                         AutomationException
Operation stack of control or application used for undo/redo operation. Return NULL if control or application does not have its own operation stack.

Description

The IOperationStack object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::OperationStack can return the IOperationStack of the hook by using this property. If the command has been added to a ToolbarControl the property will always return the IToolbarControl::OperationStack.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.systemUI.IOperationStack
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.