► |  | The Racket Graphical Interface Toolkit

1 | Windowing
2 | Windowing Classes
3 | Windowing Functions
4 | Editors
5 | Snip and Style Classes
6 | Editor Classes
7 | Editor Functions
8 | WXME Decoding
9 | Preferences
10 | Dynamic Loading
11 | Startup Actions
12 | Platform Dependencies
| Index

▼ | 6 | Editor Classes

6.1 | editor<%>
6.2 | editor-admin%
6.3 | editor-canvas%
6.4 | editor-data%
6.5 | editor-data-class%
6.6 | editor-data-class-list<%>
6.7 | editor-snip-editor-admin<%>
6.8 | editor-snip%
6.9 | editor-stream-in%
6.10 | editor-stream-in-base%
6.11 | editor-stream-in-bytes-base%
6.12 | editor-stream-out%
6.13 | editor-stream-out-base%
6.14 | editor-stream-out-bytes-base%
6.15 | editor-wordbreak-map%
6.16 | keymap%
6.17 | pasteboard%
6.18 | text%

On this page:

bad?
read
read-bytes
read-byte
seek
skip
tell

top← prev up next →

> class

> editor-stream-in-base% : class?

superclass: object%

An editor-stream-in-base% object is used by an editor-stream-in% object to perform low-level reading of data.

The editor-stream-in-base% class is never instantiated directly, but the derived class editor-stream-in-bytes-base% can be instantiated. New derived classes must override all of the methods described in this section.

> > method

> > (send an-editor-stream-in-base bad?) → boolean?

Returns #t if there has been an error reading from the stream, #f otherwise.

> > method

> > (send an-editor-stream-in-base read data)

> → exact-nonnegative-integer?
> data : (and/c vector? (not immutable?))

Like read-bytes, but fills a supplied vector with Latin-1 characters instead of filling a byte string. This method is implemented by default via read-bytes.

> > method

> > (send an-editor-stream-in-base read-bytes bstr)

> → exact-nonnegative-integer?
> bstr : (and/c bytes? (not immutable?))

Reads bytes to fill the supplied byte string. The return value is the number of bytes read, which may be less than the number requested if the stream is emptied. If the stream is emptied, the next call to bad? must return #t.

> > method

> > (send an-editor-stream-in-base read-byte) → (or/c byte? #f)

Reads a single byte and return it, or returns #f if no more bytes are available. The default implementation of this method uses read-bytes.

> > method

> > (send an-editor-stream-in-base seek pos) → void?

> pos : exact-nonnegative-integer?

Moves to the specified absolute position in the stream.

> > method

> > (send an-editor-stream-in-base skip n) → void?

> n : exact-nonnegative-integer?

Skips past the next n characters in the stream.

> > method

> > (send an-editor-stream-in-base tell)

> → exact-nonnegative-integer?

Returns the current stream position.
top← prev up next →