Class

GtkAccelGroup

Description [src]

class Gtk.AccelGroup : GObject.Object {
  parent: GObject,
  priv: GtkAccelGroupPrivate*
}

A GtkAccelGroup represents a group of keyboard accelerators, typically attached to a toplevel GtkWindow (with gtk_window_add_accel_group()). Usually you won’t need to create a GtkAccelGroup directly; instead, when using GtkUIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager’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 gtk_label_new_with_mnemonic(). Menu items can have both accelerators and mnemonics, of course.

Hierarchy

hierarchy this GtkAccelGroup ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gtk_accel_group_new

Creates a new GtkAccelGroup.

Functions

gtk_accel_group_from_accel_closure

Finds the GtkAccelGroup to which closure is connected; see gtk_accel_group_connect().

Instance methods

gtk_accel_group_activate

Finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.

gtk_accel_group_connect

Installs an accelerator in this group. When accel_group is being activated in response to a call to gtk_accel_groups_activate(), closure will be invoked if the accel_key and accel_mods from gtk_accel_groups_activate() match those of this connection.

gtk_accel_group_connect_by_path

Installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see gtk_accel_map_add_entry()). When accel_group is being activated in response to a call to gtk_accel_groups_activate(), closure will be invoked if the accel_key and accel_mods from gtk_accel_groups_activate() match the key and modifiers for the path.

gtk_accel_group_disconnect

Removes an accelerator previously installed through gtk_accel_group_connect().

gtk_accel_group_disconnect_key

Removes an accelerator previously installed through gtk_accel_group_connect().

gtk_accel_group_find

Finds the first entry in an accelerator group for which find_func returns TRUE and returns its GtkAccelKey.

gtk_accel_group_get_is_locked

Locks are added and removed using gtk_accel_group_lock() and gtk_accel_group_unlock().

Available since: 2.14

gtk_accel_group_get_modifier_mask

Gets a GdkModifierType representing the mask for this accel_group. For example, #GDK_CONTROL_MASK, #GDK_SHIFT_MASK, etc.

Available since: 2.14

gtk_accel_group_lock

Locks the given accelerator group.

gtk_accel_group_query

Queries an accelerator group for all entries matching accel_key and accel_mods.

gtk_accel_group_unlock

Undoes the last call to gtk_accel_group_lock() on this accel_group.

Methods inherited from GObject (42)

Properties

Gtk.AccelGroup:is-locked
No description available.
Gtk.AccelGroup:modifier-mask
No description available.

Signals

Gtk.AccelGroup::accel-activate

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

Gtk.AccelGroup::accel-changed

The accel-changed signal is emitted when an entry is added to or removed from the accel group.

Signals inherited from GObject (1)

Class structure

struct GtkAccelGroupClass {
  GObjectClass parent_class;
  void (* accel_changed) (
    GtkAccelGroup* accel_group,
    guint keyval,
    GdkModifierType modifier,
    GClosure* accel_closure
  );
  void (* _gtk_reserved1) (
void
  );
  void (* _gtk_reserved2) (
void
  );
  void (* _gtk_reserved3) (
void
  );
  void (* _gtk_reserved4) (
void
  );
  
}
Class members
parent_class
GObjectClass
 

The parent class.

accel_changed
void (* accel_changed) (
    GtkAccelGroup* accel_group,
    guint keyval,
    GdkModifierType modifier,
    GClosure* accel_closure
  )
  No description available.
_gtk_reserved1
void (* _gtk_reserved1) (
void
  )
  No description available.
_gtk_reserved2
void (* _gtk_reserved2) (
void
  )
  No description available.
_gtk_reserved3
void (* _gtk_reserved3) (
void
  )
  No description available.
_gtk_reserved4
void (* _gtk_reserved4) (
void
  )
  No description available.

Virtual methods

Gtk.AccelGroupClass.accel_changed
No description available.