3.1 Preferences

► |  | GUI: Racket Graphics Toolkit

1 | Overview
2 | Reference
3 | Configuration
4 | Dynamic Loading
| Bibliography
| Index

▼ | 3 | Configuration

3.1 | Preferences
3.2 | Font Configuration

top← prev up next →

#### 3.1`` Preferences

GRacket supports a number of preferences for global configuration. The GRacket 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. However, GRacket reads most preferences once at startup (all except the 'GRacket:playcmd preference).

The following are the (case-sensitive) 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:controlFontSize preference – sets the font size for control and menu labels (Windows, X); the font is the 'system font, which can be configured as described in Font Configuration.

- 'GRacket:defaultMenuPrefix preference – sets the prefix used by default for menu item shortcuts under X, 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:altUpSelectsMenu preference – a true value makes pressing and releasing the Alt key select the first menu in the menu bar under X.

- 'GRacket:emacsUndo preference – a true value makes undo in editors work as in Emacs (i.e., undo operations are themselves kept in the undo stack).

- 'GRacket:hiliteColor preference – a string to sets the color for highlighting text, menus, and other GUI elements under X; the preference string should contain six hexadecimal digits, two for each component of the color. For example, set 'GRacket:hiliteColor preference to "0000A0" and set 'GRacket:hiliteMenuBorder preference to #t for a Bluecurve-like look.

- 'GRacket:hiliteMenuBorder preference – a true value causes a menu selection to be highlighted with a border (in addition to a color) under X.

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

- 'GRacket:outlineInactiveSelection 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:forceFocus preference – a true value enables extra effort in GRacket to move the focus to a top-level window that is shown or raised.

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

- 'GRacket:gamma preference – sets the gamma value used in gamma-correcting PNG files.

- 'GRacket:selectionAsClipboard preference – under X, a true value causes the-clipboard to be an alias to the-x-selection-clipboard, which means that cut and paste operations use the X selection instead of the X clipboard. See also clipboard<%>.

In addition, preference names built from font face names can provide or override default entries for the font-name-directory<%>; see Font Configuration for information.

top← prev up next →