ShortcutsSection#
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 GtkShortcutsSection collects all the keyboard shortcuts and gestures
for a major application mode.
If your application needs multiple sections, you should give each
section a unique section_name and
a title that can be shown in the
section selector of the ShortcutsWindow.
The max_height property can be used
to influence how the groups in the section are distributed over pages
and columns.
This widget is only meant to be used with ShortcutsWindow.
The recommended way to construct a GtkShortcutsSection is with
Builder, by using the <child> tag to populate a
GtkShortcutsSection with one or more ShortcutsGroup
instances, which in turn contain one or more ShortcutsShortcut
objects.
If you need to add a group programmatically, use
add_group.
Shortcuts and Gestures#
Pan gestures allow to navigate between sections.
The following signals have default keybindings:
Methods#
- class ShortcutsSection
- add_group(group: ShortcutsGroup) None#
Adds a group to the shortcuts section.
This is the programmatic equivalent to using
Builderand a<child>tag to add the child.Adding children with the
GtkBoxAPI is not appropriate, asGtkShortcutsSectionmanages its children internally.Added in version 4.14.
Deprecated since version 4.18: This widget will be removed in GTK 5
- Parameters:
group – the
GtkShortcutsGroupto add
Properties#
- class ShortcutsSection
- props.max_height: int#
The maximum number of lines to allow per column.
This property can be used to influence how the groups in this section are distributed across pages and columns. The default value of 15 should work in most cases.
Deprecated since version 4.18: This widget will be removed in GTK 5
- props.section_name: str#
A unique name to identify this section among the sections added to the
GtkShortcutsWindow.Setting the
section_nameproperty to this string will make this section shown in theGtkShortcutsWindow.Deprecated since version 4.18: This widget will be removed in GTK 5