About my projects, examples and tutorials
Gnome::Gtk4::ShortcutsGroup

Gnome::Gtk4::ShortcutsGroup

Description§

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

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

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

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/ShortcutsGroup.png> :width<70\%>

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

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

Methods§

add-shortcut§

Adds a shortcut to the shortcuts group.

This is the programmatic equivalent to using Gnome::Gtk4::Builder and a `<child>` tag to add the child. Adding children with other API is not appropriate as Gnome::Gtk4::ShortcutsGroup manages its children internally.

method add-shortcut ( N-Object() $shortcut )
Code