Gtk.AccelGroup
const Gtk = imports.gi.Gtk; let accel_group = new Gtk.AccelGroup({ });
A Gtk.AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Gtk.Window (with Gtk.add_accel_group). Usually you won't need to create a Gtk.AccelGroup directly; instead, when using Gtk.UIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager's Gtk.AccelGroup.
Note that <firstterm>accelerators</firstterm> are different from <firstterm>mnemonics</firstterm>. 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 Gtk.new_with_mnemonic. Menu items can have both accelerators and mnemonics, of course.
Hierarchy
-
GObject.Object
- Gtk.AccelGroup
Methods
- Gtk.AccelGroup.prototype.activate
- Gtk.AccelGroup.prototype.connect
- Gtk.AccelGroup.prototype.connect_by_path
- Gtk.AccelGroup.prototype.disconnect
- Gtk.AccelGroup.prototype.disconnect_key
- Gtk.AccelGroup.prototype.find
- Gtk.AccelGroup.prototype.get_is_locked
- Gtk.AccelGroup.prototype.get_modifier_mask
- Gtk.AccelGroup.prototype.lock
- Gtk.AccelGroup.prototype.query
- Gtk.AccelGroup.prototype.unlock