gtk.shortcut_action
Module for [ShortcutAction] class
Types 3
[gtk.shortcut_action.ShortcutAction] 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 [gtk.shortcut.Shortcut] object.
To activate a [gtk.shortcut_action.ShortcutAction] manually, [gtk.shortcut_action.ShortcutAction.activate] can be called.
GTK provides various actions:
- [gtk.mnemonic_action.MnemonicAction]: a shortcut action that calls
[gtk.widget.Widget.mnemonicActivate]
- [gtk.callback_action.CallbackAction]: a shortcut action that invokes
a given callback
- [gtk.signal_action.SignalAction]: a shortcut action that emits a
given signal
- [gtk.activate_action.ActivateAction]: a shortcut action that calls
[gtk.widget.Widget.activate]
- [gtk.named_action.NamedAction]: a shortcut action that calls
[gtk.widget.Widget.activateAction]
- [gtk.nothing_action.NothingAction]: a shortcut action that does nothing
ShortcutAction self()Returns `this`, for use in `with` statements.ShortcutActionGidBuilder builder()Get builder for [gtk.shortcut_action.ShortcutAction] Returns: New builder objectgtk.shortcut_action.ShortcutAction parseString(string string_)Tries to parse the given string into an action.bool activate(gtk.types.ShortcutActionFlags flags, gtk.widget.Widget widget, glib.variant.Variant args = null)Activates the action on the widget with the given args.void print(glib.string_.String string_)Prints the given action into a string for the developer.string toString_()Prints the given action into a human-readable string.Fluent builder for [gtk.shortcut_action.ShortcutAction]