ShortcutsGroup#

class ShortcutsGroup(**properties: Any)#

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 Builder and a <child> tag to add the child. Adding children with other API is not appropriate as GtkShortcutsGroup manages its children internally.

Added in version 4.14.

Parameters:

shortcut – the GtkShortcutsShortcut to add

Properties#

class ShortcutsGroup
props.accel_size_group: SizeGroup#

The type of the None singleton.

props.height: int#

The type of the None singleton.

props.title: str#

The type of the None singleton.

props.title_size_group: SizeGroup#

The type of the None singleton.

props.view: str#

The type of the None singleton.