About all my projects
Gnome::Gtk4::ShortcutLabel

Gnome::Gtk4::ShortcutLabel

Description

Gnome::Gtk4::ShortcutLabel displays a single keyboard shortcut or gesture.

The main use case for Gnome::Gtk4::ShortcutLabel is inside a Gnome::Gtk4::ShortcutsWindow.

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! )

new-shortcutlabel

Creates a new Gnome::Gtk4::ShortcutLabel with $accelerator set.

method new-shortcutlabel ( Str $accelerator --> Gnome::Gtk4::ShortcutLabel \)
  • $accelerator; the initial accelerator.

Methods

get-accelerator

Retrieves the current accelerator of $self.

method get-accelerator (--> Str )

Return value; the current accelerator..

get-disabled-text

Retrieves the text that is displayed when no accelerator is set.

method get-disabled-text (--> Str )

Return value; the current text displayed when no accelerator is set..

set-accelerator

Sets the accelerator to be displayed by $self.

method set-accelerator ( Str $accelerator )
  • $accelerator; the new accelerator.

set-disabled-text

Sets the text to be displayed by $self when no accelerator is set.

method set-disabled-text ( Str $disabled-text )
  • $disabled-text; the text to be displayed when no accelerator is set.