5 Color Prefs
| ||||||||||||
→ void? | ||||||||||||
pref-sym : symbol? | ||||||||||||
Registers a preference whose value will be updated when the user clicks on one of the color scheme default settings in the preferences dialog.
Also calls preferences:set-default and preferences:set-un/marshall with appropriate arguments to register the preference.
| ||||||||||||||||
→ void? | ||||||||||||||||
pref-name : symbol? | ||||||||||||||||
style-name : string? | ||||||||||||||||
color/sd : (or/c (is-a?/c color%) (is-a?/c style-delta%)) | ||||||||||||||||
|
This function registers a color preference and initializes the style list returned from editor:get-standard-style-list. In particular, it calls preferences:set-default and preferences:set-un/marshall to install the pref for pref-name, using color/sd as the default color. The preference is bound to a style-delta%, and initially the style-delta% changes the foreground color to color/sd, unless color/sd is a style delta already, in which case it is just used directly. Then, it calls editor:set-standard-style-list-delta passing the style-name and the current value of the preference pref-name.
Finally, it adds calls preferences:add-callback to set a callback for pref-name that updates the style list when the preference changes.
If white-on-black-color is not #f, then the color of the color/sd argument is used in combination with white-on-black-color to register this preference with color-prefs:set-default/color-scheme.
Adds a preferences panel that configures the background color for editor:basic-mixin.
| ||||||||||||||
name : string? | ||||||||||||||
func : ((is-a?/c vertical-panel%) . -> . void?) |
Calls func with the subpanel of the preferences coloring panel that corresponds to name.
| ||||||||||||||||||||||||||||
parent : (is-a?/c area-container<%>) | ||||||||||||||||||||||||||||
pref-sym : symbol? | ||||||||||||||||||||||||||||
style-name : string? | ||||||||||||||||||||||||||||
example-text : string? |
Builds a panel with a number of controls for configuring a font: the color and check boxes for bold, italic, and underline. The parent argument specifies where the panel will be placed. The pref-sym should be a preference (suitable for use with preferences:get and preferences:set). The style-name specifies the name of a style in the style list returned from editor:get-standard-style-list and example-text is shown in the panel so users can see the results of their configuration.
(color-prefs:marshall-style-delta style-delta) → printable/c |
style-delta : (is-a?/c style-delta%) |
Builds a printed representation for a style-delta.
(color-prefs:unmarshall-style-delta marshalled-style-delta) |
→ (or/c false/c (is-a?/c style-delta%)) |
marshalled-style-delta : printable/c |
Builds a style delta from its printed representation. Returns #f if the printed form cannot be parsed.
Sets the colors registered by color-prefs:register-color-preference to their white-on-black variety.
Sets the colors registered by color-prefs:register-color-preference to their black-on-white variety.