set-caret-owner in editor<%>
Sets the keyboard focus owner within an editor or globally.
If #f is provided as the new owner, then the local focus is
moved to the editor itself. Otherwise, the local focus is moved to
the specified snip.
The domain of focus-setting is one of:
'immediate -- only set the focus owner within the
editor
'display -- make this editor or the new focus
owner get the keyboard focus among the editors in this editor's
display (if this is an embedded editor)
'global -- make this editor or the new focus
owner get the keyboard focus among all elements in the editor's frame
The focus state of an editor can be changed
by by the system, and such changes do not go through this method; use on-focus to
monitor focus changes.
See also
get-focus-snip .
( -> void
send an-editor set-caret-owner snip domain)
snip : snip% object or #f
domain = : symbol in 'immediate'(immediate display global)
Attempts to give the keyboard focus to snip. If snip is
#f, then the caret is taken away from any snip in the editor
that currently has the caret and restored to this editor.
If the keyboard focus is moved to snip and the editor has the
real keyboard focus, the
own-caret method of the snip will be called.