10 Preferences

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

Racket
top contents ← prev up next →

## 10 Preferences🔗ℹ

The racket/gui/base library supports a number of preferences for global configuration. The preferences are stored in the common file reported by find-system-path for 'pref-file, and preference values can be retrieved and changed through get-preference and put-preferences. Except for the except the 'GRacket:playcmd preference preference, the racket/gui/base library reads each of the preferences below once at startup.

Beware: The preferences file is read in case-insensitive mode (for historical reasons), so the symbols listed below must be surrounded with |.

The following are the preference names used by GRacket:

- 'GRacket:default-font-size preference — sets the default font size the basic style in a style list, and thus the default font size for an editor.

- 'GRacket:defaultMenuPrefix preference — sets the prefix used by default for menu item shortcuts on Unix, one of 'ctl, 'meta, or 'alt. The default is 'ctl. When this preference is set to 'meta or 'alt, underlined mnemonics (introduced by & in menu labels) are suppressed.

- 'GRacket:emacs-undo preference — a true value makes undo in editors by default preserve all editing history, including operations that are undone (as in Emacs); the set-undo-preserves-all-history in editor<%> method changes a specific editor’s configuration.

- 'GRacket:wheelStep preference — sets the default mouse-wheel step size of editor-canvas% objects.

- 'GRacket:outline-inactive-selection preference — a true value causes selections in text editors to be shown with an outline of the selected region when the editor does no have the keyboard focus.

- 'GRacket:playcmd preference — used to format a sound-playing command; see play-sound for details.

- 'GRacket:doubleClickTime preference — overrides the platform-specific default interval (in milliseconds) for double-click events.

In each of the above cases, if no preference value is found using the GRacket-prefixed name, a MrEd-prefixed name is tried for backward compatibility.

top contents ← prev up next →