provides a mechanism for applying ordinary Scheme primitives to
behaviors. If any of the vals are behaviors, returns a
behavior whose current value is always equal to (proc(value-nowarg)...). In FrTime, many Racket primitives are
implicitly lifted.
The following forms allow importation of lifted procedures that aren’t
included in the basic FrTime language.
The constructor arguments
are the same as in check-box%, except that label,
enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the check box’s state to that of the event value.
The constructor arguments
are the same as in check-box%, except that label,
enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the slider’s state to that of the event value.
The
constructor arguments are the same as in check-box%, except
that label, enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the text field’s state to that of the event
value.
The
constructor arguments are the same as in check-box%, except
that label, enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the text field’s state to that of the event
value.
The
constructor arguments are the same as in check-box%, except
that label, enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the text field’s state to that of the event
value.
The
constructor arguments are the same as in check-box%, except
that label, enabled, stretchable-width, and
stretchable-height may be time-varying. Also, any occurrence
on value-set sets the text field’s state to that of the event
value.
returns a value that always reflects
the current set of selected elements in the list box.
5Graphical Demo Programs
TODO: document the animation library itself!
To run the following animation/GUI demos, simply set the language
level to FrTime, open the corresponding file, and Execute. See the
demo source code for more information.
"orbit-mouse.rkt" : A collection of balls that move in circles
around the mouse pointer.
"piston.rkt" : Simulation of a piston/cylinder.
"rotation.rkt" : Balls moving in circles.
"delay-mouse.rkt" : A trail of balls following the mouse.
"ball-on-string.rkt" : A ball chasing the mouse.
"pong.rkt" : A simple pong/air-hockey game. The left paddle moves with
numeric keypad; the right paddle moves with the mouse. The ’r’ key
resets the score.
"pizza.rkt" : A simple "pizza ordering" user interface based on an HtDP
exercise.
"calculator.rkt" : A simple calculator interface, also based on an HtDP
exercise except that the result updates continuously as the arguments
and operator change.
The next three animation examples are courtesy of Robb Cutler:
"analog-clock.rkt" : An animated real-time clock. A slider adjusts the
radius of the face. Click and drag to move the face around.
"growing-points.rkt" : A field of points that grow as the mouse
approaches.
"needles.rkt" : A field of needles that point at the mouse.