ShortcutsGroup#
Deprecated since version 4.18: This widget will be removed in GTK 5
Superclasses: Box, Widget, InitiallyUnowned, Object
Implemented Interfaces: Accessible, Buildable, ConstraintTarget, Orientable
A GtkShortcutsGroup represents a group of related keyboard shortcuts
or gestures.
The group has a title. It may optionally be associated with a view of the application, which can be used to show only relevant shortcuts depending on the application context.
This widget is only meant to be used with ShortcutsWindow.
The recommended way to construct a GtkShortcutsGroup is with
Builder, by using the <child> tag to populate a
GtkShortcutsGroup with one or more ShortcutsShortcut
instances.
If you need to add a shortcut programmatically, use
add_shortcut.
Methods#
- class ShortcutsGroup
- add_shortcut(shortcut: ShortcutsShortcut) None#
Adds a shortcut to the shortcuts group.
This is the programmatic equivalent to using
Builderand a<child>tag to add the child. Adding children with other API is not appropriate asGtkShortcutsGroupmanages its children internally.Added in version 4.14.
Deprecated since version 4.18: This widget will be removed in GTK 5
- Parameters:
shortcut – the
GtkShortcutsShortcutto add
Properties#
- class ShortcutsGroup
- props.accel_size_group: SizeGroup#
The size group for the accelerator portion of shortcuts in this group.
This is used internally by GTK, and must not be modified by applications.
Deprecated since version 4.18: This widget will be removed in GTK 5
- props.height: int#
A rough measure for the number of lines in this group.
This is used internally by GTK, and is not useful for applications.
Deprecated since version 4.18: This widget will be removed in GTK 5
- props.title: str#
The title for this group of shortcuts.
Deprecated since version 4.18: This widget will be removed in GTK 5