unstable/gui/notify: added partial docs
svn: r16782 original commit: 92aa2fc780ce30c607090678d4ea1868761d82bc
This commit is contained in:
parent
00dcbfa90c
commit
730c73f8f6
|
@ -4,24 +4,18 @@
|
||||||
scheme/list
|
scheme/list
|
||||||
scheme/class
|
scheme/class
|
||||||
scheme/gui)
|
scheme/gui)
|
||||||
(provide define/listen
|
(provide field/notify
|
||||||
field/notify
|
|
||||||
notify-methods
|
notify-methods
|
||||||
connect-to-pref
|
connect-to-pref
|
||||||
connect-to-pref/readonly
|
connect-to-pref/readonly
|
||||||
override/return-false
|
|
||||||
notify-box%
|
notify-box%
|
||||||
notify-box/pref
|
notify-box/pref
|
||||||
|
notify-box/pref/readonly
|
||||||
menu-option/notify-box
|
menu-option/notify-box
|
||||||
menu-group/notify-box
|
menu-group/notify-box
|
||||||
check-box/notify-box
|
check-box/notify-box
|
||||||
choice/notify-box)
|
choice/notify-box)
|
||||||
|
|
||||||
(define-syntax override/return-false
|
|
||||||
(syntax-rules ()
|
|
||||||
[(override/return-false m ...)
|
|
||||||
(begin (define/override (m) #f) ...)]))
|
|
||||||
|
|
||||||
(define-for-syntax (mk-init name)
|
(define-for-syntax (mk-init name)
|
||||||
(format-id name "init-~a" (syntax-e name)))
|
(format-id name "init-~a" (syntax-e name)))
|
||||||
(define-for-syntax (mk-get name)
|
(define-for-syntax (mk-get name)
|
||||||
|
@ -76,6 +70,7 @@
|
||||||
(with-syntax ([init-name (mk-init #'name)])
|
(with-syntax ([init-name (mk-init #'name)])
|
||||||
#'(define/override (init-name) (notify-box/pref/readonly pref)))]))
|
#'(define/override (init-name) (notify-box/pref/readonly pref)))]))
|
||||||
|
|
||||||
|
#|
|
||||||
(define-syntax (define/listen stx)
|
(define-syntax (define/listen stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(define/listen name value)
|
[(define/listen name value)
|
||||||
|
@ -93,6 +88,7 @@
|
||||||
(for-each (lambda (listener) (listener new-value)) listeners))
|
(for-each (lambda (listener) (listener new-value)) listeners))
|
||||||
(define/public-final (listen-name listener)
|
(define/public-final (listen-name listener)
|
||||||
(set! listeners (cons listener listeners)))))]))
|
(set! listeners (cons listener listeners)))))]))
|
||||||
|
|#
|
||||||
|
|
||||||
(define notify-box%
|
(define notify-box%
|
||||||
(class object%
|
(class object%
|
||||||
|
|
Loading…
Reference in New Issue
Block a user