# Copyright for URLibService (c) 1995 - 2020, # by Gerald Banon. All rights reserved. # Create the main window package provide dpi.inpe.br/banon/1998/08.02.08.56 2.1 # ---------------------------------------------------------------------- # CreateMainWindow # used in main and OpenWindow (StartServer.tcl) proc CreateMainWindow {} { # runs with start global w global wdd wir wob wsp clo exi global argv global environmentArray global col # global apacheRepository global sp.prePostMenu global dd.dirPostMenu global dd.repPostMenu global dd.dirPostponeReduceEntry global dd.repPostponeReduceEntry global log # global posted # > # Set options for UNIX option add *background #c0c0c0 ;# systemButtonFace option add *foreground black option add *Menu.activeBackground #000080 ;# systemActiveCaption option add *Menu.activeForeground #ffffff ;# systemCaptionText option add *selectColor #ffffff option add *selectBackground #000080 ;# systemHighligth option add *troughColor #c0c0c0 ;# systemScrollbar option add *disabledForeground #808080 ;# systemDisabledText # Set options for UNIX - end # Set window set w .window toplevel $w pack propagate $w false wm grid $w 1 1 1 1 #puts [$w config] #set rgb [winfo rgb $w systemButtonFace] #puts [format "#%03x%03x%03x" \ [expr round([lindex $rgb 0])] \ [expr round([lindex $rgb 1])] \ [expr round([lindex $rgb 2])]] wm title $w "URLibService" # set backgroundColor [lindex [$w configure -background] 3] # puts $backgroundColor # => SystemButtonFace # Create a frame for the menu bar. frame $w.menubar frame $w.sp -height .47c -relief raised -borderwidth 1 pack $w.menubar -side top -fill x # pack $w.sp -side top -fill x -expand true pack $w.sp -side top -fill x # Create the command buttons. # set width .7 ;# inch set width .63 ;# inch # set width .525 ;# inch # set height .9 ;# cm set height .81 ;# cm # set height .675 ;# cm # Exit button frame $w.menubar.exit -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.exit false pack $w.menubar.exit -side right set exi [button $w.menubar.exit.1 -command Run-exit -borderwidth 2 -cursor hand2] #set exi [button $w.menubar.exit.1 -borderwidth 2 -cursor hand2] ConfigText $exi Exit pack $exi -fill both -expand true #bind $exi "Run-exit; continue" ;# continue is to let the double click working #bind $exi "Run-exit" # Close button frame $w.menubar.close -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.close false pack $w.menubar.close -side right set clo [button $w.menubar.close.1 -command Run-close -borderwidth 2 -cursor hand2] #set clo [button $w.menubar.close.1 -borderwidth 2 -cursor hand2] ConfigText $clo Close pack $clo -fill both -expand true #bind $clo "Run-close; continue" ;# continue is to let the double click working #bind $clo "Run-exit" # DD button frame $w.menubar.dd -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.dd false set wdd [button $w.menubar.dd.1 -command Run-dd -borderwidth 2 \ -cursor hand2] ConfigText $wdd DD pack $wdd -fill both -expand true # IR button frame $w.menubar.ir -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.ir false set wir [button $w.menubar.ir.1 -command Run-ir -borderwidth 2 \ -cursor hand2] ConfigText $wir IR pack $wir -fill both -expand true # OB button frame $w.menubar.ob -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.ob false set wob [button $w.menubar.ob.1 -command Run-ob -borderwidth 2 \ -cursor hand2 -bg #a0a0e0] ConfigText $wob OB pack $wob -fill both -expand true # SP button frame $w.menubar.sp -width [format "%si" $width] \ -height [format "%sc" $height] pack propagate $w.menubar.sp false set wsp [button $w.menubar.sp.1 -command Run-sp -borderwidth 2 \ -cursor hand2] ConfigText $wsp SP pack $wsp -fill both -expand true $wdd config -state disabled $wir config -state disabled $wob config -state disabled $wsp config -state disabled # pack $w.menubar.dd $w.menubar.ob $w.menubar.sp -side left pack $w.menubar.dd $w.menubar.ir $w.menubar.ob $w.menubar.sp -side left # CreateMain $posted CreateMain 0 # Display message # DD dialog label $w.sp.dd -bg #ffffcc \ -relief solid -borderwidth 1 ConfigText $w.sp.dd " Depositing a Document " bind $w.menubar.dd \ "DisplayMessage $w.sp.dd $w.sp nw 0 0 [format "%si" [expr 0 * $width]]" bind $w.menubar.dd "DeleteMessage" bind $wdd