Next: Actions, Previous: Selections, Up: lepton-schematic API Reference [Contents][Index]
To use the hooks described in this section, you will need to load the
(schematic hook)
module.
lepton-schematic defines a number of hooks that allow functions to be automatically run whenever a number of built-in actions are invoked by the user.
Most Scheme functions do not call these hooks. If it makes sense for your code to invoke a standard hook, you should normally do so explicitly.
Warning: Functions added to these standard hooks should not normally modify their arguments.
For more information on hooks in Guile, see Hooks in Guile Reference Manual.
Called after objects are added to the page, at their initial creation. The argument is a list of the objects being added.
Called after objects are copied, either via Edit → Copy Mode or similar, or to buffers, or to the clipboard. Argument is a list of the objects that were copied.
Called after objects are removed from the page. Argument is a list of the objects being removed.
Called after objects are moved. Argument is a list of the objects that were moved.
Called after objects are mirrored. Argument is a list of the objects that were mirrored.
Called after objects are rotated. Argument is a list of the objects that were rotated.
Called after objects are pasted to the page, either via Edit → Copy Mode or similar, or via buffers, or via the clipboard. Argument is a list of the objects that were pasted.
Called after attributes are attached to something. The argument is a list of the attributes that were attached.
Called after attributes are detached from something. The argument is a list of the attributes that were detached.
Called after objects are added to the selection. The argument is a list of objects that were selected.
Called after objects are removed from the selection. The argument is a list of objects that were deselected.
Called when a new page is created. The argument is the new page.
Called when an existing page is loaded. The argument is the loaded page.
Called when an action property is set. The arguments are the action, the property key and the property value. See Actions.
Since 1.10.
Called when a key binding is set or modified. The arguments are the keymap, the key sequence and the binding’s target.
Note: bind-keys-hook
may be run multiple times for a
single key binding event if the target keymap is bound within a
superior keymap.
Since 1.10.
Called when GUI switches to a new action mode. The argument is the new mode.
The action mode may be one of the following symbols:
(add-hook! switch-action-mode-hook (lambda (mode) (display mode) (newline)))
Since 1.10.
Next: Actions, Previous: Selections, Up: lepton-schematic API Reference [Contents][Index]