|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAccelerator
Provides access to members that define an accelerator.
An accelerator is a mapping between a particular keyboard combination and a command. When you press the combination of keys on the keyboard, the command is executed. For example, Ctrl-C is a well-known accelerator for copying something in Windows. Some commands in the application already have accelerators assigned to them but you can also assign additional accelerators to these commands.
Use the IAcceleratorTable::Add method to create an accelerator.
The following example prints the keyboard accelerator assigned to the built-in Copy command. You would get m_app from the hook in ICommand::OnCreate().
IAcceleratorTable.getItem(int)
,
IAcceleratorTable.findByKey(int, boolean, boolean, boolean)
,
IAcceleratorTable.add(java.lang.Object, int, boolean, boolean, boolean)
Method Summary | |
---|---|
void |
delete()
Removes this accelerator from the accelerator table. |
Object |
getCommandID()
The identifier of the command that this accelerator activates. |
int |
getKey()
The keycode for this accelerator. |
boolean |
isAlt()
Indicates if the Alt key is pressed for this accelerator. |
boolean |
isCtrl()
Indicates if the Ctrl key is pressed for this accelerator. |
boolean |
isShift()
Indicates if the Shift key is pressed for this accelerator. |
void |
setAlt(boolean bAlt)
Indicates if the Alt key is pressed for this accelerator. |
void |
setCommandID(Object cmdID)
The identifier of the command that this accelerator activates. |
void |
setCtrl(boolean bCtrl)
Indicates if the Ctrl key is pressed for this accelerator. |
void |
setKey(int keyCode)
The keycode for this accelerator. |
void |
setShift(boolean bShift)
Indicates if the Shift key is pressed for this accelerator. |
Method Detail |
---|
void setShift(boolean bShift) throws IOException, AutomationException
bShift
- The bShift (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isShift() throws IOException, AutomationException
Use True if the Shift key is one of the keys used in the accelerator; otherwise use False.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAlt(boolean bAlt) throws IOException, AutomationException
bAlt
- The bAlt (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAlt() throws IOException, AutomationException
Use True if the Alt key is one of the keys used in the accelerator; otherwise use False.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCtrl(boolean bCtrl) throws IOException, AutomationException
bCtrl
- The bCtrl (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isCtrl() throws IOException, AutomationException
Use True if the Ctrl key is one of the keys used in the accelerator; otherwise use False.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setKey(int keyCode) throws IOException, AutomationException
anAccelerator.Key = vbKeyA
Dim x as Long x = anAccelerator.Key
keyCode
- The keyCode (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getKey() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCommandID(Object cmdID) throws IOException, AutomationException
cmdID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getCommandID() throws IOException, AutomationException
value specifies the unique identifier of the command. For built-in commands, use the UID. For VBA macros and UIControls, use a string representing the full name of the command.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void delete() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |