#!/usr/bin/wish -f
#
#       tincasʲ̾ : A Tiny Canvas invoked by MaTX
#
#	Masato ISHIKAWA, Tokyo Institute of Technology
#
#       $Log: tincas,v $
#       Revision 1.2  1999/04/07 05:35:21  ishikawa
#       The simplest one
#
#       Revision 1.1  1999/04/07 05:06:49  ishikawa
#       Initial revision


#       Version 2.0   2001/01/07  t-kita@eecs.kumamoto-u.ac.jp
#
#	˰ 2000/12/18 t-kita@eecs.kumamoto-u.ac.jp


gets stdin xsize
gets stdin ysize
gets stdin BG
#
# ӥȥȥС
#
regexp {([0-9]+\.[0-9]+)} {$Revision: 2.0 $} rev
wm title . "tincas ver. $rev"
wm iconname . "tincas"

# ====================================================
# canvas åȤϿȥ쥤 
# ====================================================
canvas .viewer -relief ridge -width [expr $xsize + 1]  -height [expr $ysize + 1] -bg $BG
pack .viewer  -fill both -expand 1 -padx 5 -pady 5

update
set count 0
set update_interval 1

#
# Х
#
while {1} {
    gets stdin cmd
    if {$cmd=="."} break
    eval $cmd

    incr count	
    if {$count >= $update_interval} {
	update
	set count 0
    }
}
destroy .
