set-clickback in text%
Installs a clickback for a given region. If a clickback is already installed for an overlapping region, this clickback takes precedence.
See also Clickbacks.
( -> void
send a-text set-clickback start end f hilite-delta call-on-down?)
start : exact non-negative integer
end : exact non-negative integer
f : procedure of three arguments: a text% object, a starting position exact non-negative integer, and an ending position exact non-negative integer
hilite-delta = : #fstyle-delta% object or #f
call-on-down? = : boolean#f
The callback procedure f is called when the user selects the
clickback. The arguments to f are this editor and the starting
and ending range of the clickback.
The hilite-delta style delta is applied to the clickback text
when the user has clicked and is still holding the mouse over the
clickback. If hilite-delta is #f, then the clickback
region's style is not changed when it is being selected.
If call-on-down? is not #f, the clickback is called
immediately when the user clicks the mouse button down, instead of
after a mouse-up event. The hilite-delta argument is not used
in this case.