(require "Canvas")
(define c (make <canvas>))
(pack c)

(define o1 (make <oval> :parent c :coords '(10 10 20 20) :fill "blue"))
(define o2 (make <oval> :parent c :coords '(30 30 40 40) :fill "red"))

(define (m2 w x y) (display w)(display "m2\n"))

(define grp (make <canvas-group> :parent c))
(add-to-group grp o1 o2)

(bind-for-dragging c :tag (cid grp) :only-current #t :motion m2)

(bind-for-dragging c :tag (cid grp) :only-current #f :motion m2)
