1 Overview
Windowing
Drawing
Editor
2 Reference
Windowing Classes
Windowing Functions
Drawing Classes
Drawing Functions
Editor Classes
Editor Functions
WXME Decoding
3 Configuration
4 Dynamic Loading
Index
On this page:
find-or-create-brush
Version: 4.0.2

 

brush-list% : class?

  superclass: object%

A brush-list% object maintains a list of brush% objects to avoid creating brushes repeatedly. A brush% object in a brush list cannot be mutated.

A global brush list, the-brush-list, is created automatically.

(make-object brush-list%)  (is-a?/c brush-list%)

Creates an empty brush list.

(send a-brush-list find-or-create-brush

 

color

 

 

 

style)

 

  (is-a?/c brush%)

  color : (is-a?/c color%)

  

style

 

:

 

(one-of/c 'transparent 'solid 'opaque

          'xor 'hilite 'panel

          'bdiagonal-hatch 'crossdiag-hatch

          'fdiagonal-hatch 'cross-hatch

          'horizontal-hatch 'vertical-hatch)

(send a-brush-list find-or-create-brush

 

color-name

 

 

 

style)

 

  (or/c (is-a?/c brush%) false/c)

  color-name : string?

  

style

 

:

 

(one-of/c 'transparent 'solid 'opaque

          'xor 'hilite 'panel

          'bdiagonal-hatch 'crossdiag-hatch

          'fdiagonal-hatch 'cross-hatch

          'horizontal-hatch 'vertical-hatch)

Finds a brush of the given specification, or creates one and adds it to the list. See brush% for a further explanation of the arguments, which are the same as brush%’s initialization arguments.