► |  | Unstable

1 | Guidelines for developing unstable libraries
2 | Bytes
3 | Classes and Objects
4 | Contracts
5 | Definitions
6 | Dictionaries
7 | Directories
8 | Exceptions
9 | Filesystem
10 | Functions
11 | Lists
12 | Net
13 | Path
14 | PLane T Packages
15 | Ports
16 | Pretty-Printing
17 | Regular Expressions
18 | Requiring Modules
19 | Sandboxed Evaluation
20 | Scribble Documentation
21 | Sets
22 | S-Expression Diff
23 | Source Locations
24 | Strings
25 | Structs
26 | Syntax
27 | Planet Package Macros
28 | Text Representations
29 | Multiple Values
30 | XML and CSS
31 | Polymorphic Contracts
32 | Finding Mutated Variables
33 | Find
34 | Interface-Oriented Programming for Classes
35 | Sequences
36 | Hash Tables
37 | Match
38 | Generics
39 | Mark Parameters
40 | Debugging
41 | Contracts for macro subexpressions
42 | Contracts for struct type properties
43 | GUI libraries

▼ | 43 | GUI libraries

43.1 | Dr Racket Language Levels
43.2 | Notify-boxes
43.3 | Preferences
43.4 | Slideshow Presentations
43.5 | GUI Widgets

► | 43.5 | GUI Widgets

43.5.1 | Locked Text Fields
43.5.2 | Union GUIs

On this page:

43.5.1`` Locked Text Fields
locked-text-field-mixin
set-value
locked-text-field%
locked-combo-field%
43.5.2`` Union GUIs
union-container-mixin
choose
union-pane%
union-panel%

Version: 5.0.2
top ← prev up next →

#### 43.5`` GUI Widgets

Carl Eastlund <cce@racket-lang.org>

( require unstable/gui/window )

This library is unstable; compatibility will not be maintained. See Unstable for more information.

##### 43.5.1`` Locked Text Fields

These classes and mixins provide text and combo field controls that cannot be directly edited by the user, but may be updated by other controls.

locked-text-field-mixin : ( class? . -> . class? )

argument extends/implements: | text-field%

This mixin updates text field classes to prevent user edits, but allow programmatic update of the text value. It also sets the undo history length to a default of 0, as user undo commands are disabled and the history takes up space.

> ( new locked-text-field-mixin [[undo-history undo-history]])
> → ( is-a?/c locked-text-field-mixin )
> undo-history : exact-nonnegative-integer? = 0

> The mixin adds the undo-history initialization argument to control the length of the undo history. It defaults to 0 to save space, but may be set higher.

> The mixin inherits all the initialization arguments of its parent class; it does not override any of them.

> ( send a-locked-text-field set-value str) → void?
> str : string?

> Overrides set-value in text-field%.
> Unlocks the text field’s nested editor, calls the parent class’s set-value, and then re-locks the editor.

locked-text-field% : class?
superclass: text-field%

Equal to ( locked-text-field-mixin text-field% ).

locked-combo-field% : class?
superclass: combo-field%

Equal to ( locked-text-field-mixin combo-field% ).

##### 43.5.2`` Union GUIs

union-container-mixin : ( class? . -> . class? )

argument extends/implements: | area-container<%>

This mixin modifies a container class to display only one of its child areas at a time, but to leave room to switch to any of them.

> ( send an-union-container choose child) → void?
> child : ( is-a?/c subwindow<%> )

> This method changes which of the container’s children is displayed. The chosen child is shown and the previous choice is hidden.

union-pane% : class?
superclass: pane%

Equal to ( union-container-mixin pane% ).

union-panel% : class?
superclass: panel%

Equal to ( union-container-mixin panel% ).

top ← prev up next →