Class ShortcutLabel

All Implemented Interfaces:
PointerInterface

public class ShortcutLabel extends Widget
`GtkShortcutLabel` displays a single keyboard shortcut or gesture.

The main use case for `GtkShortcutLabel` is inside a [class@Gtk.ShortcutsWindow].

https://docs.gtk.org/gtk4/class.ShortcutLabel.html

  • Constructor Details

    • ShortcutLabel

      public ShortcutLabel(PointerContainer pointer)
    • ShortcutLabel

      public ShortcutLabel(@Nonnull Str accelerator)
      Creates a new `GtkShortcutLabel` with @accelerator set.
      Parameters:
      accelerator - the initial accelerator
    • ShortcutLabel

      public ShortcutLabel(String accelerator)
      Creates a new `GtkShortcutLabel` with @accelerator set.
      Parameters:
      accelerator - the initial accelerator
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getAccelerator

      public Str getAccelerator()
      Retrieves the current accelerator of @self.
      Returns:
      the current accelerator.
    • getDisabledText

      public Str getDisabledText()
      Retrieves the text that is displayed when no accelerator is set.
      Returns:
      the current text displayed when no accelerator is set.
    • setAccelerator

      public void setAccelerator(@Nonnull Str accelerator)
      Sets the accelerator to be displayed by @self.
      Parameters:
      accelerator - the new accelerator
    • setAccelerator

      public void setAccelerator(String accelerator)
      Sets the accelerator to be displayed by @self.
      Parameters:
      accelerator - the new accelerator
    • setDisabledText

      public void setDisabledText(@Nonnull Str disabled_text)
      Sets the text to be displayed by @self when no accelerator is set.
      Parameters:
      disabled_text - the text to be displayed when no accelerator is set
    • setDisabledText

      public void setDisabledText(String disabled_text)
      Sets the text to be displayed by @self when no accelerator is set.
      Parameters:
      disabled_text - the text to be displayed when no accelerator is set
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()