► |  | The Racket Graphical Interface Toolkit

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

▼ | 7 | Editor Classes

7.1 | editor<%>
7.2 | editor-admin%
7.3 | editor-canvas%
7.4 | editor-data%
7.5 | editor-data-class%
7.6 | editor-data-class-list<%>
7.7 | editor-snip-editor-admin<%>
7.8 | editor-snip%
7.9 | editor-stream-in%
7.10 | editor-stream-in-base%
7.11 | editor-stream-in-bytes-base%
7.12 | editor-stream-out%
7.13 | editor-stream-out-base%
7.14 | editor-stream-out-bytes-base%
7.15 | editor-wordbreak-map%
7.16 | keymap%
7.17 | pasteboard%
7.18 | text%

On this page:

new
get-map
set-map

top ← prev up next →

class editor-wordbreak-map% : class?
superclass: object%

An editor-wordbreak-map% objects is used with a text% objects to specify word-breaking criteria for the default wordbreaking function. See also set-wordbreak-map, get-wordbreak-map, find-wordbreak, and set-wordbreak-func.

A global object the-editor-wordbreak-map is created automatically and used as the default map for all text% objects.

A wordbreak objects implements a mapping from each character to a list of symbols. The following symbols are legal elements of the list:

- 'caret

- 'line

- 'selection

- 'user1

- 'user2

The presence of a flag in a character’s value indicates that the character does not break a word when searching for breaks using the corresponding reason. For example, if 'caret is present, then the character is a non-breaking character for caret-movement words. (Each stream of non-breaking characters is a single word.)

> constructor (new editor-wordbreak-map%) → (is-a?/c editor-wordbreak-map%)

All ASCII alpha-numeric characters are initialized with '(caret line selection). All other ASCII non-whitespace characters except - are initialized with '(line). All ASCII whitespace characters and - are initialized with null.

> method (send an-editor-wordbreak-map get-map char)
> → (listof (or/c 'caret 'line 'selection 'user1 'user2))
> char : char?

Gets the mapping value for char. See editor-wordbreak-map% for more information.

> > method
> > (send an-editor-wordbreak-map set-map |  | char |  |  |  |
> > |  | value) |  | → |  | void?
> char : char?
> value : (listof (or/c 'caret 'line 'selection 'user1 'user2))

Sets the mapping value for char to value. See editor-wordbreak-map% for more information.
top ← prev up next →