19 Syntax Browser

▼ |  | Mr Lib: Extra GUI Libraries

1 | Aligned Pasteboard
2 | Arrow Toggle Snip
3 | Bitmap Label
4 | Cache-image Snip
5 | Close Icon
6 | Expandable Snip
7 | GIF and Animated GIF Writing
8 | Graphs
9 | Hierarchical List Control
10 | Include Bitmap
11 | Interactive Value Port
12 | Name Message
13 | Path Dialog
14 | Plot
15 | Switchable Button
16 | Image Core
17 | Matrix Snip
18 | Snip Canvases
19 | Syntax Browser
20 | Te X Table
21 | Terminal Window
22 | White on Black Panel Predicate
23 | Acknowledgments
| Index

On this page:

render-syntax/ snip
render-syntax/ window
snip-class
render-syntax-focused-syntax-color-style-name
render-syntax-subtitle-color-style-name

top contents ← prev up next →

## 19 Syntax Browser🔗ℹ

(require mrlib/syntax-browser) | package: gui-lib

> > procedure
> > (render-syntax/snip |  | stx |
> > | [ | #:summary-width summary-width]) |
> → (is-a?/c snip%)
> stx : syntax?
> summary-width : (or/c #f 0 (integer-in 3 #f) +inf.0) = 32

Constructs a snip% object that displays information about stx.

The summary-width parameter controls the width (in characters) of the syntax object that is shown before the triangle is turned down. If it is #f, the value of the print-syntax-width parameter is used.

Changed in version 1.59 of package gui-lib: Added summary-width argument and changed default width to 32.

> > procedure
> > (render-syntax/window |  | stx |  |  |  |
> > | [ | #:summary-width summary-width]) |  | → |  | void?
> stx : syntax?
> summary-width : (or/c #f 0 (integer-in 3 #f) +inf.0) = 32

Uses render-syntax/snip’s result, together with a frame and editor-canvas to show stx.

Changed in version 1.59 of package gui-lib: Added summary-width argument and changed default width to 32.

> value snip-class : (is-a?/c snip-class%)

The snipclass used by the result of render-syntax/snip.

> value render-syntax-focused-syntax-color-style-name : string?

The name of the style that controls the color of the focused portion of the syntax object that’s being displayed. See also render-syntax-subtitle-color-style-name.

Defaults to a style that’s derived from the basic style with the foreground color "forestgreen".

> value render-syntax-subtitle-color-style-name : string?

Like render-syntax-focused-syntax-color-style-name but for the subheadings when the syntax browser details are shown.

Defaults to a style that’s derived from the basic style with the foreground color "navy".

top contents ← prev up next →