main window
TCL/TK UseCase1
Abstract : Sets up the main drawing window and menus.
Comments : Also contains the printing procedure and some
misc. procedures.
proc setup_menu {} {
menubutton .mbar.file -text File -underline 0 \
-menu .mbar.file.menu
menu .mbar.file.menu
.mbar.file.menu add command -label "New" \
-command {ask "Try again later..."}
.mbar.file.menu add command -label "Open" \
-command openfile
.mbar.file.menu add command -label "Close" \
-command {ask "Try again later..."}
.mbar.file.menu add separator
.mbar.file.menu add command -label "Save" \
-command {ask "Try again later..."}
.mbar.file.menu add command -label "Save As" \
-command {ask "Try again later..."}
.mbar.file.menu add separator
.mbar.file.menu add command -label "Gen-CD" \
-command {ask "Try again later..."}
.mbar.file.menu add command -label "Print" \
-command {ask "Try again later..."}
.mbar.file.menu add separator
.mbar.file.menu add command -label "Quit" -command exit
pack .mbar.file -side left
}
proc setup_mainwin {} {
frame .mbar -relief raised -bd 2
canvas .area -background gray
wm title . "Our Funky CD Drawing Program"
#wm minsize . 0 0
wm maxsize . 9999 9999
pack .mbar -side top -fill x
pack .area -fill both -expand true
setup_menu
}