Class: Gtk::AccelGroup
- Inherits:
-
Object
- Object
- Gtk::AccelGroup
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#activate(accel_quark, acceleratable, accel_key, accel_mods) ⇒ TrueClass
Finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.
-
#connect(accel_key, accel_mods, accel_flags, closure) ⇒ nil
Installs an accelerator in this group.
-
#connect_by_path(accel_path, closure) ⇒ nil
Installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see gtk_accel_map_add_entry()).
-
#disconnect(closure) ⇒ TrueClass
Removes an accelerator previously installed through gtk_accel_group_connect().
-
#disconnect_key(accel_key, accel_mods) ⇒ TrueClass
Removes an accelerator previously installed through gtk_accel_group_connect().
-
#find(find_func, data) ⇒ Gtk::AccelKey
Finds the first entry in an accelerator group for which find_func returns true and returns its Gtk::AccelKey.
-
#is_locked ⇒ TrueClass
Locks are added and removed using gtk_accel_group_lock() and gtk_accel_group_unlock().
- #is_locked=(is_locked) ⇒ TrueClass
-
#is_locked? ⇒ TrueClass
Is-locked.
-
#lock ⇒ nil
Locks the given accelerator group.
-
#modifier_mask ⇒ Gdk::ModifierType
Modifier-mask.
- #modifier_mask=(modifier_mask) ⇒ Gdk::ModifierType
-
#new ⇒ Gtk::AccelGroup
Creates a new Gtk::AccelGroup.
-
#query(accel_key, accel_mods, n_entries) ⇒ Array<Gtk::AccelGroupEntry>
Queries an accelerator group for all entries matching accel_key and accel_mods.
-
#unlock ⇒ nil
Undoes the last call to gtk_accel_group_lock() on this accel_group.
Instance Method Details
#activate(accel_quark, acceleratable, accel_key, accel_mods) ⇒ TrueClass
Finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.
#connect(accel_key, accel_mods, accel_flags, closure) ⇒ nil
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.
The signature used for the closure is that of Gtk::AccelGroupActivate.
Note that, due to implementation details, a single closure can only be connected to one accelerator group.
#connect_by_path(accel_path, closure) ⇒ nil
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.
The signature used for the closure is that of Gtk::AccelGroupActivate.
Note that accel_path string will be stored in a #GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().
#disconnect(closure) ⇒ TrueClass
Removes an accelerator previously installed through gtk_accel_group_connect().
Since 2.20 closure can be nil.
#disconnect_key(accel_key, accel_mods) ⇒ TrueClass
Removes an accelerator previously installed through gtk_accel_group_connect().
#find(find_func, data) ⇒ Gtk::AccelKey
Finds the first entry in an accelerator group for which find_func returns true and returns its Gtk::AccelKey.
#is_locked ⇒ TrueClass
Locks are added and removed using gtk_accel_group_lock() and gtk_accel_group_unlock().
#is_locked=(is_locked) ⇒ TrueClass
#is_locked? ⇒ TrueClass
Returns is-locked.
#lock ⇒ nil
Locks the given accelerator group.
Locking an acelerator group prevents the accelerators contained within it to be changed during runtime. Refer to gtk_accel_map_change_entry() about runtime accelerator changes.
If called more than once, accel_group remains locked until gtk_accel_group_unlock() has been called an equivalent number of times.
#modifier_mask ⇒ Gdk::ModifierType
Returns modifier-mask.
#modifier_mask=(modifier_mask) ⇒ Gdk::ModifierType
#new ⇒ Gtk::AccelGroup
Creates a new Gtk::AccelGroup.
#query(accel_key, accel_mods, n_entries) ⇒ Array<Gtk::AccelGroupEntry>
Queries an accelerator group for all entries matching accel_key and accel_mods.
#unlock ⇒ nil
Undoes the last call to gtk_accel_group_lock() on this accel_group.