#!/usr/local/bin/wish ###################################################################### # showcse # Chris Alfeld - calfeld@math.utah.edu # 06/26/98 # # This is a quick tk script to display a charmaker export. It is mostly # intended as an example. # # It takes one paramter, the name of a charmaker export (.cse) file. ###################################################################### if {[llength $argv] == 0} { puts stderr "Syntax: showcse " exit 1 } canvas .c -width 800 -height 1035 -scrollregion {0 0 800 1035} -confine true \ -bg white -xscrollcommand ".x set" -yscrollcommand ".y set" scrollbar .y -orient vertical -command ".c yview" scrollbar .x -orient horizontal -command ".c xview" pack .y -side right -fill y pack .x -side bottom -fill x pack .c -fill both if {[catch "open [lindex $argv 0] r" fp]} { puts stderr "ERROR: $fp" exit 1 } while {[gets $fp line] >= 0} { eval .c create $line } close $fp