wxRuby Documentation Home

# Wx::AcceleratorEntry

An object used by an application wishing to create an accelerator table.

## Derived from

None

## See also

AcceleratorTable, Window#set_accelerator_table

## Methods

- AcceleratorEntry.new
- AcceleratorEntry#get_command
- AcceleratorEntry#get_flags
- AcceleratorEntry#get_key_code
- AcceleratorEntry#set

### AcceleratorEntry.new

AcceleratorEntry.new(%(arg-type)Integer% flags, Integer keyCode, Integer cmd) AcceleratorEntry.new(%(arg-type)Integer% flags, String key, Integer cmd)

Constructor. The key for the shortcut may be specified as either a
single-character ASCII string, eg “C”, or as an integer
keycode. To use “special” keys, such as function keys,
an integer keycode will have to be used.

#### Parameters

- flags One of ACCEL_ALT, ACCEL_SHIFT, ACCEL_CTRL and ACCEL_NORMAL. Indicates
  which modifier key is held down.
- keyCode The keycode to be detected. See Keycodes for a full list of keycodes.
- key The letter whose keypress is to be detected
- cmd The menu or control command identifier.

### AcceleratorEntry#get_command

Integer get_command()

Returns the command identifier for the accelerator table entry.

### AcceleratorEntry#get_flags

Integer get_flags()

Returns the flags for the accelerator table entry.

### AcceleratorEntry#get_key_code

Integer get_key_code()

Returns the keycode for the accelerator table entry.

### AcceleratorEntry#set

set(%(arg-type)Integer% flags, Integer keyCode, Integer cmd)

Sets the accelerator entry parameters.

#### Parameters

- flags One of ACCEL_ALT, ACCEL_SHIFT, ACCEL_CTRL and ACCEL_NORMAL. Indicates
  which modifier key is held down.
- keyCode The keycode to be detected. See Keycodes for a full list of keycodes.
- cmd The menu or control command identifier.

[This page automatically generated from the Textile source at 2023-06-09 00:45:30 +0000]