added buttons (not finished)

This commit is contained in:
frese 2003-04-15 16:08:17 +00:00
parent a1d73f0902
commit b8ebf8b909
1 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,5 @@
(define-options-spec titlebar-options-spec
(buttons symbol-list '(kill)) ; iconize, maximize, roll
(buttons symbol-list '(kill)) ; kill, iconize, maximize
(normal-colors colors '("#aaaaaa" "#eeeeee" "#777777" "black"))
(active-colors colors '("#9999aa" "#eeeeff" "#777788" "black"))
(focused-colors colors '("#666699" "#aaaacc" "#333366" "#eeeeee"))
@ -26,9 +26,21 @@
options-def))
(gc (create-gc dpy window '()))
(tb (make-titlebar in-channel dpy window "test" 'normal))
;; buttons... icon-window...
(button-channel out-channel)
(button-size 13) ;; TODO has to be calculated from window-height
(buttons (map (lambda (id i)
(create-button dpy window colormap
(make-rectangle
(+ 2 (* i (+ 2 button-size)))
2 button-size button-size)
button-channel id
;; TODO: border-style -> colors
`((content . ,id))))
(get-option-value options 'buttons)
(iota (length (get-option-value options 'buttons)))))
;; icon-window...
)
(mdisplay "creating titlebar " window "\n")
(for-each map-button buttons)
(spawn*
(list 'titlebar window)
(lambda (release)