[previous] [up] [next]     [index]
Next: Internal Editor Locks Up: Editor Toolbox Previous: Cut and Paste Time

Clickbacks

Clickbacks in a text% editor facilitate the creation of simple interactive objects, such as hyper-text. A clickback is defined by associating a callback function with a range of items in the editor. When a user clicks on the items in that range, the callback function is invoked. For example, a hyper-text clickback would associate a range with a callback function that changes the selection range in the editor.

By default, the callback function is invoked when the user releases the mouse button. The set-clickback method accepts an optional argument that causes the callback function to be invoked on the button press, instead. This behavior is useful, for example, for a clickback that creates a popup menu.

Note that there is no attempt to save clickback information when a file is saved, since a clickback will have an arbitrary procedure associated with it.



PLT