DELETED cells.scm Index: cells.scm ================================================================== --- cells.scm +++ /dev/null @@ -1,38 +0,0 @@ -(require-library iup canvas-draw canvas-draw-iup) - -(module cells-test - (cells-dialog) - (import - scheme chicken extras - iup canvas-draw canvas-draw-iup - (only canvas-draw-base pointer->canvas)) - -(define ncols 8) -(define nlins 8) -(define width 32) -(define height 32) - -(define (render-cell handle i j x-min x-max y-min y-max canvas) - (set! (canvas-foreground canvas) - (if (or (and (odd? i) (odd? j)) (and (even? i) (even? j))) - #xffffff - #x000000)) - (canvas-box! canvas x-min x-max y-min y-max)) - -(define cells-dialog - (dialog - #:title "Cells Test" - (cells - #:rastersize (format "~sx~s" (* ncols width) (* nlins height)) - #:ncols-cb (lambda _ ncols) #:width-cb (lambda _ width) - #:nlines-cb (lambda _ nlins) #:height-cb (lambda _ height) - #:draw-cb - (make-cells-draw-cb render-cell)))) -) - -(import - (only iup show main-loop) - cells-test) - -(show cells-dialog) -(main-loop) DELETED matrix.scm Index: matrix.scm ================================================================== --- matrix.scm +++ /dev/null @@ -1,44 +0,0 @@ -(require-library iup canvas-draw canvas-draw-iup) - -(module matrix-test - (matrix-dialog) - (import - scheme chicken extras - iup canvas-draw canvas-draw-iup - (only canvas-draw-base pointer->canvas)) - -(define ncols 8) -(define nlins 8) -(define width 32) -(define height 32) - -;; (define (render-cell handle i j x-min x-max y-min y-max canvas) -;; (set! (canvas-foreground canvas) -;; (if (or (and (odd? i) (odd? j)) (and (even? i) (even? j))) -;; #xffffff -;; #x000000)) -;; (canvas-box! canvas x-min x-max y-min y-max)) - -(define matrix-dialog - (dialog - #:title "Matrix Test" - (let ((mat (matrix - ; #:expand "YES" - ; #:scrollbar "YES" - #:numcol ncols - #:numlin nlins - #:numcol-visible ncols - #:numlin-visible nlins - #:click-cb (lambda (obj lin col status) - (print "obj: " obj " lin: " lin " col: " col " status: " status))))) - (attribute-set! mat "0:0" "Testing") - mat))) - -) ;; end module - -(import - (only iup show main-loop) - matrix-test) - -(show matrix-dialog) -(main-loop) DELETED tree.scm Index: tree.scm ================================================================== --- tree.scm +++ /dev/null @@ -1,28 +0,0 @@ - -(use iup canvas-draw canvas-draw-iup) - -(define t #f) - -(define tree-dialog - (dialog - #:title "Tree Test" - (let ((t1 (treebox - #:selection_cb (lambda (obj id state) - (print "selection_db with id=" id " state=" state) - (print "SPECIALDATA: " (attribute obj "SPECIALDATA")) - )))) - (set! t t1) - t1))) - -(show tree-dialog) -(map (lambda (elname el) - (print "Adding " elname " with value " el) - (attribute-set! t elname el) - (attribute-set! t "SPECIALDATA" el)) - '("VALUE" "NAME" "ADDLEAF" "ADDBRANCH1" "ADDLEAF2" "VALUE") - '("0" "Figures" "Other" "triangle" "equilateral" "4") - ) -(map (lambda (attr) - (print attr " is " (attribute t attr))) - '("KIND1" "PARENT2" "STATE1")) -(main-loop)