AccelGroup
Object Hierarchy:
Gtk.AccelGroup
Gtk.AccelGroup
Gtk.AccelGroup
GLib.Object
GLib.Object
GLib.Object->Gtk.AccelGroup
Description:
[ CCode ( type_id = "gtk_accel_group_get_type ()" ) ]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:
public static unowned AccelGroup ? from_accel_closure (Closure closure)
Finds the AccelGroup to which closure
is connected; see connect .
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 ()
Gets a ModifierType representing the mask
for this this .
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 signal bool accel_activate (Object acceleratable, uint keyval, ModifierType modifier)
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.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref