1 Application
2 Autosave
3 Canvas
4 Color Model
5 Color Prefs
6 Color
7 Comment Box
8 Editor Snip
9 Editor
10 Exit
11 Finder
12 Frame
13 Group
14 GUI Utilities
15 Handler
16 Icon
17 Keymap
18 Menu
19 Mode
20 Number Snip
21 Panel
22 Pasteboard
23 Path Utils
24 Preferences
25 Preferences, Textual
26 Scheme
27 Text
28 Test
29 Version
Index
On this page:
preferences: put-preferences/ gui
preferences: add-panel
preferences: add-editor-checkbox-panel
preferences: add-warnings-checkbox-panel
preferences: add-scheme-checkbox-panel
preferences: add-to-warnings-checkbox-panel
preferences: add-to-scheme-checkbox-panel
preferences: add-to-editor-checkbox-panel
preferences: add-font-panel
preferences: show-dialog
preferences: hide-dialog
preferences: add-on-close-dialog-callback
preferences: add-can-close-dialog-callback
Version: 4.0.2

 

24 Preferences

(preferences:put-preferences/gui

 

name-list

 

 

 

 

 

 

val-list)

 

 

any

  name-list : (listof symbol?)

  val-list : (listof any/c)

Like put-preferences, but has more sophisticated error handling. In particular, it

(preferences:add-panel labels f)  void?

  labels : (or/c string? (cons/c string? (listof string?)))

  

f

 

:

 

(->d ((parent (is-a?/c area-container-window<%>)))

     ()

     (_

      (let ((old-children (send parent get-children)))

        (and/c (is-a?/c area-container-window<%>)

               (λ (child)

                 (andmap eq?

                         (append old-children (list child))

                         (send parent get-children)))))))

preferences:add-preference-panel adds the result of f with name labels to the preferences dialog box.

The labels determine where this preference panel is placed in the dialog. If the list is just one string, the preferences panel is placed at the top level of the dialog. If there are more strings, a hierarchy of nested panels is created and the new panel is added at the end. If multiple calls to preferences:add-preference-panel pass the same prefix of strings, those panels are placed in the same children.

When the preference dialog is opened for the first time, the function f is called with a panel, and f is expected to add a new child panel to it and add whatever preferences configuration controls it wants to that panel. Then, f’s should return the panel it added.

(preferences:add-editor-checkbox-panel)  void?

Adds a preferences panel for configuring options related to editing.

(preferences:add-warnings-checkbox-panel)  void?

Adds a preferences panel for configuring options relating to warnings.

(preferences:add-scheme-checkbox-panel)  void?

Adds a preferences panel for configuring options related to Scheme.

(preferences:add-to-warnings-checkbox-panel proc)  void?

  proc : ((is-a?/c vertical-panel%) . -> . void?)

Saves proc until the preferences panel is created, when it is called with the Misc. panel to add new children to the panel.

(preferences:add-to-scheme-checkbox-panel proc)  void?

  proc : ((is-a?/c vertical-panel%) . -> . void?)

Saves proc until the preferences panel is created, when it is called with the Scheme preferences panel to add new children to the panel.

(preferences:add-to-editor-checkbox-panel proc)  void?

  proc : ((is-a?/c vertical-panel%) . -> . void?)

Saves proc until the preferences panel is created, when it is called with the Echeme preferences panel to add new children to the panel.

(preferences:add-font-panel)  void?

Adds a font selection preferences panel to the preferences dialog.

(preferences:show-dialog)  void?

Shows the preferences dialog.

(preferences:hide-dialog)  void?

Hides the preferences dialog.

(preferences:add-on-close-dialog-callback cb)  void?

  cb : (-> void?)

Registers cb. Next time the user clicks the OK button the preferences dialog, all of the cb functions are called, assuming that each of the callbacks passed to preferences:add-can-close-dialog-callback succeed.

(preferences:add-can-close-dialog-callback cb)  void?

  cb : (-> boolean?)

Registers cb. Next time the user clicks the OK button the preferences dialog, all of the cb functions are called. If any of them return #f, the dialog is not closed.

See also preferences:add-on-close-dialog-callback.