13 drracket:language-configuration
procedure
→ (listof (is-a?/c drracket:language:language<%>))
procedure
(drracket:language-configuration:add-language language) → void?
language : (and/c (is-a?/c drracket:language:language<%>) drracket:language:object/c)
procedure
(drracket:language-configuration:language-settings language settings) → drracket:language-configuration:language-settings? language : (or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) settings : any/c
The settings is a language-specific record that holds a value describing a parameterization of the language.
procedure
(drracket:language-configuration:language-settings-settings ls)
→ any/c ls : drracket:language-configuration:language-settings?
procedure
(drracket:language-configuration:language-dialog show-welcome? language-settings-to-show [ parent]) → (or/c false/c drracket:language-configuration:language-settings?) show-welcome? : boolean? language-settings-to-show : drracket:language-configuration:language-settings? parent : (or/c false/c (is-a?/c top-level-window<%>)) = #t
The show-welcome? argument determines if if a “Welcome to DrRacket” message and some natural language buttons are shown.
The parent argument is used as the parent to the dialog.
procedure
(drracket:language-configuration:fill-language-dialog panel button-panel language-setting [ re-center ok-handler])
→
(-> (is-a?/c drracket:language:language<%>)) (-> any/c) (-> any/c (is-a?/c mouse-event%) any) panel : (is-a?/c vertical-panel%) button-panel : (is-a?/c area-container<%>) language-setting : drracket:language-configuration:language-settings? re-center : (or/c false/c (is-a?/c top-level-window<%>)) = #f ok-handler : (-> symbol? void?) = void
The panel argument is the main panel where the language controls will be placed. The function adds buttons to the button-panel to revert a language to its default settings and to show the details of a language.
The language-setting is the default language to show in the dialog.
The re-center argument is used when the Show Details button is clicked. If that argument is a top-level-window<%>, the Show Details callback will recenter the window each time it is clicked. Otherwise, the argument is not used.
ok-handler is a function that is in charge of interfacing the OK button. It should accept a symbol message: 'enable and 'disable to toggle the button, and 'execute to run the desired operation. (The language selection dialog also uses an internal 'enable-sync message.)
The first two results of the function return a language object and a settings for that language, as chosen by the user using the dialog. The final function should be called when keystrokes are typed in the enclosing frame. It is used to implement the shortcuts that choose the two radio buttons in the language dialog.