add drracket module
parent
73341bb5a2
commit
ed4d054f3d
@ -0,0 +1,11 @@
|
||||
#lang racket/base
|
||||
(require racket/class
|
||||
racket/draw)
|
||||
|
||||
(provide (all-defined-out))
|
||||
(define (make-drracket-button . args)
|
||||
(define label (or (findf string? args) "untitled"))
|
||||
(define bitmap (or (findf (λ(arg) (is-a? arg bitmap%)) args) (make-object bitmap% 16 16)))
|
||||
(define callback (or (findf procedure? args) (λ(drr-frame) (void))))
|
||||
(define number (or (findf (λ(arg) (or (real? arg) (equal? #f arg))) args) #f))
|
||||
(list label bitmap callback number))
|
Loading…
Reference in New Issue