(load "deltabutton")
(: grabs (list (button any with-alt)
	       (button 1 (together with-alt
				   with-control))))
(: opening '(progn))
(: closing '(progn))
(de describe-window ()
    (list
     (window-make () () () () ())
     (window-make () () () () (plug-make (label-make window-icon-name)))))

(de describe-screen ()
    (with (opening '(bell) fsm root-fsm)
	  (window-make () () () () ())))
(: fsm
   (fsm-make
    (state-make
     (on (buttonpress 1 with-alt)
	 (if (deltabutton)
	     (move-window)
	   (lower-window)))
     (on (buttonpress 2 with-alt)
	 (iconify-window))
     (on (buttonpress 3 with-alt)
	 (if (deltabutton)
	     (move-window)
	   (raise-window)))
     (on (buttonpress 1 (together with-control
				  with-alt))
	 (resize-window)))))

(: root-fsm
   (fsm-make
    (state-make
     (on (buttonrelease 1 with-alt)
	 (end)))))

