ShortcutController

Constructors

this
this(DzlShortcutController* dzlShortcutController, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this(Widget widget)

Members

Functions

addCommandAction
void addCommandAction(string commandId, string defaultAccel, DzlShortcutPhase phase, string action)
addCommandCallback
void addCommandCallback(string commandId, string defaultAccel, DzlShortcutPhase phase, GtkCallback callback, void* callbackData, GDestroyNotify callbackDataDestroy)
addOnReset
gulong addOnReset(void delegate(ShortcutController) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

This signal is emitted when the shortcut controller is requesting the widget to reset any state it may have regarding the shortcut controller. Such an example might be a modal system that lives outside the controller whose state should be cleared in response to the controller changing modes.

addOnSetContextNamed
gulong addOnSetContextNamed(void delegate(string, ShortcutController) dlg, ConnectFlags connectFlags = cast(ConnectFlags)0)

This changes the current context on the #DzlShortcutController to be the context matching @name. This is found by looking up the context by name in the active #DzlShortcutTheme.

executeCommand
bool executeCommand(string command)

This method will locate and execute the command matching the id @command.

getContext
ShortcutContext getContext()

This function gets the #DzlShortcutController:context property, which is the current context to dispatch events to. An #DzlShortcutContext is a group of keybindings that may be activated in response to a single or series of #GdkEventKey.

getContextForPhase
ShortcutContext getContextForPhase(DzlShortcutPhase 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.

getCurrentChord
ShortcutChord getCurrentChord()

This method gets the #DzlShortcutController:current-chord property. This is useful if you want to monitor in-progress chord building.

getManager
ShortcutManager getManager()

Gets the #DzlShortcutManager associated with this controller.

getShortcutControllerStruct
DzlShortcutController* getShortcutControllerStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getWidget
Widget getWidget()
removeAccel
void removeAccel(string accel, DzlShortcutPhase phase)
setContextByName
void setContextByName(string name)

Changes the context for the controller to the context matching @name.

setManager
void setManager(ShortcutManager manager)

Sets the #DzlShortcutController:manager property.

Static functions

find
ShortcutController find(Widget widget)

Finds the registered #DzlShortcutController for a widget.

getType
GType getType()
tryFind
ShortcutController tryFind(Widget widget)

Finds the registered #DzlShortcutController for a widget.

Variables

dzlShortcutController
DzlShortcutController* dzlShortcutController;

the main Gtk struct

Meta