#!/bin/sh # the next line restarts using wish\ exec wish "$0" "$@" if {![info exists vTcl(sourcing)]} { switch $tcl_platform(platform) { windows { } default { option add *Scrollbar.width 10 } } } ############################################################################# # Visual Tcl v1.51 Project # ################################# # VTCL LIBRARY PROCEDURES # if {![info exists vTcl(sourcing)]} { proc Window {args} { global vTcl set cmd [lindex $args 0] set name [lindex $args 1] set newname [lindex $args 2] set rest [lrange $args 3 end] if {$name == "" || $cmd == ""} { return } if {$newname == ""} { set newname $name } if {$name == "."} { wm withdraw $name; return } set exists [winfo exists $newname] switch $cmd { show { if {$exists} { wm deiconify $newname; return } if {[info procs vTclWindow(pre)$name] != ""} { eval "vTclWindow(pre)$name $newname $rest" } if {[info procs vTclWindow$name] != ""} { eval "vTclWindow$name $newname $rest" } if {[info procs vTclWindow(post)$name] != ""} { eval "vTclWindow(post)$name $newname $rest" } } hide { if $exists {wm withdraw $newname; return} } iconify { if $exists {wm iconify $newname; return} } destroy { if $exists {destroy $newname; return} } } } } if {![info exists vTcl(sourcing)]} { proc {vTcl:DefineAlias} {target alias widgetProc top_or_alias cmdalias} { global widget set widget($alias) $target set widget(rev,$target) $alias if {$cmdalias} { interp alias {} $alias {} $widgetProc $target } if {$top_or_alias != ""} { set widget($top_or_alias,$alias) $target if {$cmdalias} { interp alias {} $top_or_alias.$alias {} $widgetProc $target } } } proc {vTcl:Toplevel:WidgetProc} {w args} { if {[llength $args] == 0} { return -code error "wrong # args: should be \"$w option ?arg arg ...?\"" } ## The first argument is a switch, they must be doing a configure. if {[string index $args 0] == "-"} { set command configure ## There's only one argument, must be a cget. if {[llength $args] == 1} { set command cget } } else { set command [lindex $args 0] set args [lrange $args 1 end] } switch -- $command { "hide" - "Hide" { Window hide $w } "show" - "Show" { Window show $w } "ShowModal" { Window show $w raise $w grab $w tkwait window $w grab release $w } default { eval $w $command $args } } } proc {vTcl:WidgetProc} {w args} { if {[llength $args] == 0} { return -code error "wrong # args: should be \"$w option ?arg arg ...?\"" } ## The first argument is a switch, they must be doing a configure. if {[string index $args 0] == "-"} { set command configure ## There's only one argument, must be a cget. if {[llength $args] == 1} { set command cget } } else { set command [lindex $args 0] set args [lrange $args 1 end] } eval $w $command $args } } if {[info exists vTcl(sourcing)]} { proc vTcl:project:info {} { namespace eval ::widgets::.top32 { array set save {-background 1 -menu 1} } namespace eval ::widgets::.top32.but33 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but34 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but35 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but36 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but37 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but38 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but39 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but40 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but41 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but42 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but43 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but44 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but45 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but46 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but47 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but48 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but49 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but50 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but51 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but52 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but53 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but54 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but55 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but56 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but57 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but58 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but59 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but60 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but61 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but62 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but63 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.but64 { array set save {-command 1 -height 1 -text 1 -width 1} } namespace eval ::widgets::.top32.m67 { array set save {-tearoff 1} } namespace eval ::widgets_bindings { set tagslist {} } } } ################################# # USER DEFINED PROCEDURES # proc {main} {argc argv} { wm protocol .top32 WM_DELETE_WINDOW {exit} } proc init {argc argv} { } init $argc $argv ################################# # VTCL GENERATED GUI PROCEDURES # proc vTclWindow. {base {container 0}} { if {$base == ""} { set base . } ################### # CREATING WIDGETS ################### if {!$container} { wm focusmodel $base passive wm geometry $base 1x1+0+0; update wm maxsize $base 1009 738 wm minsize $base 1 1 wm overrideredirect $base 0 wm resizable $base 1 1 wm withdraw $base wm title $base "vtcl.tcl" bindtags $base "$base Vtcl.tcl all" } ################### # SETTING GEOMETRY ################### } proc vTclWindow.top32 {base {container 0}} { if {$base == ""} { set base .top32 } if {[winfo exists $base] && (!$container)} { wm deiconify $base; return } global widget vTcl:DefineAlias "$base" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1 vTcl:DefineAlias "$base.but33" "Button1" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but34" "Button2" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but35" "Button3" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but36" "Button4" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but37" "Button5" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but38" "Button6" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but39" "Button7" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but40" "Button8" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but41" "Button9" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but42" "Button10" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but43" "Button11" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but44" "Button12" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but45" "Button13" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but46" "Button14" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but47" "Button15" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but48" "Button16" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but49" "Button17" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but50" "Button18" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but51" "Button19" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but52" "Button20" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but53" "Button21" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but54" "Button22" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but55" "Button23" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but56" "Button24" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but57" "Button25" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but58" "Button26" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but59" "Button27" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but60" "Button28" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but61" "Button29" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but62" "Button30" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but63" "Button31" vTcl:WidgetProc "Toplevel1" 1 vTcl:DefineAlias "$base.but64" "Button32" vTcl:WidgetProc "Toplevel1" 1 ################### # CREATING WIDGETS ################### if {!$container} { toplevel $base -class Toplevel \ -background #18dbdf -menu "$base.m67" wm focusmodel $base passive wm geometry $base 609x422+236+155; update wm maxsize $base 1009 738 wm minsize $base 1 1 wm overrideredirect $base 0 wm resizable $base 1 1 wm deiconify $base wm title $base "Power Console" } button $base.but33 \ -command {exec echo 100 > /dev/modem} -height 26 -text {01 -- On} \ -width 84 button $base.but34 \ -command {exec echo 200 > /dev/modem} -height 26 -text {01 -- Off} \ -width 82 button $base.but35 \ -command {exec echo 115 > /dev/modem} -height 26 -text {16 -- On} \ -width 84 button $base.but36 \ -command {exec echo 114 > /dev/modem} -height 26 -text {15 -- On} \ -width 84 button $base.but37 \ -command {exec echo 113 > /dev/modem} -height 26 -text {14 -- On} \ -width 84 button $base.but38 \ -command {exec echo 112 > /dev/modem} -height 26 -text {13 -- On} \ -width 84 button $base.but39 \ -command {exec echo 111 > /dev/modem} -height 26 -text {12 -- On} \ -width 84 button $base.but40 \ -command {exec echo 110 > /dev/modem} -height 26 -text {11 -- On} \ -width 84 button $base.but41 \ -command {exec echo 109 > /dev/modem} -height 26 -text {10 -- On} \ -width 84 button $base.but42 \ -command {exec echo 108 > /dev/modem} -height 26 -text {09 -- On} \ -width 84 button $base.but43 \ -command {exec echo 107 > /dev/modem} -height 26 -text {08 -- On} \ -width 84 button $base.but44 \ -command {exec echo 106 > /dev/modem} -height 26 -text {07 -- On} \ -width 84 button $base.but45 \ -command {exec echo 105 > /dev/modem} -height 26 -text {06 -- On} \ -width 84 button $base.but46 \ -command {exec echo 103 > /dev/modem} -height 26 -text {04 -- On} \ -width 84 button $base.but47 \ -command {exec echo 102 > /dev/modem} -height 26 -text {03 -- On} \ -width 84 button $base.but48 \ -command {exec echo 101 > /dev/modem} -height 26 -text {02 -- On} \ -width 84 button $base.but49 \ -command {exec echo 104 > /dev/modem} -height 26 -text {05 -- On} \ -width 84 button $base.but50 \ -command {exec echo 215 > /dev/modem} -height 26 -text {16 -- Off} \ -width 82 button $base.but51 \ -command {exec echo 214 > /dev/modem} -height 26 -text {15 -- Off} \ -width 82 button $base.but52 \ -command {exec echo 213 > /dev/modem} -height 26 -text {14 -- Off} \ -width 82 button $base.but53 \ -command {exec echo 212 > /dev/modem} -height 26 -text {13 -- Off} \ -width 82 button $base.but54 \ -command {exec echo 211 > /dev/modem} -height 26 -text {12 -- Off} \ -width 82 button $base.but55 \ -command {exec echo 210 > /dev/modem} -height 26 -text {11 -- Off} \ -width 82 button $base.but56 \ -command {exec echo 209 > /dev/modem} -height 26 -text {10 -- Off} \ -width 82 button $base.but57 \ -command {exec echo 208 > /dev/modem} -height 26 -text {09 -- Off} \ -width 82 button $base.but58 \ -command {exec echo 207 > /dev/modem} -height 26 -text {08 -- Off} \ -width 82 button $base.but59 \ -command {exec echo 206 > /dev/modem} -height 26 -text {07 -- Off} \ -width 82 button $base.but60 \ -command {exec echo 205 > /dev/modem} -height 26 -text {06 -- Off} \ -width 82 button $base.but61 \ -command {exec echo 204 > /dev/modem} -height 26 -text {05 -- Off} \ -width 82 button $base.but62 \ -command {exec echo 203 > /dev/modem} -height 26 -text {04 -- Off} \ -width 82 button $base.but63 \ -command {exec echo 202 > /dev/modem} -height 26 -text {03 -- Off} \ -width 82 button $base.but64 \ -command {exec echo 201 > /dev/modem} -height 26 -text {02 -- Off} \ -width 82 menu $base.m67 \ -tearoff 1 ################### # SETTING GEOMETRY ################### place $base.but33 \ -x 85 -y 20 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but34 \ -x 85 -y 50 -width 82 -height 26 -anchor nw place $base.but35 \ -x 435 -y 245 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but36 \ -x 325 -y 245 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but37 \ -x 205 -y 245 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but38 \ -x 85 -y 245 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but39 \ -x 435 -y 170 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but40 \ -x 325 -y 170 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but41 \ -x 205 -y 170 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but42 \ -x 85 -y 170 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but43 \ -x 435 -y 95 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but44 \ -x 325 -y 95 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but45 \ -x 205 -y 95 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but46 \ -x 430 -y 20 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but47 \ -x 325 -y 20 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but48 \ -x 205 -y 20 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but49 \ -x 85 -y 95 -width 84 -height 26 -anchor nw -bordermode ignore place $base.but50 \ -x 435 -y 275 -width 82 -height 26 -anchor nw place $base.but51 \ -x 325 -y 275 -width 82 -height 26 -anchor nw place $base.but52 \ -x 205 -y 275 -width 82 -height 26 -anchor nw place $base.but53 \ -x 85 -y 275 -width 82 -height 26 -anchor nw place $base.but54 \ -x 435 -y 200 -width 82 -height 26 -anchor nw place $base.but55 \ -x 325 -y 200 -width 82 -height 26 -anchor nw place $base.but56 \ -x 205 -y 200 -width 82 -height 26 -anchor nw place $base.but57 \ -x 85 -y 200 -width 82 -height 26 -anchor nw place $base.but58 \ -x 435 -y 125 -width 82 -height 26 -anchor nw place $base.but59 \ -x 325 -y 125 -width 82 -height 26 -anchor nw place $base.but60 \ -x 205 -y 125 -width 82 -height 26 -anchor nw place $base.but61 \ -x 85 -y 125 -width 82 -height 26 -anchor nw place $base.but62 \ -x 430 -y 50 -width 82 -height 26 -anchor nw place $base.but63 \ -x 325 -y 50 -width 82 -height 26 -anchor nw place $base.but64 \ -x 205 -y 50 -width 82 -height 26 -anchor nw } Window show . Window show .top32 main $argc $argv