|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAcceleratorTable
Provides access to members that modify the accelerator table.
An AcceleratorTable is an object that contains a list of accelerator keys and the command identifiers associated with them.
Use the IDocument::Accelerators property to get access to the AcceleratorTable.
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 |
---|
int getCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator getItem(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean add(Object iD, int key, boolean bCtrl, boolean bAlt, boolean bShift) throws IOException, AutomationException
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.
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() .
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator
IArray find(Object iD) throws IOException, AutomationException
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.
iD
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator findByKey(int key, boolean bCtrl, boolean bAlt, boolean bShift) throws IOException, AutomationException
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.
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |