Megatest

buttontest.scm at [0fb9975701]
Login

File matt/buttontest.scm artifact 4c1acbf3a4 part of check-in 0fb9975701


(use iup srfi-4)

(module buttontest
	*

(import iup)

(import scheme
	srfi-4
	(prefix iup iup:))

(define (make-image name tcolor bgcolor)
  (let* ((img-bits1 (u8vector->blob (u8vector
				     1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
				     1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
				     1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
				     1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
				     )))
	 ;;                        w  h
	 (img1 (iup:image/palette 22 24 img-bits1)))
    (iup:handle-name-set! img1 name)
    (iup:attribute-set! img1 "1" "10 10 10")
    (iup:attribute-set! img1 "2" bgcolor) ;; "BGCOLOR")
    (iup:attribute-set! img1 "3" tcolor)
    name))

(iup:show
 (iup:dialog
  (iup:vbox
   (iup:button " " image: (make-image "GreenBlack" "0 255 0" "0 0 0")))))

(iup:main-loop)
)