► |  | 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

▼ | 6 | Snip and Style Classes

6.1 | add-color<%>
6.2 | image-snip%
6.3 | mult-color<%>
6.4 | readable-snip<%>
6.5 | snip%
6.6 | snip-admin%
6.7 | snip-class%
6.8 | snip-class-list<%>
6.9 | string-snip%
6.10 | style<%>
6.11 | style-delta%
6.12 | style-list%
6.13 | tab-snip%

On this page:

add
find
find-position
nth
number

top ← prev up next →

interface snip-class-list<%> : interface?

Each eventspace has its own instance of snip-class-list<%>, obtained with (get-the-snip-class-list). New instances cannot be created directly. Each instance keeps a list of snip classes. This list is needed for loading snips from a file. See also Snip Classes.

> method (send a-snip-class-list add snipclass) → void?
> snipclass : (is-a?/c snip-class%)

Adds a snip class to the list. If a class with the same name already exists in the list, this one will not be added.

> method (send a-snip-class-list find name)
> → (or/c (is-a?/c snip-class%) #f)
> name : string?

Finds a snip class from the list with the given name, returning #f if none is found.

> method (send a-snip-class-list find-position class)
> → exact-nonnegative-integer?
> class : (is-a?/c snip-class%)

Returns an index into the list for the specified class.

> method (send a-snip-class-list nth n)
> → (or/c (is-a?/c snip-class%) #f)
> n : exact-nonnegative-integer?

Returns the nth class in the list, or #f if the list has n classes or less.

> method (send a-snip-class-list number) → exact-nonnegative-integer?

Returns the number of snip classes in the list.
top ← prev up next →