ShortcutAction

open class ShortcutAction(pointer: <Error class: unknown class><<Error class: unknown class>>)

GtkShortcutAction encodes an action that can be triggered by a keyboard shortcut.

GtkShortcutActions contain functions that allow easy presentation to end users as well as being printed for debugging.

All GtkShortcutActions are immutable, you can only specify their properties during construction. If you want to change a action, you have to replace it with a new one. If you need to pass arguments to an action, these are specified by the higher-level GtkShortcut object.

To activate a GtkShortcutAction manually, method@Gtk.ShortcutAction.activate can be called.

GTK provides various actions:

  • class@Gtk.MnemonicAction: a shortcut action that calls gtk_widget_mnemonic_activate()

  • class@Gtk.CallbackAction: a shortcut action that invokes a given callback

  • class@Gtk.SignalAction: a shortcut action that emits a given signal

  • class@Gtk.ActivateAction: a shortcut action that calls gtk_widget_activate()

  • class@Gtk.NamedAction: a shortcut action that calls gtk_widget_activate_action()

  • class@Gtk.NothingAction: a shortcut action that does nothing

Skipped during bindings generation

  • method to_string: C function gtk_shortcut_action_to_string is ignored

Inheritors

Constructors

Link copied to clipboard
constructor(string: String)

Tries to parse the given string into an action.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkShortcutActionPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun activate(flags: ShortcutActionFlags, widget: Widget, args: <Error class: unknown class>? = null): Boolean

Activates the action on the @widget with the given @args.

Link copied to clipboard
open fun print(string: <Error class: unknown class>)

Prints the given action into a string for the developer.