racket/collects/slideshow/private/utils.rkt
Matthew Flatt 454f4c3f0e slideshow: add `interactive'
The `interactive' pict constructor is a hook for interactive GUI
elements on a slide. The callback associated with an `interactive'
pict gets a `frame%' instance for a frame that floats over the pict.
2013-03-07 21:46:48 -07:00

27 lines
501 B
Racket

(module utils racket/base
(require mred
mzlib/class)
(provide define-accessor
define/provide-struct)
(define-syntax define-accessor
(syntax-rules ()
[(_ margin get-margin)
(define-syntax margin
(syntax-id-rules ()
[(margin arg) ((get-margin) arg...)]
[margin (get-margin)]))]))
(define-syntax define/provide-struct
(syntax-rules ()
[(_ id flds flags ...)
(begin
(define-struct id flds flags ...)
(provide (struct-out id)))])))