-
Notifications
You must be signed in to change notification settings - Fork 1
/
schemep3-panel-playback-control.scm
64 lines (58 loc) · 2.19 KB
/
schemep3-panel-playback-control.scm
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#lang scheme/gui
(provide playback-control-panel%)
;;; plt modules
;;; local modules
(require "schemep3-playback.scm")
; (define cooler-button%
; (class canvas%
; (init-field bitmap)
; (init-field (mask #f))
; (super-new
; (style '(transparent border))
; (min-width (+ 4 (send bitmap get-width)))
; (min-height (+ 4 (send bitmap get-height)))
; (stretchable-width #f)
; (stretchable-height #f)
; (paint-callback
; (lambda (button dc)
; (send dc draw-bitmap bitmap 1 1 'solid (send the-color-database find-color "black") mask)
; )))))
(define _bitmap-button-label #t)
(define playback-control-panel%
(class horizontal-panel%
(super-new
(alignment '(right top))
(stretchable-height #f))
(for ((button-label
(if _bitmap-button-label
(list
(make-object bitmap% "etc/stop.png")
(make-object bitmap% "etc/pause.png")
(make-object bitmap% "etc/play.png")
(make-object bitmap% "etc/next.png"))
(list "Stop" "Pause" "Play" "Next")))
(button-function
(list stop toggle-pause play
next)))
(new button%
(label button-label)
(parent this)
(callback
(lambda (b e)
(button-function)))))))
; (new cooler-button%
; (parent this)
; (bitmap (make-object bitmap% "etc/stop.png" 'png))
; (mask (make-object bitmap% "etc/stop.png" 'png/mask)))
; (new cooler-button%
; (parent this)
; (bitmap (make-object bitmap% "etc/pause.png"))
; (mask (make-object bitmap% "etc/pause.png" 'png/mask)))
; (new cooler-button%
; (parent this)
; (bitmap (make-object bitmap% "etc/play.png"))
; (mask (make-object bitmap% "etc/play.png" 'png/mask)))
; (new cooler-button%
; (parent this)
; (bitmap (make-object bitmap% "etc/next.png"))
; (mask (make-object bitmap% "etc/next.png" 'png/mask)))