► |  | GUI: Racket 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:

get-alignment
get-background
get-base-style
get-delta
get-face
get-family
get-font
get-foreground
get-name
get-shift-style
get-size
get-size-in-pixels
get-smoothing
get-style
get-text-descent
get-text-height
get-text-space
get-text-width
get-transparent-text-backing
get-underlined
get-weight
is-join?
set-base-style
set-delta
set-shift-style
switch-to

top ← prev up next →

style<%> : interface?

A style<%> object encapsulates drawing information (font, color, alignment, etc.) in a hierarchical manner. A style<%> object always exists within the context of a style-list% object and is never created except by a style-list% object.

See also Styles.

( send a-style get-alignment ) → ( one-of/c 'top 'center 'bottom)

Returns the style’s alignment: 'top, 'center, or 'bottom.

( send a-style get-background ) → ( is-a?/c color% )

Returns the style’s background color.

( send a-style get-base-style )
→ ( or/c ( is-a?/c style<%> ) false/c )

Returns the style’s base style. See Styles for more information. The return value is #f only for the basic style in the list.

( send a-style get-delta delta) → void?
delta : ( is-a?/c style-delta% )

Returns the style’s delta information if the style is not a join style. See Styles for more information.

( send a-style get-face ) → ( or/c string? false/c )

Returns the style’s face name. See font%.

( send a-style get-family )

→

( one-of/c 'default 'decorative 'roman 'script
'swiss 'modern 'symbol 'system)

Returns the style’s font family. See font%.

( send a-style get-font ) → ( is-a?/c font% )

Returns the style’s font information.

( send a-style get-foreground ) → ( is-a?/c color% )

Returns the style’s foreground color.

( send a-style get-name ) → ( or/c string? false/c )

Returns the style’s name, or #f if it is unnamed. Style names are only set through the style’s style-list% object.

( send a-style get-shift-style ) → ( is-a?/c style<%> )

Returns the style’s shift style if it is a join style. Otherwise, the root style is returned. See Styles for more information.

( send a-style get-size ) → ( integer-in 0 255)

Returns the style’s font size.

( send a-style get-size-in-pixels ) → boolean?

Returns #t if the style size is in pixels, instead of points, or #f otherwise.

( send a-style get-smoothing )
→ ( one-of/c 'default 'partly-smoothed 'smoothed 'unsmoothed)

Returns the style’s font smoothing. See font%.

( send a-style get-style ) → ( one-of/c 'normal 'italic 'slant)

Returns the style’s font style. See font%.

( send a-style get-text-descent dc)
→ ( and/c real? ( not/c negative? ))
dc : ( is-a?/c dc<%> )

Returns the descent of text using this style in a given DC.

( send a-style get-text-height dc)
→ ( and/c real? ( not/c negative? ))
dc : ( is-a?/c dc<%> )

Returns the height of text using this style in a given DC.

( send a-style get-text-space dc)
→ ( and/c real? ( not/c negative? ))
dc : ( is-a?/c dc<%> )

Returns the vertical spacing for text using this style in a given DC.

( send a-style get-text-width dc)
→ ( and/c real? ( not/c negative? ))
dc : ( is-a?/c dc<%> )

Returns the width of a space character using this style in a given DC.

( send a-style get-transparent-text-backing ) → boolean?

Returns #t if text is drawn without erasing the text background or #f otherwise.

( send a-style get-underlined ) → boolean?

Returns #t if the style is underlined or #f otherwise.

( send a-style get-weight ) → ( one-of/c 'normal 'bold 'light)

Returns the style’s font weight. See font%.

( send a-style is-join? ) → boolean?

Returns #t if the style is a join style or #f otherwise. See Styles for more information.

( send a-style set-base-style base-style) → void?
base-style : ( is-a?/c style<%> )

Sets the style’s base style and recomputes the style’s font, etc. See Styles for more information.

( send a-style set-delta delta) → void?
delta : ( is-a?/c style-delta% )

Sets the style’s delta (if it is not a join style) and recomputes the style’s font, etc. See Styles for more information.

( send a-style set-shift-style style) → void?
style : ( is-a?/c style<%> )

Sets the style’s shift style (if it is a join style) and recomputes the style’s font, etc. See Styles for more information.

( send a-style switch-to dc old-style) → void?
dc : ( is-a?/c dc<%> )
old-style : ( or/c ( is-a?/c style<%> ) false/c )

Sets the font, pen color, etc. of the given drawing context. If oldstyle is not #f, only differences between the given style and this one are applied to the drawing context.
top ← prev up next →