About all my projects
Gnome::Gtk4::ShortcutsSection

Gnome::Gtk4::ShortcutsSection

Description

A Gnome::Gtk4::ShortcutsSection 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 Gnome::Gtk4::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 Gnome::Gtk4::ShortcutsWindow.

The recommended way to construct a Gnome::Gtk4::ShortcutsSection is with Gnome::Gtk4::Builder, by using the `<child>` tag to populate a Gnome::Gtk4::ShortcutsSection with one or more Gnome::Gtk4::ShortcutsGroup instances, which in turn contain one or more Gnome::Gtk4::ShortcutsShortcut objects.

If you need to add a group programmatically, use .add-group().

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

Methods

add-group

Adds a group to the shortcuts section.

This is the programmatic equivalent to using Gnome::Gtk4::Builder and a `<child>` tag to add the child.

Adding children with the Gnome::Gtk4::Box API is not appropriate, as Gnome::Gtk4::ShortcutsSection manages its children internally.

method add-group ( N-Object() $group )
  • $group; the Gnome::Gtk4::ShortcutsGroup to add.

Signals

change-current-page

method handler (
  gint $object,
  Int :$_handle_id,
  N-GObject :$_native-object,
  Gnome::Gtk4::ShortcutsSection :$_widget,
  *C<user>-options
  --> gboolean
)
  • $object; .

  • $_handle_id; The registered event handler id.

  • $_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::ShortcutsSection object.

  • $_widget; The object which registered the signal. User code may have left the object going out of scope.

  • user-options; A list of named arguments provided at the .register-signal() method from Gnome::GObject::Object.

Return value;