Gtk.ShortcutsSection

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Box Gtk.Box Gtk.ShortcutsSection Gtk.ShortcutsSection Gtk.Box->Gtk.ShortcutsSection Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Box

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Orientable (2)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

Gtk.Box (4), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Orientable (1)

Name

Type

Flags

Short Description

max-height

int

r/w/en

section-name

str

r/w

title

str

r/w

view-name

str

r/w/en

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Short Description

change-current-page

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Class Details

class Gtk.ShortcutsSection(**kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

Gtk.ShortcutsSectionClass

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 [property`Gtk`.ShortcutsSection:section-name] and a [property`Gtk`.ShortcutsSection:title] that can be shown in the section selector of the [class`Gtk`.ShortcutsWindow].

The [property`Gtk`.ShortcutsSection: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 [class`Gtk`.ShortcutsWindow].

Signal Details

Gtk.ShortcutsSection.signals.change_current_page(shortcuts_section, object)
Signal Name:

change-current-page

Flags:

RUN_LAST, ACTION

Parameters:
Return type:

bool

Property Details

Gtk.ShortcutsSection.props.max_height
Name:

max-height

Type:

int

Default Value:

15

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.

Gtk.ShortcutsSection.props.section_name
Name:

section-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A unique name to identify this section among the sections added to the GtkShortcutsWindow.

Setting the [property`Gtk`.ShortcutsWindow:section-name] property to this string will make this section shown in the GtkShortcutsWindow.

Gtk.ShortcutsSection.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The string to show in the section selector of the GtkShortcutsWindow for this section.

If there is only one section, you don’t need to set a title, since the section selector will not be shown in this case.

Gtk.ShortcutsSection.props.view_name
Name:

view-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

A view name to filter the groups in this section by.

See [property`Gtk`.ShortcutsGroup:view].

Applications are expected to use the [property`Gtk`.ShortcutsWindow:view-name] property for this purpose.