Class: Gtk::ShortcutAction
- Inherits:
-
Object
- Object
- Gtk::ShortcutAction
- Defined in:
- (unknown)
Direct Known Subclasses
ActivateAction, CallbackAction, MnemonicAction, NamedAction, NothingAction, SignalAction
Instance Method Summary collapse
-
#activate(flags, widget, args) ⇒ Boolean
Activates the action on the widget with the given args.
-
#initialize(string) ⇒ Gtk::ShortcutAction
constructor
Tries to parse the given string into an action.
-
#print(string) ⇒ nil
Prints the given action into a string for the developer.
-
#to_string ⇒ String
Prints the given action into a human-readable string.
Constructor Details
#initialize(string) ⇒ Gtk::ShortcutAction
Tries to parse the given string into an action.
On success, the parsed action is returned. When parsing failed, nil is returned.
The accepted strings are:
nothing, forGtkNothingActionactivate, forGtkActivateActionmnemonic-activate, forGtkMnemonicActionaction(NAME), for aGtkNamedActionfor the action namedNAMEsignal(NAME), for aGtkSignalActionfor the signalNAME
Instance Method Details
#activate(flags, widget, args) ⇒ Boolean
Activates the action on the widget with the given args.
Note that some actions ignore the passed in flags, widget or args.
Activation of an action can fail for various reasons. If the action is not supported by the widget, if the args don't match the action or if the activation otherwise had no effect, false will be returned.
#print(string) ⇒ nil
Prints the given action into a string for the developer.
This is meant for debugging and logging.
The form of the representation may change at any time and is not guaranteed to stay identical.
#to_string ⇒ String
Prints the given action into a human-readable string.
This is a small wrapper around [methodGtk.ShortcutAction.print] to help when debugging.