AccelGroup
Object Hierarchy:
Description:
public class AccelGroup :
Object
A AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel
Window (with add_accel_group).
Usually you won’t need to create a AccelGroup directly; instead, when using
UIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager’s
AccelGroup.
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
Label.with_mnemonic. Menu items can have both accelerators and
mnemonics, of course.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public void @lock ()
Locks the given accelerator group.
- public void @unlock ()
Undoes the last call to
@lock on this this.
- public bool activate (Quark accel_quark, Object acceleratable, uint accel_key, ModifierType accel_mods)
Finds the first accelerator in this
that matches accel_key and accel_mods, and activates it.
- public void connect (uint accel_key, ModifierType accel_mods, AccelFlags accel_flags, owned AccelGroupActivate closure)
Installs an accelerator in this group.
- public void connect_by_path (string accel_path, owned AccelGroupActivate closure)
Installs an accelerator in this group, using an accelerator path to
look up the appropriate key and modifiers (see add_entry).
- public bool disconnect (Closure closure)
Removes an accelerator previously installed through
connect.
- public bool disconnect_key (uint accel_key, ModifierType accel_mods)
Removes an accelerator previously installed through
connect.
- public AccelKey* find (AccelGroupFindFunc find_func)
Finds the first entry in an accelerator group for which
find_func returns true and returns its AccelKey
.
- public bool get_is_locked ()
- public ModifierType get_modifier_mask ()
- public unowned AccelGroupEntry[] query (uint accel_key, ModifierType accel_mods)
Queries an accelerator group for all entries matching accel_key
and accel_mods.
Signals:
- public virtual signal bool accel_activate (Object p0, uint p1, ModifierType p2)
The accel-activate signal is an implementation detail of
AccelGroup and not meant to be used by applications.
- public virtual signal void accel_changed (uint keyval, ModifierType modifier, Closure accel_closure)
The accel-changed signal is emitted when an entry is added to or
removed from the accel group.
Fields:
Inherited Members:
All known members inherited from class GLib.Object