#!/bin/sh
# \
  exec wish "$0" "$@"

global widget; 

proc init {argc argv} {

}

init $argc $argv


proc {main} {argc argv} {

}

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
    }
    set exists [winfo exists $newname]
    switch $cmd {
        show {
            if {$exists == "1" && $name != "."} {wm deiconify $name; 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} }
    }
}


proc vTclWindow. {base} {
    if {$base == ""} {
        set base .
    }
    wm focusmodel $base passive
    wm geometry $base 1x1+0+0
    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 "vt.tcl"
}

proc vTclWindow.top17 {base} {
    if {$base == ""} {
        set base .top17
    }
    if {[winfo exists $base]} {
        wm deiconify $base; return
    }
    toplevel $base -class Toplevel \
        -background #d01810 
    wm focusmodel $base passive
    wm geometry $base 343x267+197+238
    wm maxsize $base 1009 738
    wm minsize $base 1 1
    wm overrideredirect $base 0
    wm resizable $base 0 0
    wm deiconify $base
    wm title $base "ABOUT (FIREWALL Manager 2.0 PRO)"
    label $base.lab21 \
        -background #b61808 -borderwidth 1 -font {helvetica 24 {bold italic}} \
        -relief raised -text {FIREWALL Manager 2.0 PRO} 
    label $base.lab22 \
        -background #b80e12 -borderwidth 1 -font {Helvetica 18 {bold italic}} \
        -foreground #fefe00 -relief raised \
        -text {By aRG (labom@internetcom.com.br)
ICQ = 1738663} 
    button $base.but25 \
        -background #de000a -command exit -padx 9 -pady 3 -text Back 
    label $base.lab17 \
        -borderwidth 1 -justify left -relief raised \
        -text {Special Thanks to: Carol (My Wife ) , Crystal, 
(HTML's), Murruy (Translation) and WAX (this
nice host). } 
    place $base.lab21 \
        -x 1 -y 5 -width 341 -height 38 -anchor nw -bordermode ignore 
    place $base.lab22 \
        -x 10 -y 55 -width 327 -height 48 -anchor nw -bordermode ignore 
    place $base.but25 \
        -x 280 -y 235 -anchor nw -bordermode ignore 
    place $base.lab17 \
        -x 30 -y 165 -width 292 -height 46 -anchor nw -bordermode ignore 
}

Window show .
Window show .top17

main $argc $argv
