604 lines
20 KiB
Tcl
604 lines
20 KiB
Tcl
#!/bin/sh
|
||
# the next line restarts using wish\
|
||
exec wish "$0" "$@"
|
||
|
||
if {![info exists vTcl(sourcing)]} {
|
||
|
||
package require Tk
|
||
switch $tcl_platform(platform) {
|
||
windows {
|
||
option add *Button.padY 0
|
||
}
|
||
default {
|
||
option add *Scrollbar.width 10
|
||
option add *Scrollbar.highlightThickness 0
|
||
option add *Scrollbar.elementBorderWidth 2
|
||
option add *Scrollbar.borderWidth 2
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
#############################################################################
|
||
# Visual Tcl v1.60 Project
|
||
#
|
||
|
||
|
||
#################################
|
||
# VTCL LIBRARY PROCEDURES
|
||
#
|
||
|
||
if {![info exists vTcl(sourcing)]} {
|
||
#############################################################################
|
||
## Library Procedure: Window
|
||
|
||
proc ::Window {args} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
global vTcl
|
||
foreach {cmd name newname} [lrange $args 0 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
|
||
} elseif {[info procs vTclWindow$name] != ""} {
|
||
eval "vTclWindow$name $newname $rest"
|
||
}
|
||
if {[winfo exists $newname] && [wm state $newname] == "normal"} {
|
||
vTcl:FireEvent $newname <<Show>>
|
||
}
|
||
}
|
||
hide {
|
||
if {$exists} {
|
||
wm withdraw $newname
|
||
vTcl:FireEvent $newname <<Hide>>
|
||
return}
|
||
}
|
||
iconify { if $exists {wm iconify $newname; return} }
|
||
destroy { if $exists {destroy $newname; return} }
|
||
}
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:DefineAlias
|
||
|
||
proc ::vTcl:DefineAlias {target alias widgetProc top_or_alias cmdalias} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
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
|
||
}
|
||
}
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:DoCmdOption
|
||
|
||
proc ::vTcl:DoCmdOption {target cmd} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
## menus are considered toplevel windows
|
||
set parent $target
|
||
while {[winfo class $parent] == "Menu"} {
|
||
set parent [winfo parent $parent]
|
||
}
|
||
|
||
regsub -all {\%widget} $cmd $target cmd
|
||
regsub -all {\%top} $cmd [winfo toplevel $parent] cmd
|
||
|
||
uplevel #0 [list eval $cmd]
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:FireEvent
|
||
|
||
proc ::vTcl:FireEvent {target event {params {}}} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
## The window may have disappeared
|
||
if {![winfo exists $target]} return
|
||
## Process each binding tag, looking for the event
|
||
foreach bindtag [bindtags $target] {
|
||
set tag_events [bind $bindtag]
|
||
set stop_processing 0
|
||
foreach tag_event $tag_events {
|
||
if {$tag_event == $event} {
|
||
set bind_code [bind $bindtag $tag_event]
|
||
foreach rep "\{%W $target\} $params" {
|
||
regsub -all [lindex $rep 0] $bind_code [lindex $rep 1] bind_code
|
||
}
|
||
set result [catch {uplevel #0 $bind_code} errortext]
|
||
if {$result == 3} {
|
||
## break exception, stop processing
|
||
set stop_processing 1
|
||
} elseif {$result != 0} {
|
||
bgerror $errortext
|
||
}
|
||
break
|
||
}
|
||
}
|
||
if {$stop_processing} {break}
|
||
}
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:Toplevel:WidgetProc
|
||
|
||
proc ::vTcl:Toplevel:WidgetProc {w args} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
if {[llength $args] == 0} {
|
||
## If no arguments, returns the path the alias points to
|
||
return $w
|
||
}
|
||
set command [lindex $args 0]
|
||
set args [lrange $args 1 end]
|
||
switch -- [string tolower $command] {
|
||
"setvar" {
|
||
foreach {varname value} $args {}
|
||
if {$value == ""} {
|
||
return [set ::${w}::${varname}]
|
||
} else {
|
||
return [set ::${w}::${varname} $value]
|
||
}
|
||
}
|
||
"hide" - "show" {
|
||
Window [string tolower $command] $w
|
||
}
|
||
"showmodal" {
|
||
## modal dialog ends when window is destroyed
|
||
Window show $w; raise $w
|
||
grab $w; tkwait window $w; grab release $w
|
||
}
|
||
"startmodal" {
|
||
## ends when endmodal called
|
||
Window show $w; raise $w
|
||
set ::${w}::_modal 1
|
||
grab $w; tkwait variable ::${w}::_modal; grab release $w
|
||
}
|
||
"endmodal" {
|
||
## ends modal dialog started with startmodal, argument is var name
|
||
set ::${w}::_modal 0
|
||
Window hide $w
|
||
}
|
||
default {
|
||
uplevel $w $command $args
|
||
}
|
||
}
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:WidgetProc
|
||
|
||
proc ::vTcl:WidgetProc {w args} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
if {[llength $args] == 0} {
|
||
## If no arguments, returns the path the alias points to
|
||
return $w
|
||
}
|
||
|
||
set command [lindex $args 0]
|
||
set args [lrange $args 1 end]
|
||
uplevel $w $command $args
|
||
}
|
||
#############################################################################
|
||
## Library Procedure: vTcl:toplevel
|
||
|
||
proc ::vTcl:toplevel {args} {
|
||
## This procedure may be used free of restrictions.
|
||
## Exception added by Christian Gavin on 08/08/02.
|
||
## Other packages and widget toolkits have different licensing requirements.
|
||
## Please read their license agreements for details.
|
||
|
||
uplevel #0 eval toplevel $args
|
||
set target [lindex $args 0]
|
||
namespace eval ::$target {set _modal 0}
|
||
}
|
||
}
|
||
|
||
|
||
if {[info exists vTcl(sourcing)]} {
|
||
|
||
proc vTcl:project:info {} {
|
||
set base .top43
|
||
namespace eval ::widgets::$base {
|
||
set set,origin 1
|
||
set set,size 1
|
||
set runvisible 1
|
||
}
|
||
namespace eval ::widgets::$base.lab44 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.cpd45 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.cpd46 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.che47 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1 -variable 1}
|
||
}
|
||
namespace eval ::widgets::$base.but48 {
|
||
array set save {-command 1 -disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.ent49 {
|
||
array set save {-background 1 -insertbackground 1 -textvariable 1}
|
||
}
|
||
namespace eval ::widgets::$base.cpd50 {
|
||
array set save {-background 1 -insertbackground 1 -textvariable 1}
|
||
}
|
||
namespace eval ::widgets::$base.cpd51 {
|
||
array set save {-background 1 -insertbackground 1 -textvariable 1}
|
||
}
|
||
namespace eval ::widgets::$base.lis43 {
|
||
array set save {-background 1 -listvariable 1}
|
||
}
|
||
namespace eval ::widgets::$base.lab45 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.but47 {
|
||
array set save {-command 1 -disabledforeground 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.but51 {
|
||
array set save {-command 1 -disabledforeground 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.but49 {
|
||
array set save {-command 1 -disabledforeground 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.cpd47 {
|
||
array set save {-disabledforeground 1 -font 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.lis49 {
|
||
array set save {-background 1 -disabledforeground 1 -listvariable 1 -yscrollcommand 1}
|
||
}
|
||
namespace eval ::widgets::$base.scr50 {
|
||
array set save {-command 1}
|
||
}
|
||
set base .top47
|
||
namespace eval ::widgets::$base {
|
||
set set,origin 1
|
||
set set,size 1
|
||
set runvisible 1
|
||
}
|
||
namespace eval ::widgets::$base.ent48 {
|
||
array set save {-background 1 -disabledforeground 1 -insertbackground 1 -textvariable 1}
|
||
}
|
||
namespace eval ::widgets::$base.but49 {
|
||
array set save {-command 1 -disabledforeground 1 -text 1}
|
||
}
|
||
namespace eval ::widgets::$base.but50 {
|
||
array set save {-command 1 -disabledforeground 1 -text 1}
|
||
}
|
||
namespace eval ::widgets_bindings {
|
||
set tagslist _TopLevel
|
||
}
|
||
namespace eval ::vTcl::modules::main {
|
||
set procs {
|
||
init
|
||
main
|
||
cobol_update
|
||
}
|
||
set compounds {
|
||
}
|
||
set projectType single
|
||
}
|
||
}
|
||
}
|
||
|
||
#################################
|
||
# USER DEFINED PROCEDURES
|
||
#
|
||
#############################################################################
|
||
## Procedure: main
|
||
|
||
proc ::main {argc argv} {
|
||
global cobol_fields widget
|
||
|
||
set cobol_fields {
|
||
name 40
|
||
address 50
|
||
province 40
|
||
phone 15
|
||
endpgm 1
|
||
quickret 1
|
||
}
|
||
|
||
global nomes_anteriores
|
||
if {![info exists nomes_anteriores]} {
|
||
set nomes_anteriores {}
|
||
}
|
||
|
||
# we'll append more states from the cobol program
|
||
set ::estados {pernambuco paraiba}
|
||
#"rio grande do norte" cear<61> piau<61>
|
||
#maranh<EFBFBD>o par<61> amazonas "rio de janeiro" "s<>o paulo"
|
||
#"esp<73>rito santo" bahia "minas gerais" paran<61>
|
||
#"santa catarina" "rio grande do sul"
|
||
#"mato grosso" "mato grosso do sul" goi<6F>s
|
||
#"distrito federal" acre rondonia roraima amap<61>
|
||
#alagoas sergipe tocantins
|
||
#bind all <Return> do_exit
|
||
}
|
||
#############################################################################
|
||
## Procedure: cobol_update
|
||
|
||
proc ::cobol_update {} {
|
||
global widget
|
||
global nomes_anteriores name
|
||
|
||
#puts "tcl-TC LOG: lappend nomes_anteriores $name"
|
||
lappend nomes_anteriores $name
|
||
focus $widget(nome_entry)
|
||
|
||
}
|
||
|
||
#############################################################################
|
||
## Initialization Procedure: init
|
||
|
||
proc ::init {argc argv} {
|
||
|
||
}
|
||
|
||
init $argc $argv
|
||
|
||
#################################
|
||
# VTCL GENERATED GUI PROCEDURES
|
||
#
|
||
|
||
proc vTclWindow. {base} {
|
||
if {$base == ""} {
|
||
set base .
|
||
}
|
||
###################
|
||
# CREATING WIDGETS
|
||
###################
|
||
wm focusmodel $top passive
|
||
wm geometry $top 1x1+0+0; update
|
||
wm maxsize $top 1265 994
|
||
wm minsize $top 1 1
|
||
wm overrideredirect $top 0
|
||
wm resizable $top 1 1
|
||
wm withdraw $top
|
||
wm title $top "vtcl.tcl"
|
||
bindtags $top "$top Vtcl.tcl all"
|
||
vTcl:FireEvent $top <<Create>>
|
||
wm protocol $top WM_DELETE_WINDOW "vTcl:FireEvent $top <<DeleteWindow>>"
|
||
|
||
###################
|
||
# SETTING GEOMETRY
|
||
###################
|
||
|
||
vTcl:FireEvent $base <<Ready>>
|
||
}
|
||
|
||
proc vTclWindow.top43 {base} {
|
||
if {$base == ""} {
|
||
set base .top43
|
||
}
|
||
if {[winfo exists $base]} {
|
||
wm deiconify $base; return
|
||
}
|
||
set top $base
|
||
###################
|
||
# CREATING WIDGETS
|
||
###################
|
||
vTcl:toplevel $top -class Toplevel \
|
||
-highlightcolor black
|
||
wm focusmodel $top passive
|
||
wm geometry $top 570x523+257+215; update
|
||
wm maxsize $top 1265 994
|
||
wm minsize $top 1 1
|
||
wm overrideredirect $top 0
|
||
wm resizable $top 1 1
|
||
wm deiconify $top
|
||
wm title $top "New Toplevel 1"
|
||
vTcl:DefineAlias "$top" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1
|
||
bindtags $top "$top Toplevel all _TopLevel"
|
||
vTcl:FireEvent $top <<Create>>
|
||
wm protocol $top WM_DELETE_WINDOW "vTcl:FireEvent $top <<DeleteWindow>>"
|
||
|
||
label $top.lab44 \
|
||
-disabledforeground #a1a4a1 -font {helvetica 18 bold} -text Nome:
|
||
vTcl:DefineAlias "$top.lab44" "Label1" vTcl:WidgetProc "Toplevel1" 1
|
||
label $top.cpd45 \
|
||
-disabledforeground #a1a4a1 -font {helvetica 18 bold} -text Endere<EFBFBD>o:
|
||
vTcl:DefineAlias "$top.cpd45" "Label2" vTcl:WidgetProc "Toplevel1" 1
|
||
label $top.cpd46 \
|
||
-disabledforeground #a1a4a1 -font {helvetica 18 bold} -text Telefone:
|
||
vTcl:DefineAlias "$top.cpd46" "Label3" vTcl:WidgetProc "Toplevel1" 1
|
||
checkbutton $top.che47 \
|
||
-disabledforeground #a1a4a1 -font {helvetica 10} -text concluido \
|
||
-variable endpgm
|
||
vTcl:DefineAlias "$top.che47" "Checkbutton1" vTcl:WidgetProc "Toplevel1" 1
|
||
button $top.but48 \
|
||
-command do_exit -disabledforeground #a1a4a1 \
|
||
-font {helvetica 10 bold} -text entra
|
||
vTcl:DefineAlias "$top.but48" "Button1" vTcl:WidgetProc "Toplevel1" 1
|
||
entry $top.ent49 \
|
||
-background white -insertbackground black -textvariable name
|
||
vTcl:DefineAlias "$top.ent49" "nome_entry" vTcl:WidgetProc "Toplevel1" 1
|
||
entry $top.cpd50 \
|
||
-background white -insertbackground black -textvariable address
|
||
vTcl:DefineAlias "$top.cpd50" "Entry2" vTcl:WidgetProc "Toplevel1" 1
|
||
entry $top.cpd51 \
|
||
-background white -insertbackground black -textvariable phone
|
||
vTcl:DefineAlias "$top.cpd51" "Entry3" vTcl:WidgetProc "Toplevel1" 1
|
||
listbox $top.lis43 \
|
||
-background white -listvariable nomes_anteriores
|
||
vTcl:DefineAlias "$top.lis43" "Listbox1" vTcl:WidgetProc "Toplevel1" 1
|
||
label $top.lab45 \
|
||
-disabledforeground #a1a4a1 -font {verdana -11} \
|
||
-text {nomes
|
||
anteriores}
|
||
vTcl:DefineAlias "$top.lab45" "Label4" vTcl:WidgetProc "Toplevel1" 1
|
||
button $top.but47 \
|
||
-command {source /usr/local/bin/tkcon} -disabledforeground #a1a4a1 \
|
||
-text tkcon
|
||
vTcl:DefineAlias "$top.but47" "Button2" vTcl:WidgetProc "Toplevel1" 1
|
||
button $top.but51 \
|
||
-command {MinhaJanela show} -disabledforeground #a1a4a1 \
|
||
-text {nome (aux)}
|
||
vTcl:DefineAlias "$top.but51" "Button3" vTcl:WidgetProc "Toplevel1" 1
|
||
button $top.but49 \
|
||
-command {call_cobol tclguisub "Hello from tcl"} \
|
||
-disabledforeground #a1a4a1 -text tclguisub
|
||
vTcl:DefineAlias "$top.but49" "Button4" vTcl:WidgetProc "Toplevel1" 1
|
||
label $top.cpd47 \
|
||
-disabledforeground #a1a4a1 -font {helvetica 18 bold} -text Estado:
|
||
vTcl:DefineAlias "$top.cpd47" "Label5" vTcl:WidgetProc "Toplevel1" 1
|
||
listbox $top.lis49 \
|
||
-background white -disabledforeground #a1a4a1 \
|
||
-yscrollcommand "$top.scr50 set" -listvariable estados
|
||
vTcl:DefineAlias "$top.lis49" "Listbox2" vTcl:WidgetProc "Toplevel1" 1
|
||
scrollbar $top.scr50 \
|
||
-command "$top.lis49 yview"
|
||
vTcl:DefineAlias "$top.scr50" "Scrollbar1" vTcl:WidgetProc "Toplevel1" 1
|
||
###################
|
||
# SETTING GEOMETRY
|
||
###################
|
||
place $top.lab44 \
|
||
-in $top -x 25 -y 30 -anchor nw -bordermode ignore
|
||
place $top.cpd45 \
|
||
-in $top -x 25 -y 90 -anchor nw -bordermode inside
|
||
place $top.cpd46 \
|
||
-in $top -x 25 -y 255 -anchor nw -bordermode inside
|
||
place $top.che47 \
|
||
-in $top -x 30 -y 440 -anchor nw -bordermode ignore
|
||
place $top.but48 \
|
||
-in $top -x 260 -y 430 -anchor nw -bordermode ignore
|
||
place $top.ent49 \
|
||
-in $top -x 185 -y 35 -width 358 -height 27 -anchor nw \
|
||
-bordermode ignore
|
||
place $top.cpd50 \
|
||
-in $top -x 185 -y 100 -width 358 -height 27 -anchor nw \
|
||
-bordermode inside
|
||
place $top.cpd51 \
|
||
-in $top -x 185 -y 265 -width 228 -height 27 -anchor nw \
|
||
-bordermode inside
|
||
place $top.lis43 \
|
||
-in $top -x 185 -y 305 -width 353 -height 96 -anchor nw \
|
||
-bordermode ignore
|
||
place $top.lab45 \
|
||
-in $top -x 100 -y 305 -anchor nw -bordermode ignore
|
||
place $top.but47 \
|
||
-in $top -x 470 -y 430 -anchor nw -bordermode ignore
|
||
place $top.but51 \
|
||
-in $top -x 345 -y 430 -anchor nw -bordermode ignore
|
||
place $top.but49 \
|
||
-in $top -x 170 -y 430 -width 81 -height 35 -anchor nw \
|
||
-bordermode ignore
|
||
place $top.cpd47 \
|
||
-in $top -x 25 -y 150 -anchor nw -bordermode inside
|
||
place $top.lis49 \
|
||
-in $top -x 196 -y 159 -width 318 -height 61 -anchor nw \
|
||
-bordermode ignore
|
||
place $top.scr50 \
|
||
-in $top -x 515 -y 160 -width 16 -height 62 -anchor nw \
|
||
-bordermode ignore
|
||
|
||
vTcl:FireEvent $base <<Ready>>
|
||
}
|
||
|
||
proc vTclWindow.top47 {base} {
|
||
if {$base == ""} {
|
||
set base .top47
|
||
}
|
||
if {[winfo exists $base]} {
|
||
wm deiconify $base; return
|
||
}
|
||
set top $base
|
||
###################
|
||
# CREATING WIDGETS
|
||
###################
|
||
vTcl:toplevel $top -class Toplevel \
|
||
-highlightcolor black
|
||
wm withdraw $top
|
||
wm focusmodel $top passive
|
||
wm geometry $top 433x150+169+728; update
|
||
wm maxsize $top 1265 994
|
||
wm minsize $top 1 1
|
||
wm overrideredirect $top 0
|
||
wm resizable $top 1 1
|
||
wm title $top "New Toplevel 2"
|
||
vTcl:DefineAlias "$top" "MinhaJanela" vTcl:Toplevel:WidgetProc "" 1
|
||
bindtags $top "$top Toplevel all _TopLevel"
|
||
vTcl:FireEvent $top <<Create>>
|
||
wm protocol $top WM_DELETE_WINDOW "vTcl:FireEvent $top <<DeleteWindow>>"
|
||
|
||
entry $top.ent48 \
|
||
-background white -disabledforeground #a1a4a1 -insertbackground black \
|
||
-textvariable name1
|
||
vTcl:DefineAlias "$top.ent48" "Entry1" vTcl:WidgetProc "MinhaJanela" 1
|
||
button $top.but49 \
|
||
-command {global name name1
|
||
set name $name1
|
||
MinhaJanela hide} \
|
||
-disabledforeground #a1a4a1 -text ok
|
||
vTcl:DefineAlias "$top.but49" "Button1" vTcl:WidgetProc "MinhaJanela" 1
|
||
button $top.but50 \
|
||
-command {MinhaJanela hide} -disabledforeground #a1a4a1 -text fechar
|
||
vTcl:DefineAlias "$top.but50" "Button2" vTcl:WidgetProc "MinhaJanela" 1
|
||
###################
|
||
# SETTING GEOMETRY
|
||
###################
|
||
place $top.ent48 \
|
||
-in $top -x 50 -y 30 -width 353 -height 27 -anchor nw \
|
||
-bordermode ignore
|
||
place $top.but49 \
|
||
-in $top -x 145 -y 90 -anchor nw -bordermode ignore
|
||
place $top.but50 \
|
||
-in $top -x 240 -y 90 -anchor nw -bordermode ignore
|
||
|
||
vTcl:FireEvent $base <<Ready>>
|
||
}
|
||
|
||
#############################################################################
|
||
## Binding tag: _TopLevel
|
||
|
||
bind "_TopLevel" <<Create>> {
|
||
if {![info exists _topcount]} {set _topcount 0}; incr _topcount
|
||
}
|
||
bind "_TopLevel" <<DeleteWindow>> {
|
||
if {[set ::%W::_modal]} {
|
||
vTcl:Toplevel:WidgetProc %W endmodal
|
||
} else {
|
||
destroy %W; if {$_topcount == 0} {exit}
|
||
}
|
||
}
|
||
bind "_TopLevel" <Destroy> {
|
||
if {[winfo toplevel %W] == "%W"} {incr _topcount -1}
|
||
}
|
||
|
||
Window show .
|
||
Window show .top43
|
||
Window show .top47
|
||
|
||
main $argc $argv
|