{"size": 2372, "ext": "scrbl", "max_stars_repo_path": "gui-doc/scribblings/gui/prefs.scrbl", "max_stars_repo_name": "jjsimpso/gui", "max_stars_repo_stars_event_min_datetime": "2015-03-17T22:11:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T15:09:34.000Z", "max_issues_repo_path": "gui-doc/scribblings/gui/prefs.scrbl", "max_issues_repo_name": "jjsimpso/gui", "max_issues_repo_issues_event_min_datetime": "2015-01-09T15:53:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:21:29.000Z", "max_forks_repo_path": "gui-doc/scribblings/gui/prefs.scrbl", "max_forks_repo_name": "jjsimpso/gui", "max_forks_repo_forks_event_min_datetime": "2015-01-08T13:03:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T21:49:09.000Z"}
{"max_stars_count": 65, "max_issues_count": 231, "max_forks_count": 89, "avg_line_length": 40.8965517241, "max_line_length": 106, "alphanum_fraction": 0.7643338954}
#lang scribble/doc
@(require "common.rkt" (for-label scheme/file))

@title[#:tag "mredprefs"]{Preferences}

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

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

The following are the preference names used by GRacket:

@itemize[

 @item{@ResourceFirst{default-font-size} --- sets the default font size
 the basic style in a style list, and thus the default font size for
 an editor.}

 @item{@ResourceFirst{defaultMenuPrefix} --- sets the prefix used by
 default for menu item shortcuts on Unix, one of @racket['ctl],
 @racket['meta], or @racket['alt]. The default is
 @racket['ctl]. When this preference is set to @racket['meta] or
 @racket['alt], underlined mnemonics (introduced by @litchar{&} in menu
 labels) are suppressed.}

 @item{@ResourceFirst{emacs-undo} --- a true value makes undo in
 editors by default preserve all editing history, including operations
 that are undone (as in Emacs); the @xmethod[editor<%>
 set-undo-preserves-all-history] method changes a specific editor's
 configuration.}

 @item{@ResourceFirst{wheelStep} --- sets the default mouse-wheel step
 size of @racket[editor-canvas%] objects.}

 @item{@ResourceFirst{outline-inactive-selection} --- 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.}

 @item{@ResourceFirst{playcmd} --- used to format a sound-playing
 command; see @racket[play-sound] for details.}

 @item{@ResourceFirst{doubleClickTime} --- 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
@racketidfont{GRacket}-prefixed name, a @racketidfont{MrEd}-prefixed
name is tried for backward compatibility.
