► |  | GUI: PLT Graphics Toolkit

1 | Overview
2 | Reference
3 | Configuration
4 | Dynamic Loading
| Bibliography
| Index

► | 2 | Reference

2.1 | Windowing Classes
2.2 | Windowing Functions
2.3 | Drawing Classes
2.4 | Drawing Functions
2.5 | Editor Classes
2.6 | Editor Functions
2.7 | WXME Decoding

▼ | 2.5 | Editor Classes

2.5.1 | add-color<%>
2.5.2 | editor<%>
2.5.3 | editor-admin%
2.5.4 | editor-canvas%
2.5.5 | editor-data%
2.5.6 | editor-data-class%
2.5.7 | editor-data-class-list<%>
2.5.8 | editor-snip-editor-admin<%>
2.5.9 | editor-snip%
2.5.10 | editor-stream-in%
2.5.11 | editor-stream-in-base%
2.5.12 | editor-stream-in-bytes-base%
2.5.13 | editor-stream-out%
2.5.14 | editor-stream-out-base%
2.5.15 | editor-stream-out-bytes-base%
2.5.16 | editor-wordbreak-map%
2.5.17 | image-snip%
2.5.18 | keymap%
2.5.19 | mult-color<%>
2.5.20 | pasteboard%
2.5.21 | readable-snip<%>
2.5.22 | snip%
2.5.23 | snip-admin%
2.5.24 | snip-class%
2.5.25 | snip-class-list<%>
2.5.26 | string-snip%
2.5.27 | style<%>
2.5.28 | style-delta%
2.5.29 | style-list%
2.5.30 | tab-snip%
2.5.31 | text%

On this page:

insert
read

Inherited methods:
from snip%
adjust-cursor
blink-caret
can-do-edit-operation?
copy
do-edit-operation
draw
find-scroll-step
get-admin
get-count
get-extent
get-flags
get-num-scroll-steps
get-scroll-step-offset
get-snipclass
get-style
get-text
get-text!
is-owned?
match?
merge-with
next
on-char
on-event
own-caret
partial-offset
previous
release-from-owner
resize
set-admin
set-count
set-flags
set-snipclass
set-style
set-unmodified
size-cache-invalid
split
write

Version: 4.1.4
top← prev up next →

string-snip% : class?
superclass: snip%

An instance of string-snip% is created automatically when text is inserted into a text editor. See also on-new-string-snip in text%.

(make-object string-snip% [allocsize]) → (is-a?/c string-snip%)
allocsize : exact-nonnegative-integer? = 0
(make-object string-snip% s) → (is-a?/c string-snip%)
s : string?

Creates a string snip whose initial content is s, if supplied, empty otherwise. In the latter case, the optional allocsize argument is a hint about how much storage space for text should be initially allocated by the snip.

(send a-string-snip insert s len [pos]) → void?
s : string?
len : exact-nonnegative-integer?
pos : exact-nonnegative-integer? = 0

Inserts s (with length len) into the snip at relative position pos within the snip.

(send a-string-snip read len f) → void?
len : exact-nonnegative-integer?
f : (is-a?/c editor-stream-in%)

Reads the snip’s data from the given stream.

The len argument specifies the maximum length of the text to be read. (When a text snip is written to a file, the very first field is the length of the text contained in the snip.) This method is usually invoked by the text snip class’s read method.

top← prev up next →