gtk-Keyboard-Accelerators {RGtk2} | R Documentation

## Accelerator Groups

### Description

Groups of global keyboard accelerators for an entire GtkWindow

### Methods and Functions

`gtkAccelGroupNew()`
`gtkAccelGroupConnect(object, accel.key, accel.mods, accel.flags, closure)`
`gtkAccelGroupConnectByPath(object, accel.path, closure)`
`gtkAccelGroupDisconnect(object, closure)`
`gtkAccelGroupDisconnectKey(object, accel.key, accel.mods)`
`gtkAccelGroupQuery(object, accel.key, accel.mods)`
`gtkAccelGroupActivate(object, accel.quark, acceleratable, accel.key, accel.mods)`
`gtkAccelGroupLock(object)`
`gtkAccelGroupUnlock(object)`
`gtkAccelGroupGetIsLocked(object)`
`gtkAccelGroupFromAccelClosure(closure)`
`gtkAccelGroupGetModifierMask(object)`
`gtkAccelGroupsActivate(object, accel.key, accel.mods)`
`gtkAccelGroupsFromObject(object)`
`gtkAccelGroupFind(object, find.func, data = NULL)`
`gtkAcceleratorValid(keyval, modifiers)`
`gtkAcceleratorParse(accelerator)`
`gtkAcceleratorName(accelerator.key, accelerator.mods)`
`gtkAcceleratorGetLabel(accelerator.key, accelerator.mods)`
`gtkAcceleratorSetDefaultModMask(default.mod.mask)`
`gtkAcceleratorGetDefaultModMask()`
`gtkAccelGroup()`

### Hierarchy

    GObject
       +----GtkAccelGroup

### Detailed Description

A `GtkAccelGroup` represents a group of keyboard accelerators, typically attached to a toplevel `GtkWindow` (with `gtkWindowAddAccelGroup`). Usually you won't need to create a `GtkAccelGroup` directly; instead, when using `GtkItemFactory`, GTK+ automatically sets up the accelerators for your menus in the item factory's `GtkAccelGroup`.

Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. See `gtkLabelNewWithMnemonic`. Menu items can have both accelerators and mnemonics, of course.

### Structures

`GtkAccelGroup`

  An object representing and maintaining a group of accelerators.

`GtkAccelKey`

  undocumented `GtkAccelKey` is a transparent-type.

  `accelKey`

    [numeric]

  `accelMods`

    [`GdkModifierType`]

  `accelFlags`

    [numeric]

### Convenient Construction

`gtkAccelGroup` is the equivalent of `gtkAccelGroupNew`.

### User Functions

`GtkAccelGroupActivate()`

  undocumented

`GtkAccelGroupFindFunc()`

  Since 2.2

### Signals

`accel-activate(accel.group, acceleratable, keyval, modifier, user.data)`

  The accel-activate signal is an implementation detail of `GtkAccelGroup` and not meant to be used by applications.

  `accel.group`

    the `GtkAccelGroup` which received the signal

  `acceleratable`

    the object on which the accelerator was activated

  `keyval`

    the accelerator keyval

  `modifier`

    the modifier combination of the accelerator

  `user.data`

    user data set when the signal handler was connected.

  Returns: [logical] `TRUE` if the accelerator was activated

`accel-changed(accel.group, keyval, modifier, accel.closure, user.data)`

  The accel-changed signal is emitted when a `GtkAccelGroupEntry` is added to or removed from the accel group.

  Widgets like `GtkAccelLabel` which display an associated accelerator should connect to this signal, and rebuild their visual representation if the `accel.closure` is theirs.

  `accel.group`

    the `GtkAccelGroup` which received the signal

  `keyval`

    the accelerator keyval

  `modifier`

    the modifier combination of the accelerator

  `accel.closure`

    the `GClosure` of the accelerator

  `user.data`

    user data set when the signal handler was connected.

### Properties

`is-locked` [logical : Read]

  Is the accel group locked. Default value: FALSE

`modifier-mask` [`GdkModifierType` : Read]

  Modifier Mask. Default value: GDK_SHIFT_MASK|GDK_CONTROL_MASK|GDK_MOD1_MASK|GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/gtk2/stable/gtk2-Keyboard-Accelerators.html

[Package RGtk2 version 2.20.36.3 Index]