:right-sidebar: True ShortcutsSection =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: ShortcutsSection(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Box`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.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 :obj:`~gi.repository.Gtk.ShortcutsSection.props.section_name` and a :obj:`~gi.repository.Gtk.ShortcutsSection.props.title` that can be shown in the section selector of the :obj:`~gi.repository.Gtk.ShortcutsWindow`\. The :obj:`~gi.repository.Gtk.ShortcutsSection.props.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 :obj:`~gi.repository.Gtk.ShortcutsWindow`\. The recommended way to construct a ``GtkShortcutsSection`` is with :obj:`~gi.repository.Gtk.Builder`\, by using the ```` tag to populate a ``GtkShortcutsSection`` with one or more :obj:`~gi.repository.Gtk.ShortcutsGroup` instances, which in turn contain one or more :obj:`~gi.repository.Gtk.ShortcutsShortcut` objects. If you need to add a group programmatically, use :obj:`~gi.repository.Gtk.ShortcutsSection.add_group`\. Shortcuts and Gestures -------------------------------------------------------------------------------- Pan gestures allow to navigate between sections. The following signals have default keybindings: - :obj:`~gi.repository.Gtk.ShortcutsSection.signals.change_current_page` Methods ------- .. rst-class:: interim-class .. class:: ShortcutsSection :no-index: .. method:: add_group(group: ~gi.repository.Gtk.ShortcutsGroup) -> None Adds a group to the shortcuts section. This is the programmatic equivalent to using :obj:`~gi.repository.Gtk.Builder` and a ```` tag to add the child. Adding children with the ``GtkBox`` API is not appropriate, as ``GtkShortcutsSection`` manages its children internally. .. versionadded:: 4.14 :param group: the ``GtkShortcutsGroup`` to add Properties ---------- .. rst-class:: interim-class .. class:: ShortcutsSection :no-index: .. attribute:: props.max_height :type: int The type of the None singleton. .. attribute:: props.section_name :type: str The type of the None singleton. .. attribute:: props.title :type: str The type of the None singleton. .. attribute:: props.view_name :type: str The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: ShortcutsSection.signals :no-index: .. method:: change_current_page(offset: int) -> bool The type of the None singleton. :param offset: the offset