com.esri.arcgis.framework
Interface IAcceleratorTable

All Superinterfaces:
Serializable
All Known Implementing Classes:
AcceleratorTable, IAcceleratorTableProxy

public interface IAcceleratorTable
extends Serializable

Provides access to members that modify the accelerator table.

Description

An AcceleratorTable is an object that contains a list of accelerator keys and the command identifiers associated with them.

Remarks

Use the IDocument::Accelerators property to get access to the AcceleratorTable.

Product Availability

Available with ArcGIS Desktop.

See Also:
IDocument.getAccelerators()

Method Summary
 boolean add(Object iD, int key, boolean bCtrl, boolean bAlt, boolean bShift)
          Adds a new accelerator to the accelerator table.
 IArray find(Object iD)
          Finds the accelerator object/s currently associated with the specified command ID.
 IAccelerator findByKey(int key, boolean bCtrl, boolean bAlt, boolean bShift)
          Finds the accelerator object associated with the specified key combination.
 int getCount()
          The count of accelerator items in the table.
 IAccelerator getItem(int index)
          The accelerator object at the specified index.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
The count of accelerator items in the table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

IAccelerator getItem(int index)
                     throws IOException,
                            AutomationException
The accelerator object at the specified index.

Product Availability

Available with ArcGIS Desktop.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.framework.IAccelerator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

boolean add(Object iD,
            int key,
            boolean bCtrl,
            boolean bAlt,
            boolean bShift)
            throws IOException,
                   AutomationException
Adds a new accelerator to the accelerator table.

Description

ID specifies the unique identifier of the command that this accelerator activates. For built-in commands, use the UID. For VBA macros and UIControls, use a string representing the full name of the command.


Key specifies the keycode used for this accelerator. Use the Visual Basic Key Code constants for the value of Key.


bCtrl Use True if the Ctrl key is one of the keys used in the accelerator; otherwise use False.


bAlt Use True if the Alt key is one of the keys used in the accelerator; otherwise use False.


bShift Use True if the Shift key is one of the keys used in the accelerator; otherwise use False.

Remarks

In VBA, you can use the builtin ArcID module to find the unique identifier for a particular command.

In the following example, the keyboard accelerator CTRL+A is assigned to the built-in ArcMap Add Data command. You would get m_app from the hook in ICommand::OnCreate() .

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
iD - A Variant (in)
key - The key (in)
bCtrl - The bCtrl (in, optional, pass false if not required)
bAlt - The bAlt (in, optional, pass false if not required)
bShift - The bShift (in, optional, pass false if not required)
Returns:
The bSucceeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAccelerator

find

IArray find(Object iD)
            throws IOException,
                   AutomationException
Finds the accelerator object/s currently associated with the specified command ID.

Description


ID specifies the unique identifier of a command. For built-in commands, use the UID. For VBA macros and UIControls, use a string representing the full name of the command.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
iD - A Variant (in)
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findByKey

IAccelerator findByKey(int key,
                       boolean bCtrl,
                       boolean bAlt,
                       boolean bShift)
                       throws IOException,
                              AutomationException
Finds the accelerator object associated with the specified key combination.

Description


Key The keycode used for this accelerator.


bCtrl True if the Ctrl key is one of the keys used in the accelerator; otherwise False.


bAlt True if the Alt key is one of the keys used in the accelerator; otherwise False.


bShift True if the Shift key is one of the keys used in the accelerator; otherwise False.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
key - The key (in)
bCtrl - The bCtrl (in, optional, pass false if not required)
bAlt - The bAlt (in, optional, pass false if not required)
bShift - The bShift (in, optional, pass false if not required)
Returns:
A reference to a com.esri.arcgis.framework.IAccelerator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAccelerator