-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschemep3-mixins-gui.scm
More file actions
32 lines (24 loc) · 912 Bytes
/
schemep3-mixins-gui.scm
File metadata and controls
32 lines (24 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#lang scheme/gui
(provide checkable-panel-mixin)
(provide stored-value-mixin)
(require framework)
(require "schemep3-main-menu.scm")
(define (checkable-panel-mixin % menu-string)
(class % (super-new)
(let ([view-item (make-main-menu-checkable-item
menu-string
(lambda (checked?)
(if checked?
(send (send this get-parent) add-child this)
(send (send this get-parent) delete-child this)))
#t)])
(main-menu:add main-menu:group:view view-item))))
(define (stored-value-mixin %)
(class %
(init-field settor-gettor)
(super-new)
(send this set-value (settor-gettor))
(preferences:add-on-close-dialog-callback
(lambda ()
(settor-gettor (send this get-value))
(void)))))