insert in text%
Inserts data into the editor.
The content of an editor can be changed
by the
system in response to other method calls, and such changes do not go through this method; use on-insert in text% or
on-insert in pasteboard% to
monitor content additions changes.
(-> voidsenda-textinsertstrstartendscroll-ok?)
str: string
start: exact non-negative integer
end=: exact non-negative integer or'same'same
scroll-ok?=#t: booleanInserts the text
strat positionstart.If
endis not'same, thenstrreplaces the region fromstarttoend, and the selection is left at the end of the inserted text. Otherwise, if the insertion position is before or equal to the selection's start/end position, then the selection's start/end position is incremented by the length ofstr.If
scroll-ok?is not#fandstartis the same as the current selection's start position, then the editor's display is scrolled to show the new selection position.See also
get-styles-sticky.
(-> voidsenda-textinsertnstrstartendscroll-ok?)
n: exact non-negative integer
str: string
start: exact non-negative integer
end=: exact non-negative integer or'same'same
scroll-ok?=#t: booleanInserts the first
ncharacters ofstrat positionstart.If
endis not'same, then the inserted text replaces the region fromstarttoend, and the selection is left at the end of the inserted text. Otherwise, if the insertion position is before or equal to the selection's start/end position, then the selection's start/end position is incremented byn.If
scroll-ok?is not#fandstartis the same as the current selection's start position, then the editor's display is scrolled to show the new selection position.See also
get-styles-sticky.
(-> voidsenda-textinsertstr)
str: stringInserts
strat the current selection start position.If the current selection covers a range of items, then
strreplaces the selected text. The selection's starts and end positions are moved to the end of the inserted text.The editor's display is scrolled to show the new selection position.
See also
get-styles-sticky.
(-> voidsenda-textinsertnstr)
n: exact non-negative integer
str: stringInserts the first
ncharacters ofstrat the current selection start position.If the current selection covers a range of items, then the inserted text replaces the selected text. The selection's start and end positions are moved to the end of the inserted text.
The editor's display is scrolled to show the new selection position.
See also
get-styles-sticky.
(-> voidsenda-textinsertsnipstartendscroll-ok?)
snip:snip%object
start: exact non-negative integer
end=: exact non-negative integer or'same'same
scroll-ok?=#t: booleanInserts
snipinto the editor atstart. A snip cannot be inserted into multiple editors or multiple times within a single editor.If
endis not'same, thensnipreplaces the region fromstarttoend, and the selection is left at the end of the inserted snip. Otherwise, if the insertion position is before or equal to the selection's start/end position, then the selection's start/end position is incremented by the count ofsnip.If
scroll-ok?is not#fandstartis the same as the current selection's start position, then the editor's display is scrolled to show the new selection position.As the snip is inserted, its current style is converted to one in the editor's style list; see also
convert.
(-> voidsenda-textinsertsnip)
snip:snip%objectInserts
snipinto the editor at the current selection position. A snip cannot be inserted into multiple editors or multiple times within a single editor.If the current selection covers a range of items, then the inserted text replaces the selected text. The selection's start and end positions are moved to the end of the inserted snip.
The editor's display is scrolled to show the new selection position.
As the snip is inserted, its current style is converted to one in the editor's style list; see also
convert.
(-> voidsenda-textinsertchar)
char: characterInserts
charinto the editor at the current selection position.If the current selection covers a range of items, then
charreplaces the selected text. The selection's start and end positions are moved to the end of the inserted character.The editor's display is scrolled to show the new selection position.
See also
get-styles-sticky.Multiple calls to the character-inserting method are grouped together for undo purposes, since this case of the method is typically used for handling user keystrokes. However, this undo-grouping feature interferes with the undo grouping performed by
begin-edit-sequenceandend-edit-sequence, so the string-inserting method should be used instead during undoable edit sequences.
(-> voidsenda-textinsertcharstartend)
char: character
start: exact non-negative integer
end=: exact non-negative integer or'same'sameInserts
charinto the editor at the positionstart.If
endis not'same, thencharreplaces the region fromstarttoend, and the selection is left at the end of the inserted text. Otherwise, if the insertion position is before or equal to the selection's start/end position, then the selection's start/end position is incremented by1.If
startis the same as the current selection's start position, then the editor's display is scrolled to show the new selection position.See also
get-styles-sticky.Multiple calls to the character-inserting method are grouped together for undo purposes, since this case of the method is typically used for handling user keystrokes. However, this undo-grouping feature interferes with the undo grouping performed by
begin-edit-sequenceandend-edit-sequence, so the string-inserting method should be used instead during undoable edit sequences.