ShortcutController
Object Hierarchy:
Description:
[ CCode ( type_id = "dzl_shortcut_controller_get_type ()" ) ]
public sealed class ShortcutController : Object
public sealed class ShortcutController : Object
Namespace: Dazzle
Package: libdazzle-1.0
Content:
Properties:
- public ShortcutContext context { get; }
- public ShortcutChord current_chord { get; }
- public ShortcutManager manager { get; set; }
- public Widget widget { get; construct; }
Static methods:
- public static unowned ShortcutController find (Widget widget)
Finds the registered ShortcutController for a widget.
- public static unowned ShortcutController? try_find (Widget widget)
Finds the registered ShortcutController for a widget.
Creation methods:
- public ShortcutController (Widget widget)
Methods:
- public void add_command_action (string command_id, string default_accel, ShortcutPhase phase, string action)
- public void add_command_callback (string command_id, string default_accel, ShortcutPhase phase, owned Callback callback)
- public bool execute_command (string command)
This method will locate and execute the command matching the id
command
. - public unowned ShortcutContext? get_context ()
This function gets the context property, which is the current context to dispatch events to.
- public unowned ShortcutContext? get_context_for_phase (ShortcutPhase phase)
Controllers can have a different context for a particular phase, which allows them to activate different keybindings depending if the event in capture, bubble, or dispatch.
- public unowned ShortcutChord? get_current_chord ()
This method gets the current_chord property.
- public unowned ShortcutManager get_manager ()
Gets the ShortcutManager associated with this controller.
- public unowned Widget get_widget ()
- public void remove_accel (string accel, ShortcutPhase phase)
- public void set_context_by_name (string? name)
Changes the context for the controller to the context matching
name
. - public void set_manager (ShortcutManager? manager)
Sets the manager property.
Signals:
- public signal void reset ()
This signal is emitted when the shortcut controller is requesting the widget to reset any state it may have regarding the shortcut controller.
- public signal void set_context_named (string name)
This changes the current context on the ShortcutController to be the context matching
name
.
Inherited Members:
All known members inherited from class GLib.Object