# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # This little routine creates a debug-level widget and packs it in w # # to the right. We depend on there being a global debug variable D, # # which we will create if it doesn't exist already. The args, if any, # # are included in the menubutton option list, so the caller can do # # things like specify border, relief, font, colors, etc. # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # This has been supplanted by the Verbose.w module. # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # proc Dbg {w args} { global D if ![info exists D] {set D 1} eval frame $w.fDbg -bd 3 -relief ridge eval menubutton $w.fDbg.m $args -text Dbg -menu $w.fDbg.m.menu eval entry $w.fDbg.v -textvariable D -width 1 -bd 0 -highlightthickness 0 eval pack $w.fDbg.m $w.fDbg.v -in $w.fDbg -side left eval menu $w.fDbg.m.menu $w.fDbg.m.menu add command -label {Incr} -command {incr D} $w.fDbg.m.menu add command -label {Decr} -command {incr D -1} $w.fDbg.m.menu add command -label {Quiet} -command {set D 1} $w.fDbg.m.menu add command -label {Silent} -command {set D 0} pack $w.fDbg -in $w -side right }