diff options
Diffstat (limited to 'library')
28 files changed, 5011 insertions, 657 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index f809545..5f799c9 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -4,7 +4,7 @@ # posts a dialog box with the error message and gives the user a chance # to see a more detailed stack trace. # -# RCS: @(#) $Id: bgerror.tcl,v 1.4 1999/01/04 19:25:27 rjohnson Exp $ +# RCS: @(#) $Id: bgerror.tcl,v 1.5 1999/04/16 01:51:25 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -35,7 +35,7 @@ proc bgerror err { # code from the tkerror trial, other ret codes are passed back # to our caller (tcl background error handler) so the called "tkerror" # can still use return -code break, to skip remaining messages - # in the error queue for instance) + # in the error queue for instance) set ret [catch {tkerror $err} msg]; if {$ret != 1} {return -code $ret $msg} @@ -62,7 +62,7 @@ proc bgerror err { wm title $w "Stack Trace for Error" wm iconname $w "Stack Trace" button $w.ok -text OK -command "destroy $w" -default active - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { text $w.text -relief flat -bd 2 -highlightthickness 0 -setgrid true \ -yscrollcommand "$w.scroll set" -width 60 -height 20 } else { @@ -94,7 +94,7 @@ proc bgerror err { # screen, since they could make it impossible for the user # to interact with the stack trace. - if {[grab current .] != ""} { + if {[string compare [grab current .] ""]} { grab release [grab current .] } } diff --git a/library/button.tcl b/library/button.tcl index 4214a8a..d70916a 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -4,7 +4,7 @@ # checkbutton, and radiobutton widgets and provides procedures # that help in implementing those bindings. # -# RCS: @(#) $Id: button.tcl,v 1.3 1998/09/14 18:23:22 stanton Exp $ +# RCS: @(#) $Id: button.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ # The code below creates the default class bindings for buttons. #------------------------------------------------------------------------- -if {$tcl_platform(platform) == "macintosh"} { +if {[string match "macintosh" $tcl_platform(platform)]} { bind Radiobutton <Enter> { tkButtonEnter %W } @@ -37,7 +37,7 @@ if {$tcl_platform(platform) == "macintosh"} { tkButtonUp %W } } -if {$tcl_platform(platform) == "windows"} { +if {[string match "windows" $tcl_platform(platform)]} { bind Checkbutton <equal> { tkCheckRadioInvoke %W select } @@ -67,7 +67,7 @@ if {$tcl_platform(platform) == "windows"} { tkCheckRadioEnter %W } } -if {$tcl_platform(platform) == "unix"} { +if {[string match "unix" $tcl_platform(platform)]} { bind Checkbutton <Return> { if {!$tk_strictMotif} { tkCheckRadioInvoke %W @@ -126,7 +126,7 @@ bind Radiobutton <Leave> { tkButtonLeave %W } -if {$tcl_platform(platform) == "windows"} { +if {[string match "windows" $tcl_platform(platform)]} { ######################### # Windows implementation @@ -142,8 +142,8 @@ if {$tcl_platform(platform) == "windows"} { proc tkButtonEnter w { global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { + if {[string compare [$w cget -state] "disabled"]} { + if {![string compare $tkPriv(buttonWindow) $w]} { $w configure -state active -relief sunken } } @@ -162,10 +162,10 @@ proc tkButtonEnter w { proc tkButtonLeave w { global tkPriv - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { $w config -state normal } - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $tkPriv(buttonWindow) $w]} { $w configure -relief $tkPriv(relief) } set tkPriv(window) "" @@ -182,8 +182,8 @@ proc tkButtonLeave w { proc tkCheckRadioEnter w { global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { + if {[string compare [$w cget -state] "disabled"]} { + if {![string compare $tkPriv(buttonWindow) $w]} { $w configure -state active } } @@ -202,7 +202,7 @@ proc tkCheckRadioEnter w { proc tkButtonDown w { global tkPriv set tkPriv(relief) [lindex [$w conf -relief] 4] - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { set tkPriv(buttonWindow) $w $w config -relief sunken -state active } @@ -220,7 +220,7 @@ proc tkButtonDown w { proc tkCheckRadioDown w { global tkPriv set tkPriv(relief) [lindex [$w conf -relief] 4] - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { set tkPriv(buttonWindow) $w $w config -state active } @@ -236,10 +236,10 @@ proc tkCheckRadioDown w { proc tkButtonUp w { global tkPriv - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $tkPriv(buttonWindow) $w]} { set tkPriv(buttonWindow) "" - if {($w == $tkPriv(window)) - && ([$w cget -state] != "disabled")} { + if {![string compare $tkPriv(window) $w] + && [string compare [$w cget -state] "disabled"]} { $w config -relief $tkPriv(relief) -state normal uplevel #0 [list $w invoke] } @@ -248,7 +248,7 @@ proc tkButtonUp w { } -if {$tcl_platform(platform) == "unix"} { +if {[string match "unix" $tcl_platform(platform)]} { ##################### # Unix implementation @@ -264,9 +264,9 @@ if {$tcl_platform(platform) == "unix"} { proc tkButtonEnter {w} { global tkPriv - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { $w config -state active - if {$tkPriv(buttonWindow) == $w} { + if {![string compare $tkPriv(buttonWindow) $w]} { $w configure -state active -relief sunken } } @@ -285,10 +285,10 @@ proc tkButtonEnter {w} { proc tkButtonLeave w { global tkPriv - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { $w config -state normal } - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $tkPriv(buttonWindow) $w]} { $w configure -relief $tkPriv(relief) } set tkPriv(window) "" @@ -306,7 +306,7 @@ proc tkButtonLeave w { proc tkButtonDown w { global tkPriv set tkPriv(relief) [lindex [$w config -relief] 4] - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { set tkPriv(buttonWindow) $w $w config -relief sunken } @@ -322,11 +322,11 @@ proc tkButtonDown w { proc tkButtonUp w { global tkPriv - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $w $tkPriv(buttonWindow)]} { set tkPriv(buttonWindow) "" $w config -relief $tkPriv(relief) - if {($w == $tkPriv(window)) - && ([$w cget -state] != "disabled")} { + if {![string compare $w $tkPriv(window)] + && [string compare [$w cget -state] "disabled"]} { uplevel #0 [list $w invoke] } } @@ -334,7 +334,7 @@ proc tkButtonUp w { } -if {$tcl_platform(platform) == "macintosh"} { +if {[string match "macintosh" $tcl_platform(platform)]} { #################### # Mac implementation @@ -350,8 +350,8 @@ if {$tcl_platform(platform) == "macintosh"} { proc tkButtonEnter {w} { global tkPriv - if {[$w cget -state] != "disabled"} { - if {$tkPriv(buttonWindow) == $w} { + if {[string compare [$w cget -state] "disabled"]} { + if {![string compare $w $tkPriv(buttonWindow)]} { $w configure -state active } } @@ -370,7 +370,7 @@ proc tkButtonEnter {w} { proc tkButtonLeave w { global tkPriv - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $w $tkPriv(buttonWindow)]} { $w configure -state normal } set tkPriv(window) "" @@ -387,7 +387,7 @@ proc tkButtonLeave w { proc tkButtonDown w { global tkPriv - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { set tkPriv(buttonWindow) $w $w config -state active } @@ -403,11 +403,11 @@ proc tkButtonDown w { proc tkButtonUp w { global tkPriv - if {$w == $tkPriv(buttonWindow)} { + if {![string compare $w $tkPriv(buttonWindow)]} { $w config -state normal set tkPriv(buttonWindow) "" - if {($w == $tkPriv(window)) - && ([$w cget -state] != "disabled")} { + if {![string compare $w $tkPriv(window)] + && [string compare [$w cget -state] "disabled"]} { uplevel #0 [list $w invoke] } } @@ -427,7 +427,7 @@ proc tkButtonUp w { # w - The name of the widget. proc tkButtonInvoke w { - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { set oldRelief [$w cget -relief] set oldState [$w cget -state] $w configure -state active -relief sunken @@ -449,7 +449,7 @@ proc tkButtonInvoke w { # cmd - The subcommand to invoke (one of invoke, select, or deselect). proc tkCheckRadioInvoke {w {cmd invoke}} { - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { uplevel #0 [list $w $cmd] } } diff --git a/library/clrpick.tcl b/library/clrpick.tcl index 7e56626..8f08324 100644 --- a/library/clrpick.tcl +++ b/library/clrpick.tcl @@ -3,7 +3,7 @@ # Color selection dialog for platforms that do not support a # standard color selection dialog. # -# RCS: @(#) $Id: clrpick.tcl,v 1.3 1998/09/14 18:23:22 stanton Exp $ +# RCS: @(#) $Id: clrpick.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -84,7 +84,7 @@ proc tkColorDialog {args} { set oldFocus [focus] set oldGrab [grab current $w] - if {$oldGrab != ""} { + if {[string compare $oldGrab ""]} { set grabStatus [grab status $oldGrab] } grab $w @@ -101,8 +101,8 @@ proc tkColorDialog {args} { grab release $w destroy $w unset data - if {$oldGrab != ""} { - if {$grabStatus == "global"} { + if {[string compare $oldGrab ""]} { + if {![string compare $grabStatus "global"]} { grab -global $oldGrab } else { grab $oldGrab diff --git a/library/comdlg.tcl b/library/comdlg.tcl index 2f7ba83..a8a9fdb 100644 --- a/library/comdlg.tcl +++ b/library/comdlg.tcl @@ -3,7 +3,7 @@ # Some functions needed for the common dialog boxes. Probably need to go # in a different file. # -# RCS: @(#) $Id: comdlg.tcl,v 1.3 1998/09/14 18:23:22 stanton Exp $ +# RCS: @(#) $Id: comdlg.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -52,13 +52,12 @@ proc tclParseConfigSpec {w specs flags argList} { set verproc($cmdsw) [lindex $spec 4] } - if {([llength $argList]%2) != 0} { - foreach {cmdsw value} $argList { - if {![info exists cmd($cmdsw)]} { - error "unknown option \"$cmdsw\", must be [tclListValidFlags cmd]" - } + if {[llength $argList] & 1} { + set cmdsw [lindex $argList end] + if {![info exists cmd($cmdsw)]} { + error "bad option \"$cmdsw\": must be [tclListValidFlags cmd]" } - error "value for \"[lindex $argList end]\" missing" + error "value for \"$cmdsw\" missing" } # 2: set the default values @@ -71,7 +70,7 @@ proc tclParseConfigSpec {w specs flags argList} { # foreach {cmdsw value} $argList { if {![info exists cmd($cmdsw)]} { - error "unknown option \"$cmdsw\", must be [tclListValidFlags cmd]" + error "bad option \"$cmdsw\": must be [tclListValidFlags cmd]" } set data($cmdsw) $value } @@ -90,7 +89,7 @@ proc tclListValidFlags {v} { append errormsg "$separator$cmdsw" incr i if {$i == $len} { - set separator " or " + set separator ", or " } else { set separator ", " } diff --git a/library/console.tcl b/library/console.tcl index 7ce1e91..602f32d 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -4,7 +4,7 @@ # can be used by non-unix systems that do not have built-in support # for shells. # -# RCS: @(#) $Id: console.tcl,v 1.3 1998/09/14 18:23:22 stanton Exp $ +# RCS: @(#) $Id: console.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # @@ -23,14 +23,14 @@ proc tkConsoleInit {} { global tcl_platform - if {! [consoleinterp eval {set tcl_interactive}]} { + if {![consoleinterp eval {set tcl_interactive}]} { wm withdraw . } - if {"$tcl_platform(platform)" == "macintosh"} { - set mod "Cmd" - } else { + if {[string compare $tcl_platform(platform) "macintosh"]} { set mod "Ctrl" + } else { + set mod "Cmd" } menu .menubar @@ -42,10 +42,10 @@ proc tkConsoleInit {} { -command tkConsoleSource .menubar.file add command -label "Hide Console" -underline 0 \ -command {wm withdraw .} - if {"$tcl_platform(platform)" == "macintosh"} { - .menubar.file add command -label "Quit" -command exit -accel Cmd-Q - } else { + if {[string compare $tcl_platform(platform) "macintosh"]} { .menubar.file add command -label "Exit" -underline 1 -command exit + } else { + .menubar.file add command -label "Quit" -command exit -accel Cmd-Q } menu .menubar.edit -tearoff 0 @@ -56,7 +56,10 @@ proc tkConsoleInit {} { .menubar.edit add command -label "Paste" -underline 1 \ -command { event generate .console <<Paste>> } -accel "$mod+V" - if {"$tcl_platform(platform)" == "windows"} { + if {[string compare $tcl_platform(platform) "windows"]} { + .menubar.edit add command -label "Clear" -underline 2 \ + -command { event generate .console <<Clear>> } + } else { .menubar.edit add command -label "Delete" -underline 0 \ -command { event generate .console <<Clear>> } -accel "Del" @@ -64,9 +67,6 @@ proc tkConsoleInit {} { menu .menubar.help -tearoff 0 .menubar.help add command -label "About..." -underline 0 \ -command tkConsoleAbout - } else { - .menubar.edit add command -label "Clear" -underline 2 \ - -command { event generate .console <<Clear>> } } . conf -menu .menubar @@ -75,7 +75,7 @@ proc tkConsoleInit {} { scrollbar .sb -command ".console yview" pack .sb -side right -fill both pack .console -fill both -expand 1 -side left - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { .console configure -font {Monaco 9 normal} -highlightthickness 0 } @@ -106,7 +106,7 @@ proc tkConsoleSource {} { set filename [tk_getOpenFile -defaultextension .tcl -parent . \ -title "Select a file to source" \ -filetypes {{"Tcl Scripts" .tcl} {"All Files" *}}] - if {"$filename" != ""} { + if {[string compare $filename ""]} { set cmd [list source $filename] if {[catch {consoleinterp eval $cmd} result]} { tkConsoleOutput stderr "$result\n" @@ -125,23 +125,23 @@ proc tkConsoleSource {} { proc tkConsoleInvoke {args} { set ranges [.console tag ranges input] set cmd "" - if {$ranges != ""} { + if {[llength $ranges]} { set pos 0 - while {[lindex $ranges $pos] != ""} { + while {[string compare [lindex $ranges $pos] ""]} { set start [lindex $ranges $pos] set end [lindex $ranges [incr pos]] append cmd [.console get $start $end] incr pos } } - if {$cmd == ""} { + if {![string compare $cmd ""]} { tkConsolePrompt } elseif {[info complete $cmd]} { .console mark set output end .console tag delete input set result [consoleinterp record $cmd] - if {$result != ""} { - .console insert insert "$result\n" + if {[string compare $result ""]} { + puts $result } tkConsoleHistory reset tkConsolePrompt @@ -189,7 +189,7 @@ proc tkConsoleHistory {cmd} { } else { set cmd "history event $histNum" } - if {$cmd != ""} { + if {[string compare $cmd ""]} { catch {consoleinterp eval $cmd} cmd } .console delete promptEnd end @@ -210,7 +210,7 @@ proc tkConsoleHistory {cmd} { # partial - Flag to specify which prompt to print. proc tkConsolePrompt {{partial normal}} { - if {$partial == "normal"} { + if {![string compare $partial "normal"]} { set temp [.console index "end - 1 char"] .console mark set output end if {[consoleinterp eval "info exists tcl_prompt1"]} { @@ -268,7 +268,7 @@ proc tkConsoleBind {win} { break } bind $win <Delete> { - if {[%W tag nextrange sel 1.0 end] != ""} { + if {[string compare [%W tag nextrange sel 1.0 end] ""]} { %W tag remove sel sel.first promptEnd } else { if {[%W compare insert < promptEnd]} { @@ -277,7 +277,7 @@ proc tkConsoleBind {win} { } } bind $win <BackSpace> { - if {[%W tag nextrange sel 1.0 end] != ""} { + if {[string compare [%W tag nextrange sel 1.0 end] ""]} { %W tag remove sel sel.first promptEnd } else { if {[%W compare insert <= promptEnd]} { @@ -368,7 +368,7 @@ proc tkConsoleBind {win} { } bind $win <F9> { eval destroy [winfo child .] - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { source -rsrc Console } else { source [file join $tk_library console.tcl] @@ -416,7 +416,7 @@ proc tkConsoleBind {win} { # s - The string to insert (usually just a single character) proc tkConsoleInsert {w s} { - if {$s == ""} { + if {![string compare $s ""]} { return } catch { diff --git a/library/dialog.tcl b/library/dialog.tcl index 5b3439f..be5a81e 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -3,7 +3,7 @@ # This file defines the procedure tk_dialog, which creates a dialog # box containing a bitmap, a message, and one or more buttons. # -# RCS: @(#) $Id: dialog.tcl,v 1.3 1998/09/14 18:23:22 stanton Exp $ +# RCS: @(#) $Id: dialog.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1992-1993 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -47,13 +47,13 @@ proc tk_dialog {w title text bitmap default args} { # even though its grab keeps the rest of the application from being used. wm transient $w [winfo toplevel [winfo parent $w]] - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { unsupported1 style $w dBoxProc } frame $w.bot frame $w.top - if {$tcl_platform(platform) == "unix"} { + if {![string compare $tcl_platform(platform) "unix"]} { $w.bot configure -relief raised -bd 1 $w.top configure -relief raised -bd 1 } @@ -61,19 +61,20 @@ proc tk_dialog {w title text bitmap default args} { pack $w.top -side top -fill both -expand 1 # 2. Fill the top part with bitmap and message (use the option - # database for -wraplength so that it can be overridden by - # the caller). + # database for -wraplength and -font so that they can be + # overridden by the caller). option add *Dialog.msg.wrapLength 3i widgetDefault - label $w.msg -justify left -text $text - if {$tcl_platform(platform) == "macintosh"} { - $w.msg configure -font system + if {![string compare $tcl_platform(platform) "macintosh"]} { + option add *Dialog.msg.font system widgetDefault } else { - $w.msg configure -font {Times 18} + option add *Dialog.msg.font {Times 18} widgetDefault } + + label $w.msg -justify left -text $text pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m - if {$bitmap != ""} { - if {($tcl_platform(platform) == "macintosh") && ($bitmap == "error")} { + if {[string compare $bitmap ""]} { + if {![string compare $tcl_platform(platform) "macintosh"] && ![string compare $bitmap "error"]} { set bitmap "stop" } label $w.bitmap -bitmap $bitmap @@ -93,9 +94,9 @@ proc tk_dialog {w title text bitmap default args} { grid $w.button$i -in $w.bot -column $i -row 0 -sticky ew -padx 10 grid columnconfigure $w.bot $i # We boost the size of some Mac buttons for l&f - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { set tmp [string tolower $but] - if {($tmp == "ok") || ($tmp == "cancel")} { + if {![string compare $tmp "ok"] || ![string compare $tmp "cancel"]} { grid columnconfigure $w.bot $i -minsize [expr 59 + 20] } } @@ -107,7 +108,7 @@ proc tk_dialog {w title text bitmap default args} { if {$default >= 0} { bind $w <Return> " - $w.button$default configure -state active -relief sunken + [list $w.button$default] configure -state active -relief sunken update idletasks after 100 set tkPriv(button) $default @@ -137,7 +138,7 @@ proc tk_dialog {w title text bitmap default args} { set oldFocus [focus] set oldGrab [grab current $w] - if {$oldGrab != ""} { + if {[string compare $oldGrab ""]} { set grabStatus [grab status $oldGrab] } grab $w @@ -163,11 +164,11 @@ proc tk_dialog {w title text bitmap default args} { bind $w <Destroy> {} destroy $w } - if {$oldGrab != ""} { - if {$grabStatus == "global"} { - grab -global $oldGrab - } else { + if {[string compare $oldGrab ""]} { + if {[string compare $grabStatus "global"]} { grab $oldGrab + } else { + grab -global $oldGrab } } return $tkPriv(button) diff --git a/library/entry.tcl b/library/entry.tcl index 1b817f4..e7141b1 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk entry widgets and provides # procedures that help in implementing those bindings. # -# RCS: @(#) $Id: entry.tcl,v 1.5 1998/09/14 18:23:23 stanton Exp $ +# RCS: @(#) $Id: entry.tcl,v 1.6 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -32,16 +32,14 @@ # The code below creates the default class bindings for entries. #------------------------------------------------------------------------- bind Entry <<Cut>> { - if {![catch {set data [string range [%W get] [%W index sel.first]\ - [expr {[%W index sel.last] - 1}]]}]} { + if {![catch {set data [tkEntryGetSelection %W]}]} { clipboard clear -displayof %W clipboard append -displayof %W $data %W delete sel.first sel.last } } bind Entry <<Copy>> { - if {![catch {set data [string range [%W get] [%W index sel.first]\ - [expr {[%W index sel.last] - 1}]]}]} { + if {![catch {set data [tkEntryGetSelection %W]}]} { clipboard clear -displayof %W clipboard append -displayof %W $data } @@ -49,7 +47,7 @@ bind Entry <<Copy>> { bind Entry <<Paste>> { global tcl_platform catch { - if {"$tcl_platform(platform)" != "unix"} { + if {[string compare $tcl_platform(platform) "unix"]} { catch { %W delete sel.first sel.last } @@ -201,13 +199,13 @@ bind Entry <Escape> {# nothing} bind Entry <Return> {# nothing} bind Entry <KP_Enter> {# nothing} bind Entry <Tab> {# nothing} -if {$tcl_platform(platform) == "macintosh"} { +if {![string compare $tcl_platform(platform) "macintosh"]} { bind Entry <Command-KeyPress> {# nothing} } # On Windows, paste is done using Shift-Insert. Shift-Insert already # generates the <<Paste>> event, so we don't need to do anything here. -if {$tcl_platform(platform) != "windows"} { +if {[string compare $tcl_platform(platform) "windows"]} { bind Entry <Insert> { catch {tkEntryInsert %W [selection get -displayof %W]} } @@ -335,7 +333,7 @@ proc tkEntryButton1 {w x} { set tkPriv(pressX) $x $w icursor [tkEntryClosestGap $w $x] $w selection from insert - if {[lindex [$w configure -state] 4] == "normal"} {focus $w} + if {![string compare [$w cget -state] "normal"]} {focus $w} } # tkEntryMouseSelect -- @@ -405,7 +403,7 @@ proc tkEntryPaste {w x} { $w icursor [tkEntryClosestGap $w $x] catch {$w insert insert [selection get -displayof $w]} - if {[lindex [$w configure -state] 4] == "normal"} {focus $w} + if {![string compare [$w cget -state] "normal"]} {focus $w} } # tkEntryAutoScan -- @@ -462,7 +460,7 @@ proc tkEntryKeySelect {w new} { # s - The string to insert (usually just a single character) proc tkEntryInsert {w s} { - if {$s == ""} { + if {![string compare $s ""]} { return } catch { @@ -570,7 +568,7 @@ proc tkEntryTranspose w { # w - The entry window in which the cursor is to move. # start - Position at which to start search. -if {$tcl_platform(platform) == "windows"} { +if {![string compare $tcl_platform(platform) "windows"]} { proc tkEntryNextWord {w start} { set pos [tcl_endOfWord [$w get] [$w index $start]] if {$pos >= 0} { @@ -607,4 +605,18 @@ proc tkEntryPreviousWord {w start} { } return $pos } +# tkEntryGetSelection -- +# +# Returns the selected text of the entry with respect to the -show option. +# +# Arguments: +# w - The entry window from which the text to get +proc tkEntryGetSelection {w} { + set entryString [string range [$w get] [$w index sel.first] \ + [expr [$w index sel.last] - 1]] + if {[$w cget -show] != ""} { + regsub -all . $entryString [string index [$w cget -show] 0] entryString + } + return $entryString +} diff --git a/library/focus.tcl b/library/focus.tcl index 276d518..5ece432 100644 --- a/library/focus.tcl +++ b/library/focus.tcl @@ -3,7 +3,7 @@ # This file defines several procedures for managing the input # focus. # -# RCS: @(#) $Id: focus.tcl,v 1.3 1998/09/14 18:23:23 stanton Exp $ +# RCS: @(#) $Id: focus.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1994-1995 Sun Microsystems, Inc. # @@ -38,7 +38,7 @@ proc tk_focusNext w { incr i if {$i < [llength $children]} { set cur [lindex $children $i] - if {[winfo toplevel $cur] == $cur} { + if {![string compare [winfo toplevel $cur] $cur]} { continue } else { break @@ -50,14 +50,14 @@ proc tk_focusNext w { # look for its next sibling. set cur $parent - if {[winfo toplevel $cur] == $cur} { + if {![string compare [winfo toplevel $cur] $cur]} { break } set parent [winfo parent $parent] set children [winfo children $parent] set i [lsearch -exact $children $cur] } - if {($cur == $w) || [tkFocusOK $cur]} { + if {![string compare $w $cur] || [tkFocusOK $cur]} { return $cur } } @@ -81,8 +81,8 @@ proc tk_focusPrev w { # Collect information about the current window's position # among its siblings. Also, if the window is a top-level, # then reposition to just after the last child of the window. - - if {[winfo toplevel $cur] == $cur} { + + if {![string compare [winfo toplevel $cur] $cur]} { set parent $cur set children [winfo children $cur] set i [llength $children] @@ -100,7 +100,7 @@ proc tk_focusPrev w { while {$i > 0} { incr i -1 set cur [lindex $children $i] - if {[winfo toplevel $cur] == $cur} { + if {![string compare [winfo toplevel $cur] $cur]} { continue } set parent $cur @@ -108,7 +108,7 @@ proc tk_focusPrev w { set i [llength $children] } set cur $parent - if {($cur == $w) || [tkFocusOK $cur]} { + if {![string compare $w $cur] || [tkFocusOK $cur]} { return $cur } } @@ -130,14 +130,14 @@ proc tk_focusPrev w { proc tkFocusOK w { set code [catch {$w cget -takefocus} value] - if {($code == 0) && ($value != "")} { + if {($code == 0) && [string compare $value ""]} { if {$value == 0} { return 0 } elseif {$value == 1} { return [winfo viewable $w] } else { set value [uplevel #0 $value $w] - if {$value != ""} { + if {[string compare $value ""]} { return $value } } @@ -146,7 +146,7 @@ proc tkFocusOK w { return 0 } set code [catch {$w cget -state} value] - if {($code == 0) && ($value == "disabled")} { + if {($code == 0) && ![string compare $value "disabled"]} { return 0 } regexp Key|Focus "[bind $w] [bind [winfo class $w]]" @@ -165,14 +165,15 @@ proc tkFocusOK w { proc tk_focusFollowsMouse {} { set old [bind all <Enter>] set script { - if {("%d" == "NotifyAncestor") || ("%d" == "NotifyNonlinear") - || ("%d" == "NotifyInferior")} { - if {[tkFocusOK %W]} { - focus %W - } + if {![string compare "%d" "NotifyAncestor"] + || ![string compare "%d" "NotifyNonlinear"] + || ![string compare "%d" "NotifyInferior"]} { + if {[tkFocusOK %W]} { + focus %W + } } } - if {$old != ""} { + if {[string compare $old ""]} { bind all <Enter> "$old; $script" } else { bind all <Enter> $script diff --git a/library/images/logo.eps b/library/images/logo.eps new file mode 100644 index 0000000..0d05d34 --- /dev/null +++ b/library/images/logo.eps @@ -0,0 +1,2091 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Adobe Illustrator(TM) 5.5 +%%For: (Bud Northern) (Mark Anderson Design) +%%Title: (TCL/TK LOGO.ILLUS) +%%CreationDate: (8/1/96) (4:58 PM) +%%BoundingBox: 251 331 371 512 +%%HiResBoundingBox: 251.3386 331.5616 370.5213 511.775 +%%DocumentProcessColors: Cyan Magenta Yellow +%%DocumentSuppliedResources: procset Adobe_level2_AI5 1.0 0 +%%+ procset Adobe_IllustratorA_AI5 1.0 0 +%AI5_FileFormat 1.2 +%AI3_ColorUsage: Color +%%DocumentCustomColors: (TCL RED) +%%CMYKCustomColor: 0 0.45 1 0 (Orange) +%%+ 0 0.25 1 0 (Orange Yellow) +%%+ 0 0.79 0.91 0 (TCL RED) +%AI3_TemplateBox: 306 396 306 396 +%AI3_TileBox: 12 12 600 780 +%AI3_DocumentPreview: Macintosh_ColorPic +%AI5_ArtSize: 612 792 +%AI5_RulerUnits: 0 +%AI5_ArtFlags: 1 0 0 1 0 0 1 1 0 +%AI5_TargetResolution: 800 +%AI5_NumLayers: 1 +%AI5_OpenToView: 90 576 2 938 673 18 1 1 2 40 +%AI5_OpenViewLayers: 7 +%%EndComments +%%BeginProlog +%%BeginResource: procset Adobe_level2_AI5 1.0 0 +%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation) +%%Version: 1.0 +%%CreationDate: (04/10/93) () +%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved) +userdict /Adobe_level2_AI5 21 dict dup begin + put + /packedarray where not + { + userdict begin + /packedarray + { + array astore readonly + } bind def + /setpacking /pop load def + /currentpacking false def + end + 0 + } if + pop + userdict /defaultpacking currentpacking put true setpacking + /initialize + { + Adobe_level2_AI5 begin + } bind def + /terminate + { + currentdict Adobe_level2_AI5 eq + { + end + } if + } bind def + mark + /setcustomcolor where not + { + /findcmykcustomcolor + { + 5 packedarray + } bind def + /setcustomcolor + { + exch aload pop pop + 4 + { + 4 index mul 4 1 roll + } repeat + 5 -1 roll pop + setcmykcolor + } + def + } if + + /gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def + userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put + userdict /level2? + systemdict /languagelevel known dup + { + pop systemdict /languagelevel get 2 ge + } if + put + level2? not + { + /setcmykcolor where not + { + /setcmykcolor + { + exch .11 mul add exch .59 mul add exch .3 mul add + 1 exch sub setgray + } def + } if + /currentcmykcolor where not + { + /currentcmykcolor + { + 0 0 0 1 currentgray sub + } def + } if + /setoverprint where not + { + /setoverprint /pop load def + } if + /selectfont where not + { + /selectfont + { + exch findfont exch + dup type /arraytype eq + { + makefont + } + { + scalefont + } ifelse + setfont + } bind def + } if + /cshow where not + { + /cshow + { + [ + 0 0 5 -1 roll aload pop + ] cvx bind forall + } bind def + } if + } if + cleartomark + /anyColor? + { + add add add 0 ne + } bind def + /testColor + { + gsave + setcmykcolor currentcmykcolor + grestore + } bind def + /testCMYKColorThrough + { + testColor anyColor? + } bind def + userdict /composite? + level2? + { + gsave 1 1 1 1 setcmykcolor currentcmykcolor grestore + add add add 4 eq + } + { + 1 0 0 0 testCMYKColorThrough + 0 1 0 0 testCMYKColorThrough + 0 0 1 0 testCMYKColorThrough + 0 0 0 1 testCMYKColorThrough + and and and + } ifelse + put + composite? not + { + userdict begin + gsave + /cyan? 1 0 0 0 testCMYKColorThrough def + /magenta? 0 1 0 0 testCMYKColorThrough def + /yellow? 0 0 1 0 testCMYKColorThrough def + /black? 0 0 0 1 testCMYKColorThrough def + grestore + /isCMYKSep? cyan? magenta? yellow? black? or or or def + /customColor? isCMYKSep? not def + end + } if + end defaultpacking setpacking +%%EndResource +%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0 +%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog) +%%Version: 1.1 +%%CreationDate: (3/7/1994) () +%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved) +currentpacking true setpacking +userdict /Adobe_IllustratorA_AI5_vars 70 dict dup begin +put +/_lp /none def +/_pf +{ +} def +/_ps +{ +} def +/_psf +{ +} def +/_pss +{ +} def +/_pjsf +{ +} def +/_pjss +{ +} def +/_pola 0 def +/_doClip 0 def +/cf currentflat def +/_tm matrix def +/_renderStart +[ +/e0 /r0 /a0 /o0 /e1 /r1 /a1 /i0 +] def +/_renderEnd +[ +null null null null /i1 /i1 /i1 /i1 +] def +/_render -1 def +/_rise 0 def +/_ax 0 def +/_ay 0 def +/_cx 0 def +/_cy 0 def +/_leading +[ +0 0 +] def +/_ctm matrix def +/_mtx matrix def +/_sp 16#020 def +/_hyphen (-) def +/_fScl 0 def +/_cnt 0 def +/_hs 1 def +/_nativeEncoding 0 def +/_useNativeEncoding 0 def +/_tempEncode 0 def +/_pntr 0 def +/_tDict 2 dict def +/_wv 0 def +/Tx +{ +} def +/Tj +{ +} def +/CRender +{ +} def +/_AI3_savepage +{ +} def +/_gf null def +/_cf 4 array def +/_if null def +/_of false def +/_fc +{ +} def +/_gs null def +/_cs 4 array def +/_is null def +/_os false def +/_sc +{ +} def +/discardSave null def +/buffer 256 string def +/beginString null def +/endString null def +/endStringLength null def +/layerCnt 1 def +/layerCount 1 def +/perCent (%) 0 get def +/perCentSeen? false def +/newBuff null def +/newBuffButFirst null def +/newBuffLast null def +/clipForward? false def +end +userdict /Adobe_IllustratorA_AI5 74 dict dup begin +put +/initialize +{ + Adobe_IllustratorA_AI5 dup begin + Adobe_IllustratorA_AI5_vars begin + discardDict + { + bind pop pop + } forall + dup /nc get begin + { + dup xcheck 1 index type /operatortype ne and + { + bind + } if + pop pop + } forall + end + newpath +} def +/terminate +{ + end + end +} def +/_ +null def +/ddef +{ + Adobe_IllustratorA_AI5_vars 3 1 roll put +} def +/xput +{ + dup load dup length exch maxlength eq + { + dup dup load dup + length 2 mul dict copy def + } if + load begin + def + end +} def +/npop +{ + { + pop + } repeat +} def +/sw +{ + dup length exch stringwidth + exch 5 -1 roll 3 index mul add + 4 1 roll 3 1 roll mul add +} def +/swj +{ + dup 4 1 roll + dup length exch stringwidth + exch 5 -1 roll 3 index mul add + 4 1 roll 3 1 roll mul add + 6 2 roll /_cnt 0 ddef + { + 1 index eq + { + /_cnt _cnt 1 add ddef + } if + } forall + pop + exch _cnt mul exch _cnt mul 2 index add 4 1 roll 2 index add 4 1 roll pop pop +} def +/ss +{ + 4 1 roll + { + 2 npop + (0) exch 2 copy 0 exch put pop + gsave + false charpath currentpoint + 4 index setmatrix + stroke + grestore + moveto + 2 copy rmoveto + } exch cshow + 3 npop +} def +/jss +{ + 4 1 roll + { + 2 npop + (0) exch 2 copy 0 exch put + gsave + _sp eq + { + exch 6 index 6 index 6 index 5 -1 roll widthshow + currentpoint + } + { + false charpath currentpoint + 4 index setmatrix stroke + } ifelse + grestore + moveto + 2 copy rmoveto + } exch cshow + 6 npop +} def +/sp +{ + { + 2 npop (0) exch + 2 copy 0 exch put pop + false charpath + 2 copy rmoveto + } exch cshow + 2 npop +} def +/jsp +{ + { + 2 npop + (0) exch 2 copy 0 exch put + _sp eq + { + exch 5 index 5 index 5 index 5 -1 roll widthshow + } + { + false charpath + } ifelse + 2 copy rmoveto + } exch cshow + 5 npop +} def +/pl +{ + transform + 0.25 sub round 0.25 add exch + 0.25 sub round 0.25 add exch + itransform +} def +/setstrokeadjust where +{ + pop true setstrokeadjust + /c + { + curveto + } def + /C + /c load def + /v + { + currentpoint 6 2 roll curveto + } def + /V + /v load def + /y + { + 2 copy curveto + } def + /Y + /y load def + /l + { + lineto + } def + /L + /l load def + /m + { + moveto + } def +} +{ + /c + { + pl curveto + } def + /C + /c load def + /v + { + currentpoint 6 2 roll pl curveto + } def + /V + /v load def + /y + { + pl 2 copy curveto + } def + /Y + /y load def + /l + { + pl lineto + } def + /L + /l load def + /m + { + pl moveto + } def +} ifelse +/d +{ + setdash +} def +/cf +{ +} def +/i +{ + dup 0 eq + { + pop cf + } if + setflat +} def +/j +{ + setlinejoin +} def +/J +{ + setlinecap +} def +/M +{ + setmiterlimit +} def +/w +{ + setlinewidth +} def +/H +{ +} def +/h +{ + closepath +} def +/N +{ + _pola 0 eq + { + _doClip 1 eq + { + clip /_doClip 0 ddef + } if + newpath + } + { + /CRender + { + N + } ddef + } ifelse +} def +/n +{ + N +} def +/F +{ + _pola 0 eq + { + _doClip 1 eq + { + gsave _pf grestore clip newpath /_lp /none ddef _fc + /_doClip 0 ddef + } + { + _pf + } ifelse + } + { + /CRender + { + F + } ddef + } ifelse +} def +/f +{ + closepath + F +} def +/S +{ + _pola 0 eq + { + _doClip 1 eq + { + gsave _ps grestore clip newpath /_lp /none ddef _sc + /_doClip 0 ddef + } + { + _ps + } ifelse + } + { + /CRender + { + S + } ddef + } ifelse +} def +/s +{ + closepath + S +} def +/B +{ + _pola 0 eq + { + _doClip 1 eq + gsave F grestore + { + gsave S grestore clip newpath /_lp /none ddef _sc + /_doClip 0 ddef + } + { + S + } ifelse + } + { + /CRender + { + B + } ddef + } ifelse +} def +/b +{ + closepath + B +} def +/W +{ + /_doClip 1 ddef +} def +/* +{ + count 0 ne + { + dup type /stringtype eq + { + pop + } if + } if + newpath +} def +/u +{ +} def +/U +{ +} def +/q +{ + _pola 0 eq + { + gsave + } if +} def +/Q +{ + _pola 0 eq + { + grestore + } if +} def +/*u +{ + _pola 1 add /_pola exch ddef +} def +/*U +{ + _pola 1 sub /_pola exch ddef + _pola 0 eq + { + CRender + } if +} def +/D +{ + pop +} def +/*w +{ +} def +/*W +{ +} def +/` +{ + /_i save ddef + clipForward? + { + nulldevice + } if + 6 1 roll 4 npop + concat pop + userdict begin + /showpage + { + } def + 0 setgray + 0 setlinecap + 1 setlinewidth + 0 setlinejoin + 10 setmiterlimit + [] 0 setdash + /setstrokeadjust where {pop false setstrokeadjust} if + newpath + 0 setgray + false setoverprint +} def +/~ +{ + end + _i restore +} def +/O +{ + 0 ne + /_of exch ddef + /_lp /none ddef +} def +/R +{ + 0 ne + /_os exch ddef + /_lp /none ddef +} def +/g +{ + /_gf exch ddef + /_fc + { + _lp /fill ne + { + _of setoverprint + _gf setgray + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/G +{ + /_gs exch ddef + /_sc + { + _lp /stroke ne + { + _os setoverprint + _gs setgray + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/k +{ + _cf astore pop + /_fc + { + _lp /fill ne + { + _of setoverprint + _cf aload pop setcmykcolor + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/K +{ + _cs astore pop + /_sc + { + _lp /stroke ne + { + _os setoverprint + _cs aload pop setcmykcolor + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/x +{ + /_gf exch ddef + findcmykcustomcolor + /_if exch ddef + /_fc + { + _lp /fill ne + { + _of setoverprint + _if _gf 1 exch sub setcustomcolor + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/X +{ + /_gs exch ddef + findcmykcustomcolor + /_is exch ddef + /_sc + { + _lp /stroke ne + { + _os setoverprint + _is _gs 1 exch sub setcustomcolor + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/A +{ + pop +} def +/annotatepage +{ +userdict /annotatepage 2 copy known {get exec} {pop pop} ifelse +} def +/discard +{ + save /discardSave exch store + discardDict begin + /endString exch store + gt38? + { + 2 add + } if + load + stopped + pop + end + discardSave restore +} bind def +userdict /discardDict 7 dict dup begin +put +/pre38Initialize +{ + /endStringLength endString length store + /newBuff buffer 0 endStringLength getinterval store + /newBuffButFirst newBuff 1 endStringLength 1 sub getinterval store + /newBuffLast newBuff endStringLength 1 sub 1 getinterval store +} def +/shiftBuffer +{ + newBuff 0 newBuffButFirst putinterval + newBuffLast 0 + currentfile read not + { + stop + } if + put +} def +0 +{ + pre38Initialize + mark + currentfile newBuff readstring exch pop + { + { + newBuff endString eq + { + cleartomark stop + } if + shiftBuffer + } loop + } + { + stop + } ifelse +} def +1 +{ + pre38Initialize + /beginString exch store + mark + currentfile newBuff readstring exch pop + { + { + newBuff beginString eq + { + /layerCount dup load 1 add store + } + { + newBuff endString eq + { + /layerCount dup load 1 sub store + layerCount 0 eq + { + cleartomark stop + } if + } if + } ifelse + shiftBuffer + } loop + } + { + stop + } ifelse +} def +2 +{ + mark + { + currentfile buffer readline not + { + stop + } if + endString eq + { + cleartomark stop + } if + } loop +} def +3 +{ + /beginString exch store + /layerCnt 1 store + mark + { + currentfile buffer readline not + { + stop + } if + dup beginString eq + { + pop /layerCnt dup load 1 add store + } + { + endString eq + { + layerCnt 1 eq + { + cleartomark stop + } + { + /layerCnt dup load 1 sub store + } ifelse + } if + } ifelse + } loop +} def +end +userdict /clipRenderOff 15 dict dup begin +put +{ + /n /N /s /S /f /F /b /B +} +{ + { + _doClip 1 eq + { + /_doClip 0 ddef clip + } if + newpath + } def +} forall +/Tr /pop load def +/Bb {} def +/BB /pop load def +/Bg {12 npop} def +/Bm {6 npop} def +/Bc /Bm load def +/Bh {4 npop} def +end +/Lb +{ + 4 npop + 6 1 roll + pop + 4 1 roll + pop pop pop + 0 eq + { + 0 eq + { + (%AI5_BeginLayer) 1 (%AI5_EndLayer--) discard + } + { + /clipForward? true def + + /Tx /pop load def + /Tj /pop load def + currentdict end clipRenderOff begin begin + } ifelse + } + { + 0 eq + { + save /discardSave exch store + } if + } ifelse +} bind def +/LB +{ + discardSave dup null ne + { + restore + } + { + pop + clipForward? + { + currentdict + end + end + begin + + /clipForward? false ddef + } if + } ifelse +} bind def +/Pb +{ + pop pop + 0 (%AI5_EndPalette) discard +} bind def +/Np +{ + 0 (%AI5_End_NonPrinting--) discard +} bind def +/Ln /pop load def +/Ap +/pop load def +/Ar +{ + 72 exch div + 0 dtransform dup mul exch dup mul add sqrt + dup 1 lt + { + pop 1 + } if + setflat +} def +/Mb +{ + q +} def +/Md +{ +} def +/MB +{ + Q +} def +/nc 3 dict def +nc begin +/setgray +{ + pop +} bind def +/setcmykcolor +{ + 4 npop +} bind def +/setcustomcolor +{ + 2 npop +} bind def +currentdict readonly pop +end +currentdict readonly pop +end +setpacking +%%EndResource +%%EndProlog +%%BeginSetup +Adobe_level2_AI5 /initialize get exec +Adobe_IllustratorA_AI5 /initialize get exec +%AI5_Begin_NonPrinting +Np +%AI3_BeginPattern: (Yellow Stripe) +(Yellow Stripe) 8.4499 4.6 80.4499 76.6 [ +%AI3_Tile +(0 O 0 R 0 0.4 1 0 k 0 0.4 1 0 K) @ +( +800 Ar +0 J 0 j 3.6 w 4 M []0 d +%AI3_Note: +0 D +8.1999 8.1999 m +80.6999 8.1999 L +S +8.1999 22.6 m +80.6999 22.6 L +S +8.1999 37.0001 m +80.6999 37.0001 L +S +8.1999 51.3999 m +80.6999 51.3999 L +S +8.1999 65.8 m +80.6999 65.8 L +S +8.1999 15.3999 m +80.6999 15.3999 L +S +8.1999 29.8 m +80.6999 29.8 L +S +8.1999 44.1999 m +80.6999 44.1999 L +S +8.1999 58.6 m +80.6999 58.6 L +S +8.1999 73.0001 m +80.6999 73.0001 L +S +) & +] E +%AI3_EndPattern +%AI5_End_NonPrinting-- +%AI5_Begin_NonPrinting +Np +3 Bn +%AI5_BeginGradient: (Black & White) +(Black & White) 0 2 Bd +[ +< +FFFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0EFEEEDECEBEAE9E8E7E6E5E4E3E2E1E0DFDEDDDCDBDAD9D8 +D7D6D5D4D3D2D1D0CFCECDCCCBCAC9C8C7C6C5C4C3C2C1C0BFBEBDBCBBBAB9B8B7B6B5B4B3B2B1B0 +AFAEADACABAAA9A8A7A6A5A4A3A2A1A09F9E9D9C9B9A999897969594939291908F8E8D8C8B8A8988 +87868584838281807F7E7D7C7B7A797877767574737271706F6E6D6C6B6A69686766656463626160 +5F5E5D5C5B5A595857565554535251504F4E4D4C4B4A494847464544434241403F3E3D3C3B3A3938 +37363534333231302F2E2D2C2B2A292827262524232221201F1E1D1C1B1A19181716151413121110 +0F0E0D0C0B0A09080706050403020100 +> +0 %_Br +[ +0 0 50 100 %_Bs +1 0 50 0 %_Bs +BD +%AI5_EndGradient +%AI5_BeginGradient: (Red & Yellow) +(Red & Yellow) 0 2 Bd +[ +0 +< +000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627 +28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F +505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071727374757677 +78797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F +A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7 +C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF +> +< +FFFFFEFEFDFDFDFCFCFBFBFBFAFAF9F9F9F8F8F7F7F7F6F6F5F5F5F4F4F3F3F3F2F2F1F1F1F0F0EF +EFEFEEEEEDEDEDECECEBEBEBEAEAE9E9E9E8E8E7E7E7E6E6E5E5E5E4E4E3E3E3E2E2E1E1E1E0E0DF +DFDFDEDEDDDDDDDCDCDBDBDBDADAD9D9D9D8D8D7D7D7D6D6D5D5D5D4D4D3D3D3D2D2D1D1D1D0D0CF +CFCFCECECDCDCDCCCCCBCBCBCACAC9C9C9C8C8C7C7C7C6C6C5C5C5C4C4C3C3C3C2C2C1C1C1C0C0BF +BFBFBEBEBDBDBDBCBCBBBBBBBABAB9B9B9B8B8B7B7B7B6B6B5B5B5B4B4B3B3B3B2B2B1B1B1B0B0AF +AFAFAEAEADADADACACABABABAAAAA9A9A9A8A8A7A7A7A6A6A5A5A5A4A4A3A3A3A2A2A1A1A1A0A09F +9F9F9E9E9D9D9D9C9C9B9B9B9A9A9999 +> +0 +1 %_Br +[ +0 1 0.6 0 1 50 100 %_Bs +0 0 1 0 1 50 0 %_Bs +BD +%AI5_EndGradient +%AI5_BeginGradient: (Yellow & Blue Radial) +(Yellow & Blue Radial) 1 2 Bd +[ +< +000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627 +28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F +505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071727374757677 +78797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F +A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7 +C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF +> +< +1415161718191A1B1C1D1E1F1F202122232425262728292A2A2B2C2D2E2F30313233343536363738 +393A3B3C3D3E3F40414142434445464748494A4B4C4D4D4E4F50515253545556575858595A5B5C5D +5E5F60616263646465666768696A6B6C6D6E6F6F707172737475767778797A7B7B7C7D7E7F808182 +83848586868788898A8B8C8D8E8F90919292939495969798999A9B9C9D9D9E9FA0A1A2A3A4A5A6A7 +A8A9A9AAABACADAEAFB0B1B2B3B4B4B5B6B7B8B9BABBBCBDBEBFC0C0C1C2C3C4C5C6C7C8C9CACBCB +CCCDCECFD0D1D2D3D4D5D6D7D7D8D9DADBDCDDDEDFE0E1E2E2E3E4E5E6E7E8E9EAEBECEDEEEEEFF0 +F1F2F3F4F5F6F7F8F9F9FAFBFCFDFEFF +> +< +ABAAAAA9A8A7A7A6A5A5A4A3A3A2A1A1A09F9F9E9D9D9C9B9B9A9999989797969595949393929191 +908F8F8E8D8D8C8B8B8A8989888787868585848383828181807F7F7E7D7D7C7B7B7A797978777776 +7575747373727171706F6F6E6D6D6C6B6B6A6969686767666565646362626160605F5E5E5D5C5C5B +5A5A5958585756565554545352525150504F4E4E4D4C4C4B4A4A4948484746464544444342424140 +403F3E3E3D3C3C3B3A3A3938383736363534343332323130302F2E2E2D2C2C2B2A2A292828272626 +25242423222121201F1F1E1D1D1C1B1B1A1919181717161515141313121111100F0F0E0D0D0C0B0B +0A090908070706050504030302010100 +> +0 +1 %_Br +[ +0 0.08 0.67 0 1 50 14 %_Bs +1 1 0 0 1 50 100 %_Bs +BD +%AI5_EndGradient +%AI5_End_NonPrinting-- +%AI5_BeginPalette +144 170 Pb +Pn +Pc +1 g +Pc +0 g +Pc +0 0 0 0 k +Pc +0.75 g +Pc +0.5 g +Pc +0.25 g +Pc +0 g +Pc +Bb +2 (Black & White) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0.25 0 0 0 k +Pc +0.5 0 0 0 k +Pc +0.75 0 0 0 k +Pc +1 0 0 0 k +Pc +0.25 0.25 0 0 k +Pc +0.5 0.5 0 0 k +Pc +0.75 0.75 0 0 k +Pc +1 1 0 0 k +Pc +Bb +2 (Red & Yellow) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0 0.25 0 0 k +Pc +0 0.5 0 0 k +Pc +0 0.75 0 0 k +Pc +0 1 0 0 k +Pc +0 0.25 0.25 0 k +Pc +0 0.5 0.5 0 k +Pc +0 0.75 0.75 0 k +Pc +0 1 1 0 k +Pc +Bb +0 0 0 0 Bh +2 (Yellow & Blue Radial) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0 0 0.25 0 k +Pc +0 0 0.5 0 k +Pc +0 0 0.75 0 k +Pc +0 0 1 0 k +Pc +0.25 0 0.25 0 k +Pc +0.5 0 0.5 0 k +Pc +0.75 0 0.75 0 k +Pc +1 0 1 0 k +Pc +(Yellow Stripe) 0 0 1 1 0 0 0 0 0 [1 0 0 1 0 0] p +Pc +0.25 0.125 0 0 k +Pc +0.5 0.25 0 0 k +Pc +0.75 0.375 0 0 k +Pc +1 0.5 0 0 k +Pc +0.125 0.25 0 0 k +Pc +0.25 0.5 0 0 k +Pc +0.375 0.75 0 0 k +Pc +0.5 1 0 0 k +Pc +0.375 0.375 0.75 0 k +Pc +0 0.25 0.125 0 k +Pc +0 0.5 0.25 0 k +Pc +0 0.75 0.375 0 k +Pc +0 1 0.5 0 k +Pc +0 0.125 0.25 0 k +Pc +0 0.25 0.5 0 k +Pc +0 0.375 0.75 0 k +Pc +0 0.5 1 0 k +Pc +0 0.79 0.91 0 (TCL RED) 0 x +Pc +0.125 0 0.25 0 k +Pc +0.25 0 0.5 0 k +Pc +0.375 0 0.75 0 k +Pc +0.5 0 1 0 k +Pc +0.25 0 0.125 0 k +Pc +0.5 0 0.25 0 k +Pc +0.75 0 0.375 0 k +Pc +1 0 0.5 0 k +Pc +0.5 1 0 0 k +Pc +0.25 0.125 0.125 0 k +Pc +0.5 0.25 0.25 0 k +Pc +0.75 0.375 0.375 0 k +Pc +1 0.5 0.5 0 k +Pc +0.25 0.25 0.125 0 k +Pc +0.5 0.5 0.25 0 k +Pc +0.75 0.75 0.375 0 k +Pc +1 1 0.5 0 k +Pc +0 1 0.5 0 k +Pc +0.125 0.25 0.125 0 k +Pc +0.25 0.5 0.25 0 k +Pc +0.375 0.75 0.375 0 k +Pc +0.5 1 0.5 0 k +Pc +0.125 0.25 0.25 0 k +Pc +0.25 0.5 0.5 0 k +Pc +0.375 0.75 0.75 0 k +Pc +0.5 1 1 0 k +Pc +0.75 0.75 0.375 0 k +Pc +0.125 0.125 0.25 0 k +Pc +0.25 0.25 0.5 0 k +Pc +0.375 0.375 0.75 0 k +Pc +0.5 0.5 1 0 k +Pc +0.25 0.125 0.25 0 k +Pc +0.5 0.25 0.5 0 k +Pc +0.75 0.375 0.75 0 k +Pc +1 0.5 1 0 k +Pc +0 0.79 0.91 0 (TCL RED) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0.5 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.25 1 0 (Orange Yellow) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 1 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.45 1 0 (Orange) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0.375 0.375 0.75 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.79 0.91 0 (TCL RED) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0.65 0 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0 1 0 k +Pc +PB +%AI5_EndPalette +%%EndSetup +%AI5_BeginLayer +1 1 1 1 0 0 0 79 128 255 Lb +(Layer 1) Ln +0 A +u +1 Ap +0 O +0 0.79 0.91 0 (TCL RED) 0 x +800 Ar +0 J 0 j 1.25 w 4 M []0 d +%AI3_Note: +0 D +294.5207 335.3041 m +368.2181 333.001 L +363.6121 423.9713 L +370.5213 507.1689 L +336.5513 505.4417 L +320.7179 511.775 L +251.3386 508.0325 L +254.7931 425.9866 L +251.3386 331.5616 L +294.5207 335.3041 L +f +u +0 Ap +1 0.65 0 0 k +1 w +318.1366 400.9627 m +311.8663 399.2526 l +315.2864 407.5177 l +318.7064 430.6032 l +314.4314 431.4581 l +319.5616 438.5832 l +325.9526 462.6014 l +314.7164 460.2436 l +320.6412 471.0911 326.9284 478.1557 v +318.7064 484.469 l +292.2183 472.8011 299.3434 434.8954 v +293.8679 435.8542 l +299.1189 396.1175 l +294.6797 394.9775 l +299.2277 385.6974 305.5963 381.2973 v +306.1744 380.8979 297.6162 412.3629 306.7363 443.7133 c +307.5914 441.7183 l +300.3238 408.3015 307.5914 381.2973 v +307.9261 380.656 311.5598 381.0836 v +318.1366 393.4813 318.1366 400.9627 v +f +u +*u +1 g +271.4311 372.5074 m +272.7184 372.5074 L +272.7184 375.1913 L +273.2858 375.1913 273.8313 375.1913 274.3768 375.2786 c +274.3768 372.5074 L +276.2969 372.5074 L +276.2969 372.0056 L +274.3768 372.0056 L +274.3768 365.3286 L +274.3768 364.9359 274.3768 364.3467 275.2059 364.3467 c +275.7733 364.3467 276.0787 364.7395 276.4279 365.1541 c +276.777 364.9141 L +276.3624 364.0849 275.2932 363.583 274.4204 363.583 c +272.8494 363.583 272.6748 364.434 272.6748 365.4814 c +272.6748 372.0056 L +271.4311 372.0056 L +271.4311 372.5074 l +f +*U +*u +290.5617 366.5724 m +290.0598 365.0232 289.187 363.6703 286.9178 363.583 c +283.5356 363.583 282.5101 366.3978 282.5101 367.9034 c +282.5101 371.7874 285.6304 372.7256 286.8741 372.7256 c +288.2924 372.7256 290.2999 372.071 290.2999 370.3909 c +290.2999 369.8018 289.9289 369.2344 289.318 369.2344 c +288.7288 369.2344 288.2924 369.6272 288.2924 370.26 c +288.2924 371.111 288.9907 371.2201 288.9907 371.4601 c +288.9907 372.0492 287.616 372.2892 287.136 372.2892 c +285.0412 372.2892 284.4957 370.7618 284.4957 367.9034 c +284.4957 366.5942 284.823 365.5905 284.9539 365.285 c +285.2812 364.5649 285.9577 364.1067 287.0923 364.0413 c +288.3579 363.9758 289.5798 365.0013 290.1035 366.5724 C +290.5617 366.5724 l +f +*U +*u +296.6 363.8667 m +296.6 364.3686 L +298.2802 364.3686 L +298.2802 378.3989 L +296.6 378.3989 L +296.6 378.9007 L +297.5383 378.9007 L +298.3457 378.9007 299.1966 378.9444 299.9822 379.0971 c +299.9822 364.3686 L +301.6623 364.3686 L +301.6623 363.8667 L +296.6 363.8667 l +f +*U +*u +317.4527 372.5074 m +318.7401 372.5074 L +318.7401 375.1913 L +319.3074 375.1913 319.8529 375.1913 320.3984 375.2786 c +320.3984 372.5074 L +322.3186 372.5074 L +322.3186 372.0056 L +320.3984 372.0056 L +320.3984 365.3286 L +320.3984 364.9359 320.3984 364.3467 321.2276 364.3467 c +321.7949 364.3467 322.1004 364.7395 322.4495 365.1541 c +322.7986 364.9141 L +322.384 364.0849 321.3148 363.583 320.442 363.583 c +318.871 363.583 318.6964 364.434 318.6964 365.4814 c +318.6964 372.0056 L +317.4527 372.0056 L +317.4527 372.5074 l +f +*U +*u +333.7467 372.0056 m +333.7467 372.5074 L +337.3252 372.5074 L +337.3252 372.0056 L +335.9942 372.0056 L +332.983 369.3872 L +337.1288 364.3686 L +338.0453 364.3686 L +338.0453 363.8667 L +333.8995 363.8667 L +333.8995 364.3686 L +334.9905 364.3686 L +331.3465 368.798 L +335.0341 371.9401 L +335.0341 372.0056 L +333.7467 372.0056 l +f +328.4881 363.8667 m +328.4881 364.3686 L +329.6227 364.3686 L +329.6227 378.3989 L +328.4881 378.3989 L +328.4881 378.9007 L +328.8809 378.9007 L +329.6882 378.9007 330.5392 378.9444 331.3247 379.0971 c +331.3247 364.3686 L +332.6339 364.3686 L +332.6339 363.8667 L +328.4881 363.8667 l +f +*U +u +309.5341 446.5364 m +305.6878 429.3874 306.7947 401.5837 v +307.1266 393.2441 308.0387 385.5779 309.1527 378.9301 C +309.1587 378.9297 L +309.8832 373.0923 310.3679 370.9791 312.2568 363.9454 C +312.1466 359.4091 L +297.0216 407.7015 309.5341 446.5364 V +f +318.8187 461.4058 m +322.2203 463.1 327.0966 463.7165 v +332.427 453.9463 319.3087 437.2655 v +327.1346 454.735 325.2889 460.2079 v +323.225 461.4903 318.8187 461.4058 v +f +317.2065 432.0795 m +320.2613 431.3723 321.7279 432.5601 v +318.8383 421.2839 319.5958 415.0813 v +320.3533 408.8787 314.8881 404.9079 y +319.5435 410.7982 318.0802 415.5959 v +317.0657 418.9214 318.2006 427.4326 319.4809 430.1349 c +318.2853 430.3025 317.2065 432.0795 v +f +314.1861 402.3703 m +319.2343 402.9744 319.7646 405.5244 v +320.3824 390.2725 313.3689 383.9873 v +318.7204 392.3347 317.8807 400.9697 v +314.1861 402.3703 l +f +299.9864 396.0219 m +298.3586 394.1986 293.4739 398.2203 v +295.0301 387.9694 304.6978 383.2767 v +298.0444 388.2897 296.2519 393.7045 v +298.6029 394.3966 299.9864 396.0219 v +f +298.4281 399.9096 m +291.8229 416.6749 293.2382 439.3286 v +294.7808 435.2261 299.738 433.7875 v +297.4026 433.3101 296.0372 433.517 v +292.5816 423.9535 298.4281 399.9096 v +f +326.1736 477.812 m +323.6983 496.0028 308.2122 477.6066 v +295.8813 462.9582 297.3508 450.5217 298.1072 443.5831 c +298.3007 441.8079 295.8131 462.1138 309.3231 475.4768 c +322.8328 488.8398 325.8846 478.5879 326.1736 477.812 c +f +U +0 0 1 0 k +303.3623 493.3274 m +291.211 496.7978 287.3437 456.5222 v +284.3599 468.9535 292.0777 486.5353 v +299.7955 504.1172 303.3623 493.3274 y +f +288.2873 496.2718 m +282.0897 486.9502 283.4958 477.0213 v +278.7953 495.712 288.2873 496.2718 v +f +333.8987 470.1328 m +341.2276 472.8361 330.7334 445.5571 v +336.1654 453.5292 339.5844 466.0531 v +341.7789 474.0903 333.8987 470.1328 y +f +345.752 472.2583 m +350.9334 467.5681 347.2615 461.3636 v +356.4779 471.0481 345.752 472.2583 v +f +U +*u +273.1765 354.3318 m +273.1765 353.7507 273.1305 353.2908 272.5159 353.2908 c +271.8846 353.2908 271.8554 353.7674 271.8554 354.3318 c +271.8554 356.485 L +272.148 356.485 L +272.148 354.3486 L +272.148 353.8259 272.1773 353.5751 272.5159 353.5751 c +272.8504 353.5751 272.8839 353.8259 272.8839 354.3486 c +272.8839 356.485 L +273.1765 356.485 L +273.1765 354.3318 l +f +*U +*u +277.1612 356.485 m +276.9062 356.485 L +276.9062 354.3862 l +276.9062 354.2482 276.9271 354.1061 276.9355 353.9681 C +276.9229 353.9681 l +276.8937 354.0768 276.8644 354.1855 276.8268 354.2942 C +276.1035 356.485 L +275.8484 356.485 L +275.8484 353.3326 L +276.1035 353.3326 L +276.1035 355.2474 l +276.1035 355.4523 276.0826 355.653 276.07 355.8579 C +276.0867 355.8579 l +276.1244 355.7241 276.1495 355.5819 276.1954 355.4523 C +276.9062 353.3326 L +277.1612 353.3326 l +277.1612 356.485 L +f +*U +*u +280.1421 353.3326 m +279.8494 353.3326 L +279.8494 356.485 L +280.1421 356.485 L +280.1421 353.3326 l +f +*U +*u +283.5141 353.3326 m +283.2549 353.3326 L +282.6194 356.485 L +282.9205 356.485 L +283.3344 354.1897 L +283.3511 354.1102 283.3678 353.9054 283.3845 353.7632 c +283.4013 353.7632 L +283.4138 353.9054 283.4305 354.1144 283.4431 354.1897 c +283.8528 356.485 L +284.1496 356.485 L +283.5141 353.3326 l +f +*U +*u +287.6238 356.2174 m +286.9256 356.2174 L +286.9256 355.1053 L +287.6029 355.1053 L +287.6029 354.8377 L +286.9256 354.8377 L +286.9256 353.6002 L +287.6238 353.6002 L +287.6238 353.3326 L +286.6329 353.3326 L +286.6329 356.485 L +287.6238 356.485 L +287.6238 356.2174 l +f +*U +*u +290.2278 353.3326 m +290.2278 356.485 L +290.5414 356.485 L +290.9804 356.485 291.4026 356.4515 291.4026 355.6823 c +291.4026 355.2809 291.3148 354.8879 290.8089 354.8712 c +291.5072 353.3326 L +291.1978 353.3326 L +290.5288 354.8753 L +290.5205 354.8753 L +290.5205 353.3326 L +290.2278 353.3326 l +f +290.5205 355.1137 m +290.625 355.1137 L +291.0347 355.1137 291.1016 355.2558 291.1016 355.6697 c +291.1016 356.1672 290.9511 356.2174 290.579 356.2174 c +290.5205 356.2174 L +290.5205 355.1137 l +f +*U +*u +295.0981 355.9875 m +294.9727 356.1296 294.8347 356.2425 294.634 356.2425 c +294.3414 356.2425 294.1783 356 294.1783 355.7324 c +294.1783 355.3645 294.4459 355.1931 294.7176 355.0091 c +294.9852 354.821 295.2528 354.6203 295.2528 354.1855 c +295.2528 353.7256 294.9559 353.2908 294.4626 353.2908 c +294.287 353.2908 294.1072 353.341 293.9651 353.4497 c +293.9651 353.8301 L +294.0989 353.688 294.2745 353.5751 294.4751 353.5751 c +294.7845 353.5751 294.9559 353.8468 294.9518 354.1311 c +294.9559 354.4991 294.6842 354.6621 294.4166 354.8503 c +294.149 355.0342 293.8773 355.2391 293.8773 355.6906 c +293.8773 356.1129 294.1365 356.5268 294.6006 356.5268 c +294.7887 356.5268 294.9476 356.4641 295.0981 356.3596 C +295.0981 355.9875 l +f +*U +*u +299.0865 353.3326 m +298.773 353.3326 L +298.6559 353.9806 L +297.9869 353.9806 L +297.8741 353.3326 L +297.5605 353.3326 L +298.1793 356.485 L +298.4552 356.485 L +299.0865 353.3326 l +f +298.6099 354.2357 m +298.4009 355.444 L +298.3632 355.6572 298.3465 355.8746 298.3214 356.0878 c +298.3047 356.0878 L +298.2754 355.8746 298.2545 355.6572 298.2211 355.444 c +298.0371 354.2357 L +298.6099 354.2357 l +f +*U +*u +301.8124 353.6002 m +302.4981 353.6002 L +302.4981 353.3326 L +301.5198 353.3326 L +301.5198 356.485 L +301.8124 356.485 L +301.8124 353.6002 l +f +*U +*u +309.0754 355.9875 m +308.95 356.1296 308.812 356.2425 308.6114 356.2425 c +308.3187 356.2425 308.1556 356 308.1556 355.7324 c +308.1556 355.3645 308.4232 355.1931 308.695 355.0091 c +308.9626 354.821 309.2301 354.6203 309.2301 354.1855 c +309.2301 353.7256 308.9333 353.2908 308.4399 353.2908 c +308.2643 353.2908 308.0846 353.341 307.9424 353.4497 c +307.9424 353.8301 L +308.0762 353.688 308.2518 353.5751 308.4525 353.5751 c +308.7619 353.5751 308.9333 353.8468 308.9291 354.1311 c +308.9333 354.4991 308.6615 354.6621 308.3939 354.8503 c +308.1264 355.0342 307.8546 355.2391 307.8546 355.6906 c +307.8546 356.1129 308.1138 356.5268 308.5779 356.5268 c +308.766 356.5268 308.9249 356.4641 309.0754 356.3596 C +309.0754 355.9875 l +f +*U +*u +312.9468 353.7172 m +312.8339 353.6378 312.7001 353.5751 312.558 353.5751 c +311.9977 353.5751 311.9977 354.5492 311.9977 354.9172 c +311.9977 355.5025 312.0688 356.2425 312.5789 356.2425 c +312.7252 356.2425 312.8297 356.184 312.9468 356.1045 C +312.9468 356.4265 l +312.8506 356.4975 312.6918 356.5268 312.5747 356.5268 c +311.7134 356.5268 311.6967 355.306 311.6967 354.7959 c +311.6967 354.2566 311.8054 353.2908 312.5454 353.2908 c +312.6834 353.2908 312.8381 353.3451 312.9468 353.4204 c +312.9468 353.7172 L +f +*U +*u +315.5053 353.3326 m +315.5053 356.485 L +315.8188 356.485 L +316.2578 356.485 316.6801 356.4515 316.6801 355.6823 c +316.6801 355.2809 316.5923 354.8879 316.0864 354.8712 c +316.7846 353.3326 L +316.4752 353.3326 L +315.8063 354.8753 L +315.7979 354.8753 L +315.7979 353.3326 L +315.5053 353.3326 l +f +315.7979 355.1137 m +315.9025 355.1137 L +316.3122 355.1137 316.3791 355.2558 316.3791 355.6697 c +316.3791 356.1672 316.2286 356.2174 315.8565 356.2174 c +315.7979 356.2174 L +315.7979 355.1137 l +f +*U +*u +319.5728 353.3326 m +319.2802 353.3326 L +319.2802 356.485 L +319.5728 356.485 L +319.5728 353.3326 l +f +*U +*u +322.2551 353.3326 m +322.2551 356.485 L +322.5812 356.485 L +323.0327 356.485 323.4341 356.4432 323.4341 355.6655 c +323.4341 355.0551 323.2209 354.8419 322.623 354.8419 c +322.5477 354.8419 L +322.5477 353.3326 L +322.2551 353.3326 l +f +322.5477 355.1095 m +322.6606 355.1095 L +323.0703 355.1095 323.1205 355.26 323.1331 355.6655 c +323.1331 356.1004 323.016 356.2174 322.6063 356.2174 c +322.5477 356.2174 L +322.5477 355.1095 l +f +*U +*u +326.9539 356.485 m +325.7164 356.485 L +325.7164 356.2174 L +326.1888 356.2174 L +326.1888 353.3326 L +326.4815 353.3326 L +326.4815 356.2174 L +326.9539 356.2174 l +326.9539 356.485 L +f +*U +*u +329.7077 353.3326 m +329.4151 353.3326 L +329.4151 356.485 L +329.7077 356.485 L +329.7077 353.3326 l +f +*U +*u +333.7028 353.3326 m +333.4477 353.3326 L +332.737 355.4523 L +332.691 355.5819 332.6659 355.7241 332.6283 355.8579 c +332.6116 355.8579 L +332.6241 355.653 332.645 355.4523 332.645 355.2474 c +332.645 353.3326 L +332.39 353.3326 L +332.39 356.485 L +332.645 356.485 L +333.3683 354.2942 L +333.4059 354.1855 333.4352 354.0768 333.4645 353.9681 c +333.477 353.9681 L +333.4686 354.1061 333.4477 354.2482 333.4477 354.3862 c +333.4477 356.485 L +333.7028 356.485 L +333.7028 353.3326 l +f +*U +*u +336.9846 354.9966 m +337.7037 354.9966 L +337.7037 354.4154 L +337.7037 353.9179 337.6787 353.2908 337.0264 353.2908 c +336.3617 353.2908 336.299 353.989 336.299 354.9841 c +336.299 355.7283 336.3868 356.5268 337.0557 356.5268 c +337.432 356.5268 337.6201 356.276 337.6996 355.9331 c +337.4111 355.8202 L +337.3776 356.0084 337.2982 356.2425 337.0682 356.2425 c +336.6334 356.2383 336.6 355.5652 336.6 355.0091 c +336.6 353.8427 336.7463 353.5751 337.0515 353.5751 c +337.3818 353.5751 337.4111 353.8176 337.4111 354.4907 c +337.4111 354.729 L +336.9846 354.729 L +336.9846 354.9966 l +f +*U +U +U +337.6667 -3924 m +(N) * +337.6667 4716 m +(N) * +LB +%AI5_EndLayer-- +%%PageTrailer +gsave annotatepage grestore showpage +%%Trailer +Adobe_IllustratorA_AI5 /terminate get exec +Adobe_level2_AI5 /terminate get exec +%%EOF diff --git a/library/images/pwrdLogo.eps b/library/images/pwrdLogo.eps new file mode 100644 index 0000000..e11d9e9 --- /dev/null +++ b/library/images/pwrdLogo.eps @@ -0,0 +1,1897 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Adobe Illustrator(TM) 5.5 +%%For: (Bud Northern) (Mark Anderson Design) +%%Title: (TCL PWRD LOGO.ILLUS) +%%CreationDate: (8/1/96) (4:59 PM) +%%BoundingBox: 242 302 377 513 +%%HiResBoundingBox: 242.0523 302.5199 376.3322 512.5323 +%%DocumentProcessColors: Cyan Magenta Yellow +%%DocumentSuppliedResources: procset Adobe_level2_AI5 1.0 0 +%%+ procset Adobe_IllustratorA_AI5 1.0 0 +%AI5_FileFormat 1.2 +%AI3_ColorUsage: Color +%%CMYKCustomColor: 0 0.45 1 0 (Orange) +%%+ 0 0.25 1 0 (Orange Yellow) +%%+ 0 0.79 0.91 0 (PANTONE Warm Red CV) +%%+ 0 0.79 0.91 0 (TCL RED) +%AI3_TemplateBox: 306 396 306 396 +%AI3_TileBox: 12 12 600 780 +%AI3_DocumentPreview: Macintosh_ColorPic +%AI5_ArtSize: 612 792 +%AI5_RulerUnits: 0 +%AI5_ArtFlags: 1 0 0 1 0 0 1 1 0 +%AI5_TargetResolution: 800 +%AI5_NumLayers: 1 +%AI5_OpenToView: 102 564 2 938 673 18 1 1 2 40 +%AI5_OpenViewLayers: 7 +%%EndComments +%%BeginProlog +%%BeginResource: procset Adobe_level2_AI5 1.0 0 +%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation) +%%Version: 1.0 +%%CreationDate: (04/10/93) () +%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved) +userdict /Adobe_level2_AI5 21 dict dup begin + put + /packedarray where not + { + userdict begin + /packedarray + { + array astore readonly + } bind def + /setpacking /pop load def + /currentpacking false def + end + 0 + } if + pop + userdict /defaultpacking currentpacking put true setpacking + /initialize + { + Adobe_level2_AI5 begin + } bind def + /terminate + { + currentdict Adobe_level2_AI5 eq + { + end + } if + } bind def + mark + /setcustomcolor where not + { + /findcmykcustomcolor + { + 5 packedarray + } bind def + /setcustomcolor + { + exch aload pop pop + 4 + { + 4 index mul 4 1 roll + } repeat + 5 -1 roll pop + setcmykcolor + } + def + } if + + /gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def + userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put + userdict /level2? + systemdict /languagelevel known dup + { + pop systemdict /languagelevel get 2 ge + } if + put + level2? not + { + /setcmykcolor where not + { + /setcmykcolor + { + exch .11 mul add exch .59 mul add exch .3 mul add + 1 exch sub setgray + } def + } if + /currentcmykcolor where not + { + /currentcmykcolor + { + 0 0 0 1 currentgray sub + } def + } if + /setoverprint where not + { + /setoverprint /pop load def + } if + /selectfont where not + { + /selectfont + { + exch findfont exch + dup type /arraytype eq + { + makefont + } + { + scalefont + } ifelse + setfont + } bind def + } if + /cshow where not + { + /cshow + { + [ + 0 0 5 -1 roll aload pop + ] cvx bind forall + } bind def + } if + } if + cleartomark + /anyColor? + { + add add add 0 ne + } bind def + /testColor + { + gsave + setcmykcolor currentcmykcolor + grestore + } bind def + /testCMYKColorThrough + { + testColor anyColor? + } bind def + userdict /composite? + level2? + { + gsave 1 1 1 1 setcmykcolor currentcmykcolor grestore + add add add 4 eq + } + { + 1 0 0 0 testCMYKColorThrough + 0 1 0 0 testCMYKColorThrough + 0 0 1 0 testCMYKColorThrough + 0 0 0 1 testCMYKColorThrough + and and and + } ifelse + put + composite? not + { + userdict begin + gsave + /cyan? 1 0 0 0 testCMYKColorThrough def + /magenta? 0 1 0 0 testCMYKColorThrough def + /yellow? 0 0 1 0 testCMYKColorThrough def + /black? 0 0 0 1 testCMYKColorThrough def + grestore + /isCMYKSep? cyan? magenta? yellow? black? or or or def + /customColor? isCMYKSep? not def + end + } if + end defaultpacking setpacking +%%EndResource +%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0 +%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog) +%%Version: 1.1 +%%CreationDate: (3/7/1994) () +%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved) +currentpacking true setpacking +userdict /Adobe_IllustratorA_AI5_vars 70 dict dup begin +put +/_lp /none def +/_pf +{ +} def +/_ps +{ +} def +/_psf +{ +} def +/_pss +{ +} def +/_pjsf +{ +} def +/_pjss +{ +} def +/_pola 0 def +/_doClip 0 def +/cf currentflat def +/_tm matrix def +/_renderStart +[ +/e0 /r0 /a0 /o0 /e1 /r1 /a1 /i0 +] def +/_renderEnd +[ +null null null null /i1 /i1 /i1 /i1 +] def +/_render -1 def +/_rise 0 def +/_ax 0 def +/_ay 0 def +/_cx 0 def +/_cy 0 def +/_leading +[ +0 0 +] def +/_ctm matrix def +/_mtx matrix def +/_sp 16#020 def +/_hyphen (-) def +/_fScl 0 def +/_cnt 0 def +/_hs 1 def +/_nativeEncoding 0 def +/_useNativeEncoding 0 def +/_tempEncode 0 def +/_pntr 0 def +/_tDict 2 dict def +/_wv 0 def +/Tx +{ +} def +/Tj +{ +} def +/CRender +{ +} def +/_AI3_savepage +{ +} def +/_gf null def +/_cf 4 array def +/_if null def +/_of false def +/_fc +{ +} def +/_gs null def +/_cs 4 array def +/_is null def +/_os false def +/_sc +{ +} def +/discardSave null def +/buffer 256 string def +/beginString null def +/endString null def +/endStringLength null def +/layerCnt 1 def +/layerCount 1 def +/perCent (%) 0 get def +/perCentSeen? false def +/newBuff null def +/newBuffButFirst null def +/newBuffLast null def +/clipForward? false def +end +userdict /Adobe_IllustratorA_AI5 74 dict dup begin +put +/initialize +{ + Adobe_IllustratorA_AI5 dup begin + Adobe_IllustratorA_AI5_vars begin + discardDict + { + bind pop pop + } forall + dup /nc get begin + { + dup xcheck 1 index type /operatortype ne and + { + bind + } if + pop pop + } forall + end + newpath +} def +/terminate +{ + end + end +} def +/_ +null def +/ddef +{ + Adobe_IllustratorA_AI5_vars 3 1 roll put +} def +/xput +{ + dup load dup length exch maxlength eq + { + dup dup load dup + length 2 mul dict copy def + } if + load begin + def + end +} def +/npop +{ + { + pop + } repeat +} def +/sw +{ + dup length exch stringwidth + exch 5 -1 roll 3 index mul add + 4 1 roll 3 1 roll mul add +} def +/swj +{ + dup 4 1 roll + dup length exch stringwidth + exch 5 -1 roll 3 index mul add + 4 1 roll 3 1 roll mul add + 6 2 roll /_cnt 0 ddef + { + 1 index eq + { + /_cnt _cnt 1 add ddef + } if + } forall + pop + exch _cnt mul exch _cnt mul 2 index add 4 1 roll 2 index add 4 1 roll pop pop +} def +/ss +{ + 4 1 roll + { + 2 npop + (0) exch 2 copy 0 exch put pop + gsave + false charpath currentpoint + 4 index setmatrix + stroke + grestore + moveto + 2 copy rmoveto + } exch cshow + 3 npop +} def +/jss +{ + 4 1 roll + { + 2 npop + (0) exch 2 copy 0 exch put + gsave + _sp eq + { + exch 6 index 6 index 6 index 5 -1 roll widthshow + currentpoint + } + { + false charpath currentpoint + 4 index setmatrix stroke + } ifelse + grestore + moveto + 2 copy rmoveto + } exch cshow + 6 npop +} def +/sp +{ + { + 2 npop (0) exch + 2 copy 0 exch put pop + false charpath + 2 copy rmoveto + } exch cshow + 2 npop +} def +/jsp +{ + { + 2 npop + (0) exch 2 copy 0 exch put + _sp eq + { + exch 5 index 5 index 5 index 5 -1 roll widthshow + } + { + false charpath + } ifelse + 2 copy rmoveto + } exch cshow + 5 npop +} def +/pl +{ + transform + 0.25 sub round 0.25 add exch + 0.25 sub round 0.25 add exch + itransform +} def +/setstrokeadjust where +{ + pop true setstrokeadjust + /c + { + curveto + } def + /C + /c load def + /v + { + currentpoint 6 2 roll curveto + } def + /V + /v load def + /y + { + 2 copy curveto + } def + /Y + /y load def + /l + { + lineto + } def + /L + /l load def + /m + { + moveto + } def +} +{ + /c + { + pl curveto + } def + /C + /c load def + /v + { + currentpoint 6 2 roll pl curveto + } def + /V + /v load def + /y + { + pl 2 copy curveto + } def + /Y + /y load def + /l + { + pl lineto + } def + /L + /l load def + /m + { + pl moveto + } def +} ifelse +/d +{ + setdash +} def +/cf +{ +} def +/i +{ + dup 0 eq + { + pop cf + } if + setflat +} def +/j +{ + setlinejoin +} def +/J +{ + setlinecap +} def +/M +{ + setmiterlimit +} def +/w +{ + setlinewidth +} def +/H +{ +} def +/h +{ + closepath +} def +/N +{ + _pola 0 eq + { + _doClip 1 eq + { + clip /_doClip 0 ddef + } if + newpath + } + { + /CRender + { + N + } ddef + } ifelse +} def +/n +{ + N +} def +/F +{ + _pola 0 eq + { + _doClip 1 eq + { + gsave _pf grestore clip newpath /_lp /none ddef _fc + /_doClip 0 ddef + } + { + _pf + } ifelse + } + { + /CRender + { + F + } ddef + } ifelse +} def +/f +{ + closepath + F +} def +/S +{ + _pola 0 eq + { + _doClip 1 eq + { + gsave _ps grestore clip newpath /_lp /none ddef _sc + /_doClip 0 ddef + } + { + _ps + } ifelse + } + { + /CRender + { + S + } ddef + } ifelse +} def +/s +{ + closepath + S +} def +/B +{ + _pola 0 eq + { + _doClip 1 eq + gsave F grestore + { + gsave S grestore clip newpath /_lp /none ddef _sc + /_doClip 0 ddef + } + { + S + } ifelse + } + { + /CRender + { + B + } ddef + } ifelse +} def +/b +{ + closepath + B +} def +/W +{ + /_doClip 1 ddef +} def +/* +{ + count 0 ne + { + dup type /stringtype eq + { + pop + } if + } if + newpath +} def +/u +{ +} def +/U +{ +} def +/q +{ + _pola 0 eq + { + gsave + } if +} def +/Q +{ + _pola 0 eq + { + grestore + } if +} def +/*u +{ + _pola 1 add /_pola exch ddef +} def +/*U +{ + _pola 1 sub /_pola exch ddef + _pola 0 eq + { + CRender + } if +} def +/D +{ + pop +} def +/*w +{ +} def +/*W +{ +} def +/` +{ + /_i save ddef + clipForward? + { + nulldevice + } if + 6 1 roll 4 npop + concat pop + userdict begin + /showpage + { + } def + 0 setgray + 0 setlinecap + 1 setlinewidth + 0 setlinejoin + 10 setmiterlimit + [] 0 setdash + /setstrokeadjust where {pop false setstrokeadjust} if + newpath + 0 setgray + false setoverprint +} def +/~ +{ + end + _i restore +} def +/O +{ + 0 ne + /_of exch ddef + /_lp /none ddef +} def +/R +{ + 0 ne + /_os exch ddef + /_lp /none ddef +} def +/g +{ + /_gf exch ddef + /_fc + { + _lp /fill ne + { + _of setoverprint + _gf setgray + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/G +{ + /_gs exch ddef + /_sc + { + _lp /stroke ne + { + _os setoverprint + _gs setgray + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/k +{ + _cf astore pop + /_fc + { + _lp /fill ne + { + _of setoverprint + _cf aload pop setcmykcolor + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/K +{ + _cs astore pop + /_sc + { + _lp /stroke ne + { + _os setoverprint + _cs aload pop setcmykcolor + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/x +{ + /_gf exch ddef + findcmykcustomcolor + /_if exch ddef + /_fc + { + _lp /fill ne + { + _of setoverprint + _if _gf 1 exch sub setcustomcolor + /_lp /fill ddef + } if + } ddef + /_pf + { + _fc + fill + } ddef + /_psf + { + _fc + ashow + } ddef + /_pjsf + { + _fc + awidthshow + } ddef + /_lp /none ddef +} def +/X +{ + /_gs exch ddef + findcmykcustomcolor + /_is exch ddef + /_sc + { + _lp /stroke ne + { + _os setoverprint + _is _gs 1 exch sub setcustomcolor + /_lp /stroke ddef + } if + } ddef + /_ps + { + _sc + stroke + } ddef + /_pss + { + _sc + ss + } ddef + /_pjss + { + _sc + jss + } ddef + /_lp /none ddef +} def +/A +{ + pop +} def +/annotatepage +{ +userdict /annotatepage 2 copy known {get exec} {pop pop} ifelse +} def +/discard +{ + save /discardSave exch store + discardDict begin + /endString exch store + gt38? + { + 2 add + } if + load + stopped + pop + end + discardSave restore +} bind def +userdict /discardDict 7 dict dup begin +put +/pre38Initialize +{ + /endStringLength endString length store + /newBuff buffer 0 endStringLength getinterval store + /newBuffButFirst newBuff 1 endStringLength 1 sub getinterval store + /newBuffLast newBuff endStringLength 1 sub 1 getinterval store +} def +/shiftBuffer +{ + newBuff 0 newBuffButFirst putinterval + newBuffLast 0 + currentfile read not + { + stop + } if + put +} def +0 +{ + pre38Initialize + mark + currentfile newBuff readstring exch pop + { + { + newBuff endString eq + { + cleartomark stop + } if + shiftBuffer + } loop + } + { + stop + } ifelse +} def +1 +{ + pre38Initialize + /beginString exch store + mark + currentfile newBuff readstring exch pop + { + { + newBuff beginString eq + { + /layerCount dup load 1 add store + } + { + newBuff endString eq + { + /layerCount dup load 1 sub store + layerCount 0 eq + { + cleartomark stop + } if + } if + } ifelse + shiftBuffer + } loop + } + { + stop + } ifelse +} def +2 +{ + mark + { + currentfile buffer readline not + { + stop + } if + endString eq + { + cleartomark stop + } if + } loop +} def +3 +{ + /beginString exch store + /layerCnt 1 store + mark + { + currentfile buffer readline not + { + stop + } if + dup beginString eq + { + pop /layerCnt dup load 1 add store + } + { + endString eq + { + layerCnt 1 eq + { + cleartomark stop + } + { + /layerCnt dup load 1 sub store + } ifelse + } if + } ifelse + } loop +} def +end +userdict /clipRenderOff 15 dict dup begin +put +{ + /n /N /s /S /f /F /b /B +} +{ + { + _doClip 1 eq + { + /_doClip 0 ddef clip + } if + newpath + } def +} forall +/Tr /pop load def +/Bb {} def +/BB /pop load def +/Bg {12 npop} def +/Bm {6 npop} def +/Bc /Bm load def +/Bh {4 npop} def +end +/Lb +{ + 4 npop + 6 1 roll + pop + 4 1 roll + pop pop pop + 0 eq + { + 0 eq + { + (%AI5_BeginLayer) 1 (%AI5_EndLayer--) discard + } + { + /clipForward? true def + + /Tx /pop load def + /Tj /pop load def + currentdict end clipRenderOff begin begin + } ifelse + } + { + 0 eq + { + save /discardSave exch store + } if + } ifelse +} bind def +/LB +{ + discardSave dup null ne + { + restore + } + { + pop + clipForward? + { + currentdict + end + end + begin + + /clipForward? false ddef + } if + } ifelse +} bind def +/Pb +{ + pop pop + 0 (%AI5_EndPalette) discard +} bind def +/Np +{ + 0 (%AI5_End_NonPrinting--) discard +} bind def +/Ln /pop load def +/Ap +/pop load def +/Ar +{ + 72 exch div + 0 dtransform dup mul exch dup mul add sqrt + dup 1 lt + { + pop 1 + } if + setflat +} def +/Mb +{ + q +} def +/Md +{ +} def +/MB +{ + Q +} def +/nc 3 dict def +nc begin +/setgray +{ + pop +} bind def +/setcmykcolor +{ + 4 npop +} bind def +/setcustomcolor +{ + 2 npop +} bind def +currentdict readonly pop +end +currentdict readonly pop +end +setpacking +%%EndResource +%%EndProlog +%%BeginSetup +Adobe_level2_AI5 /initialize get exec +Adobe_IllustratorA_AI5 /initialize get exec +%AI5_Begin_NonPrinting +Np +%AI3_BeginPattern: (Yellow Stripe) +(Yellow Stripe) 8.4499 4.6 80.4499 76.6 [ +%AI3_Tile +(0 O 0 R 0 0.4 1 0 k 0 0.4 1 0 K) @ +( +800 Ar +0 J 0 j 3.6 w 4 M []0 d +%AI3_Note: +0 D +8.1999 8.1999 m +80.6999 8.1999 L +S +8.1999 22.6 m +80.6999 22.6 L +S +8.1999 37.0001 m +80.6999 37.0001 L +S +8.1999 51.3999 m +80.6999 51.3999 L +S +8.1999 65.8 m +80.6999 65.8 L +S +8.1999 15.3999 m +80.6999 15.3999 L +S +8.1999 29.8 m +80.6999 29.8 L +S +8.1999 44.1999 m +80.6999 44.1999 L +S +8.1999 58.6 m +80.6999 58.6 L +S +8.1999 73.0001 m +80.6999 73.0001 L +S +) & +] E +%AI3_EndPattern +%AI5_End_NonPrinting-- +%AI5_Begin_NonPrinting +Np +3 Bn +%AI5_BeginGradient: (Black & White) +(Black & White) 0 2 Bd +[ +< +FFFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0EFEEEDECEBEAE9E8E7E6E5E4E3E2E1E0DFDEDDDCDBDAD9D8 +D7D6D5D4D3D2D1D0CFCECDCCCBCAC9C8C7C6C5C4C3C2C1C0BFBEBDBCBBBAB9B8B7B6B5B4B3B2B1B0 +AFAEADACABAAA9A8A7A6A5A4A3A2A1A09F9E9D9C9B9A999897969594939291908F8E8D8C8B8A8988 +87868584838281807F7E7D7C7B7A797877767574737271706F6E6D6C6B6A69686766656463626160 +5F5E5D5C5B5A595857565554535251504F4E4D4C4B4A494847464544434241403F3E3D3C3B3A3938 +37363534333231302F2E2D2C2B2A292827262524232221201F1E1D1C1B1A19181716151413121110 +0F0E0D0C0B0A09080706050403020100 +> +0 %_Br +[ +0 0 50 100 %_Bs +1 0 50 0 %_Bs +BD +%AI5_EndGradient +%AI5_BeginGradient: (Red & Yellow) +(Red & Yellow) 0 2 Bd +[ +0 +< +000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627 +28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F +505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071727374757677 +78797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F +A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7 +C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF +> +< +FFFFFEFEFDFDFDFCFCFBFBFBFAFAF9F9F9F8F8F7F7F7F6F6F5F5F5F4F4F3F3F3F2F2F1F1F1F0F0EF +EFEFEEEEEDEDEDECECEBEBEBEAEAE9E9E9E8E8E7E7E7E6E6E5E5E5E4E4E3E3E3E2E2E1E1E1E0E0DF +DFDFDEDEDDDDDDDCDCDBDBDBDADAD9D9D9D8D8D7D7D7D6D6D5D5D5D4D4D3D3D3D2D2D1D1D1D0D0CF +CFCFCECECDCDCDCCCCCBCBCBCACAC9C9C9C8C8C7C7C7C6C6C5C5C5C4C4C3C3C3C2C2C1C1C1C0C0BF +BFBFBEBEBDBDBDBCBCBBBBBBBABAB9B9B9B8B8B7B7B7B6B6B5B5B5B4B4B3B3B3B2B2B1B1B1B0B0AF +AFAFAEAEADADADACACABABABAAAAA9A9A9A8A8A7A7A7A6A6A5A5A5A4A4A3A3A3A2A2A1A1A1A0A09F +9F9F9E9E9D9D9D9C9C9B9B9B9A9A9999 +> +0 +1 %_Br +[ +0 1 0.6 0 1 50 100 %_Bs +0 0 1 0 1 50 0 %_Bs +BD +%AI5_EndGradient +%AI5_BeginGradient: (Yellow & Blue Radial) +(Yellow & Blue Radial) 1 2 Bd +[ +< +000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627 +28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F +505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071727374757677 +78797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F +A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7 +C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF +> +< +1415161718191A1B1C1D1E1F1F202122232425262728292A2A2B2C2D2E2F30313233343536363738 +393A3B3C3D3E3F40414142434445464748494A4B4C4D4D4E4F50515253545556575858595A5B5C5D +5E5F60616263646465666768696A6B6C6D6E6F6F707172737475767778797A7B7B7C7D7E7F808182 +83848586868788898A8B8C8D8E8F90919292939495969798999A9B9C9D9D9E9FA0A1A2A3A4A5A6A7 +A8A9A9AAABACADAEAFB0B1B2B3B4B4B5B6B7B8B9BABBBCBDBEBFC0C0C1C2C3C4C5C6C7C8C9CACBCB +CCCDCECFD0D1D2D3D4D5D6D7D7D8D9DADBDCDDDEDFE0E1E2E2E3E4E5E6E7E8E9EAEBECEDEEEEEFF0 +F1F2F3F4F5F6F7F8F9F9FAFBFCFDFEFF +> +< +ABAAAAA9A8A7A7A6A5A5A4A3A3A2A1A1A09F9F9E9D9D9C9B9B9A9999989797969595949393929191 +908F8F8E8D8D8C8B8B8A8989888787868585848383828181807F7F7E7D7D7C7B7B7A797978777776 +7575747373727171706F6F6E6D6D6C6B6B6A6969686767666565646362626160605F5E5E5D5C5C5B +5A5A5958585756565554545352525150504F4E4E4D4C4C4B4A4A4948484746464544444342424140 +403F3E3E3D3C3C3B3A3A3938383736363534343332323130302F2E2E2D2C2C2B2A2A292828272626 +25242423222121201F1F1E1D1D1C1B1B1A1919181717161515141313121111100F0F0E0D0D0C0B0B +0A090908070706050504030302010100 +> +0 +1 %_Br +[ +0 0.08 0.67 0 1 50 14 %_Bs +1 1 0 0 1 50 100 %_Bs +BD +%AI5_EndGradient +%AI5_End_NonPrinting-- +%AI5_BeginPalette +144 161 Pb +Pn +Pc +1 g +Pc +0 g +Pc +0 0 0 0 k +Pc +0.75 g +Pc +0.5 g +Pc +0.25 g +Pc +0 g +Pc +Bb +2 (Black & White) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0.25 0 0 0 k +Pc +0.5 0 0 0 k +Pc +0.75 0 0 0 k +Pc +1 0 0 0 k +Pc +0.25 0.25 0 0 k +Pc +0.5 0.5 0 0 k +Pc +0.75 0.75 0 0 k +Pc +1 1 0 0 k +Pc +Bb +2 (Red & Yellow) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0 0.25 0 0 k +Pc +0 0.5 0 0 k +Pc +0 0.75 0 0 k +Pc +0 1 0 0 k +Pc +0 0.25 0.25 0 k +Pc +0 0.5 0.5 0 k +Pc +0 0.75 0.75 0 k +Pc +0 1 1 0 k +Pc +Bb +0 0 0 0 Bh +2 (Yellow & Blue Radial) -4014 4716 0 0 1 0 0 1 0 0 Bg +0 BB +Pc +0 0 0.25 0 k +Pc +0 0 0.5 0 k +Pc +0 0 0.75 0 k +Pc +0 0 1 0 k +Pc +0.25 0 0.25 0 k +Pc +0.5 0 0.5 0 k +Pc +0.75 0 0.75 0 k +Pc +1 0 1 0 k +Pc +(Yellow Stripe) 0 0 1 1 0 0 0 0 0 [1 0 0 1 0 0] p +Pc +0.25 0.125 0 0 k +Pc +0.5 0.25 0 0 k +Pc +0.75 0.375 0 0 k +Pc +1 0.5 0 0 k +Pc +0.125 0.25 0 0 k +Pc +0.25 0.5 0 0 k +Pc +0.375 0.75 0 0 k +Pc +0.5 1 0 0 k +Pc +0.375 0.375 0.75 0 k +Pc +0 0.25 0.125 0 k +Pc +0 0.5 0.25 0 k +Pc +0 0.75 0.375 0 k +Pc +0 1 0.5 0 k +Pc +0 0.125 0.25 0 k +Pc +0 0.25 0.5 0 k +Pc +0 0.375 0.75 0 k +Pc +0 0.5 1 0 k +Pc +0 0.79 0.91 0 (PANTONE Warm Red CV) 0 x +Pc +0.125 0 0.25 0 k +Pc +0.25 0 0.5 0 k +Pc +0.375 0 0.75 0 k +Pc +0.5 0 1 0 k +Pc +0.25 0 0.125 0 k +Pc +0.5 0 0.25 0 k +Pc +0.75 0 0.375 0 k +Pc +1 0 0.5 0 k +Pc +0.5 1 0 0 k +Pc +0.25 0.125 0.125 0 k +Pc +0.5 0.25 0.25 0 k +Pc +0.75 0.375 0.375 0 k +Pc +1 0.5 0.5 0 k +Pc +0.25 0.25 0.125 0 k +Pc +0.5 0.5 0.25 0 k +Pc +0.75 0.75 0.375 0 k +Pc +1 1 0.5 0 k +Pc +0 1 0.5 0 k +Pc +0.125 0.25 0.125 0 k +Pc +0.25 0.5 0.25 0 k +Pc +0.375 0.75 0.375 0 k +Pc +0.5 1 0.5 0 k +Pc +0.125 0.25 0.25 0 k +Pc +0.25 0.5 0.5 0 k +Pc +0.375 0.75 0.75 0 k +Pc +0.5 1 1 0 k +Pc +0.75 0.75 0.375 0 k +Pc +0.125 0.125 0.25 0 k +Pc +0.25 0.25 0.5 0 k +Pc +0.375 0.375 0.75 0 k +Pc +0.5 0.5 1 0 k +Pc +0.25 0.125 0.25 0 k +Pc +0.5 0.25 0.5 0 k +Pc +0.75 0.375 0.75 0 k +Pc +1 0.5 1 0 k +Pc +0 0.79 0.91 0 (PANTONE Warm Red CV) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0.5 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.25 1 0 (Orange Yellow) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 1 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0 0.5 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.45 1 0 (Orange) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0.375 0.375 0.75 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0.79 0.91 0 (PANTONE Warm Red CV) 0 x +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +1 0.65 0 0 k +Pc +0 0 0 0 k +Pc +Pc +Pc +Pc +Pc +Pc +Pc +Pc +0 0 1 0 k +Pc +PB +%AI5_EndPalette +%%EndSetup +%AI5_BeginLayer +1 1 1 1 0 0 0 79 128 255 Lb +(Layer 1) Ln +0 A +1 Ap +0 O +1 0.65 0 0 k +800 Ar +0 J 0 j 1 w 4 M []0 d +%AI3_Note: +0 D +285.0121 311.7976 m +357.5043 302.5199 L +361.6071 392.7105 L +376.3322 474.1377 L +342.6527 475.6628 L +327.6333 483.4165 L +258.8269 486.3189 L +254.4361 405.0427 L +242.0523 312.2099 L +285.0121 311.7976 L +f +0 0.79 0.91 0 k +1.25 w +295.4466 337.6172 m +368.4943 335.3343 L +363.9288 425.5026 L +370.7771 507.9667 L +337.1066 506.2547 L +321.4128 512.5323 L +252.6452 508.8228 L +256.0692 427.5002 L +252.6452 333.9077 L +295.4466 337.6172 L +f +u +0 Ap +1 0.65 0 0 k +1 w +320.532 390.6149 m +312.9017 388.534 l +317.0637 398.5921 l +321.2256 426.6854 l +316.0232 427.7258 l +322.2662 436.3965 l +330.0436 465.6249 l +316.3701 462.7557 l +323.5798 475.9563 331.2311 484.5534 v +321.2256 492.2363 l +288.9913 478.0373 297.6622 431.9088 v +290.9988 433.0755 l +297.3888 384.7188 l +291.9867 383.3315 l +297.5214 372.0383 305.2714 366.6837 v +305.9749 366.1976 295.5601 404.4882 306.6587 442.6395 c +307.6992 440.2117 l +298.855 399.5459 307.6992 366.6837 v +308.1064 365.9033 312.5286 366.4235 v +320.532 381.5106 320.532 390.6149 v +f +u +*u +1 g +263.6948 355.9856 m +265.2612 355.9856 L +265.2612 359.2513 L +265.9515 359.2513 266.6153 359.2513 267.2791 359.3575 c +267.2791 355.9856 L +269.6155 355.9856 L +269.6155 355.3749 L +267.2791 355.3749 L +267.2791 347.2505 L +267.2791 346.7726 267.2791 346.0558 268.288 346.0558 c +268.9783 346.0558 269.35 346.5337 269.7748 347.0381 c +270.1996 346.7461 L +269.6951 345.7372 268.3942 345.1265 267.3322 345.1265 c +265.4205 345.1265 265.2081 346.162 265.2081 347.4364 c +265.2081 355.3749 L +263.6948 355.3749 L +263.6948 355.9856 l +f +*U +*u +285.7796 348.7639 m +285.1689 346.8788 284.1069 345.2327 281.3457 345.1265 c +277.2304 345.1265 275.9825 348.5515 275.9825 350.3835 c +275.9825 355.1094 279.7792 356.2511 281.2926 356.2511 c +283.0184 356.2511 285.461 355.4546 285.461 353.4102 c +285.461 352.6934 285.0096 352.003 284.2662 352.003 c +283.5494 352.003 283.0184 352.481 283.0184 353.2509 c +283.0184 354.2864 283.868 354.4191 283.868 354.7112 c +283.868 355.428 282.1953 355.7201 281.6112 355.7201 c +279.0624 355.7201 278.3986 353.8616 278.3986 350.3835 c +278.3986 348.7905 278.7969 347.5691 278.9562 347.1974 c +279.3544 346.3213 280.1775 345.7637 281.5581 345.6841 c +283.098 345.6044 284.5848 346.8523 285.222 348.7639 C +285.7796 348.7639 l +f +*U +*u +291.9344 345.4717 m +291.9344 346.0823 L +293.9788 346.0823 L +293.9788 363.1542 L +291.9344 363.1542 L +291.9344 363.7648 L +293.0761 363.7648 L +294.0585 363.7648 295.0939 363.8179 296.0497 364.0038 c +296.0497 346.0823 L +298.0941 346.0823 L +298.0941 345.4717 L +291.9344 345.4717 l +f +*U +u +310.0634 446.075 m +305.3828 425.2059 306.7298 391.3708 v +307.1338 381.222 308.2436 371.8929 309.5993 363.8029 C +309.6066 363.8025 L +310.4883 356.6987 311.0781 354.1272 313.3768 345.5676 C +313.2426 340.0473 L +294.8367 398.8155 310.0634 446.075 V +f +321.3622 464.1699 m +325.5016 466.2317 331.4359 466.9819 v +337.9224 455.0924 321.9584 434.793 v +331.4821 456.0522 329.2358 462.7122 v +326.7243 464.2727 321.3622 464.1699 v +f +319.4002 428.4819 m +323.1177 427.6214 324.9024 429.0668 v +321.386 415.3445 322.3077 407.7964 v +323.2297 400.2483 316.5788 395.4159 y +322.2441 402.584 320.4635 408.4226 v +319.2289 412.4694 320.6101 422.8271 322.1681 426.1155 c +320.7131 426.3196 319.4002 428.4819 v +f +315.7246 392.3281 m +321.8677 393.0631 322.5131 396.1662 v +323.265 377.6058 314.7299 369.9571 v +321.2425 380.1152 320.2206 390.6235 v +315.7246 392.3281 l +f +298.4445 384.6023 m +296.4635 382.3836 290.5192 387.2778 v +292.4131 374.803 304.1781 369.0924 v +296.0814 375.1928 293.9 381.7824 v +296.7611 382.6245 298.4445 384.6023 v +f +296.5483 389.3335 m +288.5102 409.7356 290.2325 437.3036 v +292.1098 432.3112 298.1424 430.5604 v +295.3003 429.9794 293.6387 430.2313 v +289.4335 418.5932 296.5483 389.3335 v +f +330.3126 484.1353 m +327.3003 506.2722 308.4549 483.8853 v +293.4491 466.0592 295.2373 450.9247 296.1578 442.4811 c +296.3932 440.3206 293.366 465.0316 309.8067 481.2933 c +326.2471 497.5553 329.9609 485.0794 330.3126 484.1353 c +f +U +0 0 1 0 k +302.5528 503.0164 m +287.7656 507.2395 283.0593 458.227 v +279.4282 473.3549 288.8204 494.7509 v +298.2122 516.1468 302.5528 503.0164 y +f +284.2076 506.5994 m +276.6655 495.2557 278.3767 483.1729 v +272.6565 505.9183 284.2076 506.5994 v +f +339.7135 474.7902 m +348.6321 478.0799 335.8615 444.8834 v +342.4718 454.5848 346.6326 469.8253 v +349.303 479.6062 339.7135 474.7902 y +f +354.1382 477.3767 m +360.4435 471.669 355.9752 464.1187 v +367.1908 475.904 354.1382 477.3767 v +f +U +U +*u +1 g +258.2029 317.4593 m +256.6821 317.4593 L +256.6821 325.2598 L +258.7512 325.2598 L +260.3858 325.2598 261.4514 324.608 261.4514 322.839 c +261.4514 321.1837 260.5513 320.3767 258.9581 320.3767 c +258.2029 320.3767 L +258.2029 317.4593 l +f +1 D +258.2029 321.6389 m +258.5132 321.6389 L +259.4133 321.6389 259.8995 321.8354 259.8995 322.8493 c +259.8995 323.8528 259.3202 323.9976 258.4719 323.9976 c +258.2029 323.9976 L +258.2029 321.6389 l +f +*U +*u +0 D +269.0694 321.3699 m +269.0694 323.5528 270.6523 325.4667 272.9283 325.4667 c +275.2043 325.4667 276.7871 323.5528 276.7871 321.3699 c +276.7871 319.1353 275.2043 317.2524 272.9283 317.2524 c +270.6523 317.2524 269.0694 319.1353 269.0694 321.3699 c +f +1 D +270.6419 321.432 m +270.6419 320.2526 271.6351 318.7525 272.9283 318.7525 c +274.2215 318.7525 275.2146 320.2526 275.2146 321.432 c +275.2146 322.6941 274.2628 323.9666 272.9283 323.9666 c +271.5937 323.9666 270.6419 322.6941 270.6419 321.432 c +f +*U +*u +0 D +287.2943 319.9422 m +287.315 319.9422 L +288.8668 325.3632 L +289.7668 325.3632 L +291.3807 319.9422 L +291.4014 319.9422 L +292.9326 325.2598 L +294.5258 325.2598 L +291.8877 317.3041 L +290.7704 317.3041 L +289.2185 322.4044 L +289.1978 322.4044 L +287.7288 317.3041 L +286.6115 317.3041 L +284.1286 325.2598 L +285.7218 325.2598 L +287.2943 319.9422 l +f +*U +*u +303.7595 323.9356 m +303.7595 322.2182 L +306.1803 322.2182 L +306.1803 320.894 L +303.7595 320.894 L +303.7595 318.7835 L +306.2734 318.7835 L +306.2734 317.4593 L +302.2387 317.4593 L +302.2387 325.2598 L +306.2734 325.2598 L +306.2734 323.9356 L +303.7595 323.9356 l +f +*U +*u +319.8602 317.4593 m +318.0187 317.4593 L +316.1255 320.6043 L +316.1048 320.6043 L +316.1048 317.4593 L +314.5841 317.4593 L +314.5841 325.2598 L +316.6428 325.2598 L +318.1843 325.2598 319.2499 324.577 319.2499 322.9114 c +319.2499 321.9182 318.7015 320.925 317.6567 320.7492 C +319.8602 317.4593 l +f +1 D +316.1048 321.6699 m +316.3014 321.6699 L +317.1394 321.6699 317.7291 321.9182 317.7291 322.87 c +317.7291 323.8321 317.1187 324.0183 316.3117 324.0183 c +316.1048 324.0183 L +316.1048 321.6699 l +f +*U +*u +0 D +329.1754 323.9356 m +329.1754 322.2182 L +331.5962 322.2182 L +331.5962 320.894 L +329.1754 320.894 L +329.1754 318.7835 L +331.6894 318.7835 L +331.6894 317.4593 L +327.6546 317.4593 L +327.6546 325.2598 L +331.6894 325.2598 L +331.6894 323.9356 L +329.1754 323.9356 l +f +*U +*u +340 325.2598 m +342.1725 325.2598 L +344.4279 325.2598 345.9383 323.5735 345.9383 321.3492 c +345.9383 319.156 344.3865 317.4593 342.1622 317.4593 c +340 317.4593 L +340 325.2598 l +f +1 D +341.5208 318.7835 m +341.7691 318.7835 L +343.6416 318.7835 344.3658 319.8181 344.3658 321.3596 c +344.3658 323.0562 343.4968 323.9356 341.7691 323.9356 c +341.5208 323.9356 L +341.5208 318.7835 l +f +*U +LB +%AI5_EndLayer-- +%%PageTrailer +gsave annotatepage grestore showpage +%%Trailer +Adobe_IllustratorA_AI5 /terminate get exec +Adobe_level2_AI5 /terminate get exec +%%EOF diff --git a/library/images/pwrdLogo100.gif b/library/images/pwrdLogo100.gif Binary files differindex 42c5b30..eea4fba 100644 --- a/library/images/pwrdLogo100.gif +++ b/library/images/pwrdLogo100.gif diff --git a/library/images/pwrdLogo150.gif b/library/images/pwrdLogo150.gif Binary files differindex e2e6b7a..bf62548 100644 --- a/library/images/pwrdLogo150.gif +++ b/library/images/pwrdLogo150.gif diff --git a/library/images/pwrdLogo175.gif b/library/images/pwrdLogo175.gif Binary files differindex 67d9536..7733fdd 100644 --- a/library/images/pwrdLogo175.gif +++ b/library/images/pwrdLogo175.gif diff --git a/library/images/pwrdLogo200.gif b/library/images/pwrdLogo200.gif Binary files differindex 6bff472..965cb4b 100644 --- a/library/images/pwrdLogo200.gif +++ b/library/images/pwrdLogo200.gif diff --git a/library/images/pwrdLogo75.gif b/library/images/pwrdLogo75.gif Binary files differindex 1c6b11a..3a2b16e 100644 --- a/library/images/pwrdLogo75.gif +++ b/library/images/pwrdLogo75.gif diff --git a/library/images/tai-ku.gif b/library/images/tai-ku.gif Binary files differnew file mode 100644 index 0000000..a5aea47 --- /dev/null +++ b/library/images/tai-ku.gif diff --git a/library/listbox.tcl b/library/listbox.tcl index 45f0b9b..f77ecb3 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: listbox.tcl,v 1.4 1998/10/10 00:30:36 rjohnson Exp $ +# RCS: @(#) $Id: listbox.tcl,v 1.5 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -120,6 +120,7 @@ bind Listbox <Control-Home> { %W see 0 %W selection clear 0 end %W selection set 0 + event generate %W <<ListboxSelect>> } bind Listbox <Shift-Control-Home> { tkListboxDataExtend %W 0 @@ -129,12 +130,13 @@ bind Listbox <Control-End> { %W see end %W selection clear 0 end %W selection set end + event generate %W <<ListboxSelect>> } bind Listbox <Shift-Control-End> { tkListboxDataExtend %W [%W index end] } bind Listbox <<Copy>> { - if {[selection own -displayof %W] == "%W"} { + if {![string compare [selection own -displayof %W] "%W"]} { clipboard clear -displayof %W clipboard append -displayof %W [selection get -displayof %W] } @@ -158,8 +160,9 @@ bind Listbox <Control-slash> { tkListboxSelectAll %W } bind Listbox <Control-backslash> { - if {[%W cget -selectmode] != "browse"} { + if {[string compare [%W cget -selectmode] "browse"]} { %W selection clear 0 end + event generate %W <<ListboxSelect>> } } @@ -177,7 +180,7 @@ bind Listbox <B2-Motion> { # on other platforms. bind Listbox <MouseWheel> { - %W yview scroll [expr - (%D / 120) * 4] units + %W yview scroll [expr {- (%D / 120) * 4}] units } # tkListboxBeginSelect -- @@ -194,7 +197,7 @@ bind Listbox <MouseWheel> { proc tkListboxBeginSelect {w el} { global tkPriv - if {[$w cget -selectmode] == "multiple"} { + if {![string compare [$w cget -selectmode] "multiple"]} { if {[$w selection includes $el]} { $w selection clear $el } else { @@ -207,6 +210,7 @@ proc tkListboxBeginSelect {w el} { set tkPriv(listboxSelection) {} set tkPriv(listboxPrev) $el } + event generate $w <<ListboxSelect>> } # tkListboxMotion -- @@ -230,6 +234,7 @@ proc tkListboxMotion {w el} { $w selection clear 0 end $w selection set $el set tkPriv(listboxPrev) $el + event generate $w <<ListboxSelect>> } extended { set i $tkPriv(listboxPrev) @@ -253,6 +258,7 @@ proc tkListboxMotion {w el} { incr i -1 } set tkPriv(listboxPrev) $el + event generate $w <<ListboxSelect>> } } } @@ -270,12 +276,11 @@ proc tkListboxMotion {w el} { # one under the pointer). Must be in numerical form. proc tkListboxBeginExtend {w el} { - if {[$w cget -selectmode] == "extended"} { + if {![string compare [$w cget -selectmode] "extended"]} { if {[$w selection includes anchor]} { tkListboxMotion $w $el } else { # No selection yet; simulate the begin-select operation. - tkListboxBeginSelect $w $el } } @@ -295,7 +300,7 @@ proc tkListboxBeginExtend {w el} { proc tkListboxBeginToggle {w el} { global tkPriv - if {[$w cget -selectmode] == "extended"} { + if {![string compare [$w cget -selectmode] "extended"]} { set tkPriv(listboxSelection) [$w curselection] set tkPriv(listboxPrev) $el $w selection anchor $el @@ -304,6 +309,7 @@ proc tkListboxBeginToggle {w el} { } else { $w selection set $el } + event generate $w <<ListboxSelect>> } } @@ -355,6 +361,7 @@ proc tkListboxUpDown {w amount} { browse { $w selection clear 0 end $w selection set active + event generate $w <<ListboxSelect>> } extended { $w selection clear 0 end @@ -362,6 +369,7 @@ proc tkListboxUpDown {w amount} { $w selection anchor active set tkPriv(listboxPrev) [$w index active] set tkPriv(listboxSelection) {} + event generate $w <<ListboxSelect>> } } } @@ -377,7 +385,7 @@ proc tkListboxUpDown {w amount} { # amount - +1 to move down one item, -1 to move back one item. proc tkListboxExtendUpDown {w amount} { - if {[$w cget -selectmode] != "extended"} { + if {[string compare [$w cget -selectmode] "extended"]} { return } $w activate [expr {[$w index active] + $amount}] @@ -398,13 +406,13 @@ proc tkListboxExtendUpDown {w amount} { proc tkListboxDataExtend {w el} { set mode [$w cget -selectmode] - if {$mode == "extended"} { + if {![string compare $mode "extended"]} { $w activate $el $w see $el if {[$w selection includes anchor]} { tkListboxMotion $w $el } - } elseif {$mode == "multiple"} { + } elseif {![string compare $mode "multiple"]} { $w activate $el $w see $el } @@ -422,7 +430,7 @@ proc tkListboxDataExtend {w el} { proc tkListboxCancel w { global tkPriv - if {[$w cget -selectmode] != "extended"} { + if {[string compare [$w cget -selectmode] "extended"]} { return } set first [$w index anchor] @@ -439,6 +447,7 @@ proc tkListboxCancel w { } incr first } + event generate $w <<ListboxSelect>> } # tkListboxSelectAll @@ -452,10 +461,11 @@ proc tkListboxCancel w { proc tkListboxSelectAll w { set mode [$w cget -selectmode] - if {($mode == "single") || ($mode == "browse")} { + if {![string compare $mode "single"] || ![string compare $mode "browse"]} { $w selection clear 0 end $w selection set active } else { $w selection set 0 end } + event generate $w <<ListboxSelect>> } diff --git a/library/menu.tcl b/library/menu.tcl index ce483ca..538e330 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -4,10 +4,11 @@ # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # -# RCS: @(#) $Id: menu.tcl,v 1.4 1999/02/04 20:58:40 stanton Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.5 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -89,7 +90,7 @@ bind Menubutton <Leave> { tkMbLeave %W } bind Menubutton <1> { - if {$tkPriv(inMenubutton) != ""} { + if {[string compare $tkPriv(inMenubutton) ""]} { tkMbPost $tkPriv(inMenubutton) %X %Y } } @@ -118,9 +119,9 @@ bind Menu <FocusIn> {} bind Menu <Enter> { set tkPriv(window) %W - if {[%W cget -type] == "tearoff"} { - if {"%m" != "NotifyUngrab"} { - if {$tcl_platform(platform) == "unix"} { + if {![string compare [%W cget -type] "tearoff"]} { + if {[string compare "%m" "NotifyUngrab"]} { + if {![string compare $tcl_platform(platform) "unix"]} { tk_menuSetFocus %W } } @@ -168,7 +169,7 @@ bind Menu <KeyPress> { # The following bindings apply to all windows, and are used to # implement keyboard menu traversal. -if {$tcl_platform(platform) == "unix"} { +if {![string compare $tcl_platform(platform) "unix"]} { bind all <Alt-KeyPress> { tkTraverseToMenu %W %A } @@ -198,11 +199,11 @@ if {$tcl_platform(platform) == "unix"} { proc tkMbEnter w { global tkPriv - if {$tkPriv(inMenubutton) != ""} { + if {[string compare $tkPriv(inMenubutton) ""]} { tkMbLeave $tkPriv(inMenubutton) } set tkPriv(inMenubutton) $w - if {[$w cget -state] != "disabled"} { + if {[string compare [$w cget -state] "disabled"]} { $w configure -state active } } @@ -221,7 +222,7 @@ proc tkMbLeave w { if {![winfo exists $w]} { return } - if {[$w cget -state] == "active"} { + if {![string compare [$w cget -state] "active"]} { $w configure -state normal } } @@ -242,20 +243,21 @@ proc tkMbPost {w {x {}} {y {}}} { global tkPriv errorInfo global tcl_platform - if {([$w cget -state] == "disabled") || ($w == $tkPriv(postedMb))} { + if {![string compare [$w cget -state] "disabled"] || + ![string compare $w $tkPriv(postedMb)]} { return } set menu [$w cget -menu] - if {$menu == ""} { + if {![string compare $menu ""]} { return } - set tearoff [expr {($tcl_platform(platform) == "unix") \ - || ([$menu cget -type] == "tearoff")}] + set tearoff [expr {![string compare $tcl_platform(platform) "unix"] \ + || ![string compare [$menu cget -type] "tearoff"]}] if {[string first $w $menu] != 0} { error "can't post $menu: it isn't a descendant of $w (this is a new requirement in Tk versions 3.0 and later)" } set cur $tkPriv(postedMb) - if {$cur != ""} { + if {[string compare $cur ""]} { tkMenuUnpost {} } set tkPriv(cursor) [$w cget -cursor] @@ -299,7 +301,7 @@ proc tkMbPost {w {x {}} {y {}}} { } } $menu post $x $y - if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { + if {[string compare $entry {}] && [string compare [$menu entrycget $entry -state] "disabled"]} { $menu activate $entry tkGenerateMenuSelect $menu } @@ -318,14 +320,14 @@ proc tkMbPost {w {x {}} {y {}}} { } } $menu post $x $y - if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { + if {[string compare $entry {}] && [string compare [$menu entrycget $entry -state] "disabled"]} { $menu activate $entry tkGenerateMenuSelect $menu } } default { if {[$w cget -indicatoron]} { - if {$y == ""} { + if {![string compare $y {}]} { set x [expr {[winfo rootx $w] + [winfo width $w]/2}] set y [expr {[winfo rooty $w] + [winfo height $w]/2}] } @@ -385,17 +387,17 @@ proc tkMenuUnpost menu { # what was posted. catch { - if {$mb != ""} { + if {[string compare $mb ""]} { set menu [$mb cget -menu] $menu unpost set tkPriv(postedMb) {} $mb configure -cursor $tkPriv(cursor) $mb configure -relief $tkPriv(relief) - } elseif {$tkPriv(popup) != ""} { + } elseif {[string compare $tkPriv(popup) ""]} { $tkPriv(popup) unpost set tkPriv(popup) {} - } elseif {(!([$menu cget -type] == "menubar") - && !([$menu cget -type] == "tearoff"))} { + } elseif {[string compare [$menu cget -type] "menubar"] + && [string compare [$menu cget -type] "tearoff"]} { # We're in a cascaded sub-menu from a torn-off menu or popup. # Unpost all the menus up to the toplevel one (but not # including the top-level torn-off one) and deactivate the @@ -403,7 +405,7 @@ proc tkMenuUnpost menu { while 1 { set parent [winfo parent $menu] - if {([winfo class $parent] != "Menu") + if {[string compare [winfo class $parent] "Menu"] || ![winfo ismapped $parent]} { break } @@ -411,33 +413,33 @@ proc tkMenuUnpost menu { $parent postcascade none tkGenerateMenuSelect $parent set type [$parent cget -type] - if {($type == "menubar")|| ($type == "tearoff")} { + if {![string compare $type "menubar"] || + ![string compare $type "tearoff"]} { break } set menu $parent } - if {[$menu cget -type] != "menubar"} { + if {[string compare [$menu cget -type] "menubar"]} { $menu unpost } } } - if {($tkPriv(tearoff) != 0) || ($tkPriv(menuBar) != "")} { + if {($tkPriv(tearoff) != 0) || [string compare $tkPriv(menuBar) ""]} { # Release grab, if any, and restore the previous grab, if there # was one. - - if {$menu != ""} { + if {[string compare $menu ""]} { set grab [grab current $menu] - if {$grab != ""} { + if {[string compare $grab ""]} { grab release $grab } } tkRestoreOldGrab - if {$tkPriv(menuBar) != ""} { + if {[string compare $tkPriv(menuBar) ""]} { $tkPriv(menuBar) configure -cursor $tkPriv(cursor) set tkPriv(menuBar) {} } - if {$tcl_platform(platform) != "unix"} { + if {[string compare $tcl_platform(platform) "unix"]} { set tkPriv(tearoff) 0 } } @@ -457,19 +459,21 @@ proc tkMenuUnpost menu { proc tkMbMotion {w upDown rootx rooty} { global tkPriv - if {$tkPriv(inMenubutton) == $w} { + if {![string compare $tkPriv(inMenubutton) $w]} { return } set new [winfo containing $rootx $rooty] - if {($new != $tkPriv(inMenubutton)) && (($new == "") - || ([winfo toplevel $new] == [winfo toplevel $w]))} { - if {$tkPriv(inMenubutton) != ""} { + if {[string compare $new $tkPriv(inMenubutton)] + && (![string compare $new ""] + || ![string compare [winfo toplevel $new] [winfo toplevel $w]])} { + if {[string compare $tkPriv(inMenubutton) ""]} { tkMbLeave $tkPriv(inMenubutton) } - if {($new != "") && ([winfo class $new] == "Menubutton") + if {[string compare $new ""] + && ![string compare [winfo class $new] "Menubutton"] && ([$new cget -indicatoron] == 0) && ([$w cget -indicatoron] == 0)} { - if {$upDown == "down"} { + if {![string compare $upDown "down"]} { tkMbPost $new $rootx $rooty } else { tkMbEnter $new @@ -490,8 +494,9 @@ proc tkMbButtonUp w { global tkPriv global tcl_platform + set menu [$w cget -menu] set tearoff [expr {($tcl_platform(platform) == "unix") \ - || ([[$w cget -menu] cget -type] == "tearoff")}] + || (($menu != {}) && ([$menu cget -type] == "tearoff"))}] if {($tearoff != 0) && ($tkPriv(postedMb) == $w) && ($tkPriv(inMenubutton) == $w)} { tkMenuFirstEntry [$tkPriv(postedMb) cget -menu] @@ -515,10 +520,10 @@ proc tkMbButtonUp w { proc tkMenuMotion {menu x y state} { global tkPriv - if {$menu == $tkPriv(window)} { - if {[$menu cget -type] == "menubar"} { + if {![string compare $menu $tkPriv(window)]} { + if {![string compare [$menu cget -type] "menubar"]} { if {[info exists tkPriv(focus)] && \ - ([string compare $menu $tkPriv(focus)] != 0)} { + [string compare $menu $tkPriv(focus)]} { $menu activate @$x,$y tkGenerateMenuSelect $menu } @@ -551,16 +556,16 @@ proc tkMenuButtonDown menu { global tkPriv global tcl_platform $menu postcascade active - if {$tkPriv(postedMb) != ""} { + if {[string compare $tkPriv(postedMb) ""]} { grab -global $tkPriv(postedMb) } else { - while {([$menu cget -type] == "normal") - && ([winfo class [winfo parent $menu]] == "Menu") + while {![string compare [$menu cget -type] "normal"] + && ![string compare [winfo class [winfo parent $menu]] "Menu"] && [winfo ismapped [winfo parent $menu]]} { set menu [winfo parent $menu] } - if {$tkPriv(menuBar) == {}} { + if {![string compare $tkPriv(menuBar) {}]} { set tkPriv(menuBar) $menu set tkPriv(cursor) [$menu cget -cursor] $menu configure -cursor arrow @@ -571,14 +576,14 @@ proc tkMenuButtonDown menu { # restore the grab, since the old grab window will not be viewable # anymore. - if {$menu != [grab current $menu]} { + if {[string compare $menu [grab current $menu]]} { tkSaveGrabInfo $menu } # Must re-grab even if the grab window hasn't changed, in order # to release the implicit grab from the button press. - if {$tcl_platform(platform) == "unix"} { + if {![string compare $tcl_platform(platform) "unix"]} { grab -global $menu } } @@ -597,12 +602,12 @@ proc tkMenuButtonDown menu { proc tkMenuLeave {menu rootx rooty state} { global tkPriv set tkPriv(window) {} - if {[$menu index active] == "none"} { + if {![string compare [$menu index active] "none"]} { return } - if {([$menu type active] == "cascade") - && ([winfo containing $rootx $rooty] - == [$menu entrycget active -menu])} { + if {![string compare [$menu type active] "cascade"] + && ![string compare [winfo containing $rootx $rooty] \ + [$menu entrycget active -menu]]} { return } $menu activate none @@ -622,7 +627,7 @@ proc tkMenuLeave {menu rootx rooty state} { proc tkMenuInvoke {w buttonRelease} { global tkPriv - if {$buttonRelease && ($tkPriv(window) == "")} { + if {$buttonRelease && ![string compare $tkPriv(window) {}]} { # Mouse was pressed over a menu without a menu button, then # dragged off the menu (possibly with a cascade posted) and # released. Unpost everything and quit. @@ -633,14 +638,14 @@ proc tkMenuInvoke {w buttonRelease} { tkMenuUnpost $w return } - if {[$w type active] == "cascade"} { + if {![string compare [$w type active] "cascade"]} { $w postcascade active set menu [$w entrycget active -menu] tkMenuFirstEntry $menu - } elseif {[$w type active] == "tearoff"} { + } elseif {![string compare [$w type active] "tearoff"]} { tkMenuUnpost $w tkTearOffMenu $w - } elseif {[$w cget -type] == "menubar"} { + } elseif {![string compare [$w cget -type] "menubar"]} { $w postcascade none $w activate none event generate $w <<MenuSelect>> @@ -661,9 +666,9 @@ proc tkMenuInvoke {w buttonRelease} { proc tkMenuEscape menu { set parent [winfo parent $menu] - if {([winfo class $parent] != "Menu")} { + if {[string compare [winfo class $parent] "Menu"]} { tkMenuUnpost $menu - } elseif {([$parent cget -type] == "menubar")} { + } elseif {![string compare [$parent cget -type] "menubar"]} { tkMenuUnpost $menu tkRestoreOldGrab } else { @@ -675,7 +680,7 @@ proc tkMenuEscape menu { # differently depending on whether the menu is a menu bar or not. proc tkMenuUpArrow {menu} { - if {[$menu cget -type] == "menubar"} { + if {![string compare [$menu cget -type] "menubar"]} { tkMenuNextMenu $menu left } else { tkMenuNextEntry $menu -1 @@ -683,7 +688,7 @@ proc tkMenuUpArrow {menu} { } proc tkMenuDownArrow {menu} { - if {[$menu cget -type] == "menubar"} { + if {![string compare [$menu cget -type] "menubar"]} { tkMenuNextMenu $menu right } else { tkMenuNextEntry $menu 1 @@ -691,7 +696,7 @@ proc tkMenuDownArrow {menu} { } proc tkMenuLeftArrow {menu} { - if {[$menu cget -type] == "menubar"} { + if {![string compare [$menu cget -type] "menubar"]} { tkMenuNextEntry $menu -1 } else { tkMenuNextMenu $menu left @@ -699,7 +704,7 @@ proc tkMenuLeftArrow {menu} { } proc tkMenuRightArrow {menu} { - if {[$menu cget -type] == "menubar"} { + if {![string compare [$menu cget -type] "menubar"]} { tkMenuNextEntry $menu 1 } else { tkMenuNextMenu $menu right @@ -721,22 +726,22 @@ proc tkMenuNextMenu {menu direction} { # First handle traversals into and out of cascaded menus. - if {$direction == "right"} { + if {![string compare $direction "right"]} { set count 1 set parent [winfo parent $menu] set class [winfo class $parent] - if {[$menu type active] == "cascade"} { + if {![string compare [$menu type active] "cascade"]} { $menu postcascade active set m2 [$menu entrycget active -menu] - if {$m2 != ""} { + if {[string compare $m2 ""]} { tkMenuFirstEntry $m2 } return } else { set parent [winfo parent $menu] - while {($parent != ".")} { - if {([winfo class $parent] == "Menu") - && ([$parent cget -type] == "menubar")} { + while {[string compare $parent "."]} { + if {![string compare [winfo class $parent] "Menu"] + && ![string compare [$parent cget -type] "menubar"]} { tk_menuSetFocus $parent tkMenuNextEntry $parent 1 return @@ -747,8 +752,8 @@ proc tkMenuNextMenu {menu direction} { } else { set count -1 set m2 [winfo parent $menu] - if {[winfo class $m2] == "Menu"} { - if {[$m2 cget -type] != "menubar"} { + if {![string compare [winfo class $m2] "Menu"]} { + if {[string compare [$m2 cget -type] "menubar"]} { $menu activate none tkGenerateMenuSelect $menu tk_menuSetFocus $m2 @@ -767,8 +772,8 @@ proc tkMenuNextMenu {menu direction} { # or previous menubutton, if that makes sense. set m2 [winfo parent $menu] - if {[winfo class $m2] == "Menu"} { - if {[$m2 cget -type] == "menubar"} { + if {![string compare [winfo class $m2] "Menu"]} { + if {![string compare [$m2 cget -type] "menubar"]} { tk_menuSetFocus $m2 tkMenuNextEntry $m2 -1 return @@ -776,7 +781,7 @@ proc tkMenuNextMenu {menu direction} { } set w $tkPriv(postedMb) - if {$w == ""} { + if {![string compare $w ""]} { return } set buttons [winfo children [winfo parent $w]] @@ -790,13 +795,13 @@ proc tkMenuNextMenu {menu direction} { incr i -$length } set mb [lindex $buttons $i] - if {([winfo class $mb] == "Menubutton") - && ([$mb cget -state] != "disabled") - && ([$mb cget -menu] != "") - && ([[$mb cget -menu] index last] != "none")} { + if {![string compare [winfo class $mb] "Menubutton"] + && [string compare [$mb cget -state] "disabled"] + && [string compare [$mb cget -menu] ""] + && [string compare [[$mb cget -menu] index last] "none"]} { break } - if {$mb == $w} { + if {![string compare $mb $w]} { return } incr i $count @@ -817,13 +822,13 @@ proc tkMenuNextMenu {menu direction} { proc tkMenuNextEntry {menu count} { global tkPriv - if {[$menu index last] == "none"} { + if {![string compare [$menu index last] "none"]} { return } set length [expr {[$menu index last]+1}] set quitAfter $length set active [$menu index active] - if {$active == "none"} { + if {![string compare $active "none"]} { set i 0 } else { set i [expr {$active + $count}] @@ -854,9 +859,9 @@ proc tkMenuNextEntry {menu count} { } $menu activate $i tkGenerateMenuSelect $menu - if {[$menu type $i] == "cascade"} { + if {![string compare [$menu type $i] "cascade"]} { set cascade [$menu entrycget $i -menu] - if {[string compare $cascade ""] != 0} { + if {[string compare $cascade ""]} { $menu postcascade $i tkMenuFirstEntry $cascade } @@ -891,20 +896,20 @@ proc tkMenuFind {w char} { } switch [winfo class $child] { Menu { - if {[$child cget -type] == "menubar"} { - if {$char == ""} { + if {![string compare [$child cget -type] "menubar"]} { + if {![string compare $char ""]} { return $child } set last [$child index last] for {set i [$child cget -tearoff]} {$i <= $last} {incr i} { - if {[$child type $i] == "separator"} { + if {![string compare [$child type $i] "separator"]} { continue } set char2 [string index [$child entrycget $i -label] \ [$child entrycget $i -underline]] - if {([string compare $char [string tolower $char2]] \ - == 0) || ($char == "")} { - if {[$child entrycget $i -state] != "disabled"} { + if {![string compare $char [string tolower $char2]] \ + || ![string compare $char ""]} { + if {[string compare [$child entrycget $i -state] "disabled"]} { return $child } } @@ -923,9 +928,9 @@ proc tkMenuFind {w char} { Menubutton { set char2 [string index [$child cget -text] \ [$child cget -underline]] - if {([string compare $char [string tolower $char2]] == 0) - || ($char == "")} { - if {[$child cget -state] != "disabled"} { + if {![string compare $char [string tolower $char2]] + || ![string compare $char ""]} { + if {[string compare [$child cget $i -state] "disabled"]} { return $child } } @@ -933,7 +938,7 @@ proc tkMenuFind {w char} { default { set match [tkMenuFind $child $char] - if {$match != ""} { + if {[string compare $match ""]} { return $match } } @@ -956,21 +961,22 @@ proc tkMenuFind {w char} { proc tkTraverseToMenu {w char} { global tkPriv - if {$char == ""} { + if {![string compare $char ""]} { return } - while {[winfo class $w] == "Menu"} { - if {([$w cget -type] != "menubar") && ($tkPriv(postedMb) == "")} { + while {![string compare [winfo class $w] "Menu"]} { + if {[string compare [$w cget -type] "menubar"] + && ![string compare $tkPriv(postedMb) ""]} { return } - if {[$w cget -type] == "menubar"} { + if {![string compare [$w cget -type] "menubar"]} { break } set w [winfo parent $w] } set w [tkMenuFind [winfo toplevel $w] $char] - if {$w != ""} { - if {[winfo class $w] == "Menu"} { + if {[string compare $w ""]} { + if {![string compare [winfo class $w] "Menu"]} { tk_menuSetFocus $w set tkPriv(window) $w tkSaveGrabInfo $w @@ -993,8 +999,8 @@ proc tkTraverseToMenu {w char} { proc tkFirstMenu w { set w [tkMenuFind [winfo toplevel $w] ""] - if {$w != ""} { - if {[winfo class $w] == "Menu"} { + if {[string compare $w ""]} { + if {![string compare [winfo class $w] "Menu"]} { tk_menuSetFocus $w set tkPriv(window) $w tkSaveGrabInfo $w @@ -1019,12 +1025,12 @@ proc tkFirstMenu w { # nothing happens. proc tkTraverseWithinMenu {w char} { - if {$char == ""} { + if {![string compare $char ""]} { return } set char [string tolower $char] set last [$w index last] - if {$last == "none"} { + if {![string compare $last "none"]} { return } for {set i 0} {$i <= $last} {incr i} { @@ -1033,13 +1039,13 @@ proc tkTraverseWithinMenu {w char} { [$w entrycget $i -underline]]}]} { continue } - if {[string compare $char [string tolower $char2]] == 0} { - if {[$w type $i] == "cascade"} { + if {![string compare $char [string tolower $char2]]} { + if {![string compare [$w type $i] "cascade"]} { $w activate $i $w postcascade active event generate $w <<MenuSelect>> set m2 [$w entrycget $i -menu] - if {$m2 != ""} { + if {[string compare $m2 ""]} { tkMenuFirstEntry $m2 } } else { @@ -1063,25 +1069,26 @@ proc tkTraverseWithinMenu {w char} { # menu - Name of the menu window (possibly empty). proc tkMenuFirstEntry menu { - if {$menu == ""} { + if {![string compare $menu ""]} { return } tk_menuSetFocus $menu - if {[$menu index active] != "none"} { + if {[string compare [$menu index active] "none"]} { return } set last [$menu index last] - if {$last == "none"} { + if {![string compare $last "none"]} { return } for {set i 0} {$i <= $last} {incr i} { if {([catch {set state [$menu entrycget $i -state]}] == 0) - && ($state != "disabled") && ([$menu type $i] != "tearoff")} { + && [string compare $state "disabled"] + && [string compare [$menu type $i] "tearoff"]} { $menu activate $i tkGenerateMenuSelect $menu - if {[$menu type $i] == "cascade"} { + if {![string compare [$menu type $i] "cascade"]} { set cascade [$menu entrycget $i -menu] - if {[string compare $cascade ""] != 0} { + if {[string compare $cascade ""]} { $menu postcascade $i tkMenuFirstEntry $cascade } @@ -1109,12 +1116,12 @@ proc tkMenuFindName {menu s} { return $i } set last [$menu index last] - if {$last == "none"} { + if {![string compare $last "none"]} { return } for {set i 0} {$i <= $last} {incr i} { if {![catch {$menu entrycget $i -label} label]} { - if {$label == $s} { + if {![string compare $label $s]} { return $i } } @@ -1137,7 +1144,7 @@ proc tkMenuFindName {menu s} { proc tkPostOverPoint {menu x y {entry {}}} { global tcl_platform - if {$entry != {}} { + if {[string compare $entry {}]} { if {$entry == [$menu index last]} { incr y [expr {-([$menu yposition $entry] \ + [winfo reqheight $menu])/2}] @@ -1148,7 +1155,8 @@ proc tkPostOverPoint {menu x y {entry {}}} { incr x [expr {-[winfo reqwidth $menu]/2}] } $menu post $x $y - if {($entry != {}) && ([$menu entrycget $entry -state] != "disabled")} { + if {[string compare $entry {}] + && [string compare [$menu entrycget $entry -state] "disabled"]} { $menu activate $entry tkGenerateMenuSelect $menu } @@ -1165,7 +1173,7 @@ proc tkPostOverPoint {menu x y {entry {}}} { proc tkSaveGrabInfo w { global tkPriv set tkPriv(oldGrab) [grab current $w] - if {$tkPriv(oldGrab) != ""} { + if {[string compare $tkPriv(oldGrab) ""]} { set tkPriv(grabStatus) [grab status $tkPriv(oldGrab)] } } @@ -1177,13 +1185,13 @@ proc tkSaveGrabInfo w { proc tkRestoreOldGrab {} { global tkPriv - if {$tkPriv(oldGrab) != ""} { + if {[string compare $tkPriv(oldGrab) ""]} { # Be careful restoring the old grab, since it's window may not # be visible anymore. catch { - if {$tkPriv(grabStatus) == "global"} { + if {![string compare $tkPriv(grabStatus) "global"]} { grab set -global $tkPriv(oldGrab) } else { grab set $tkPriv(oldGrab) @@ -1195,7 +1203,7 @@ proc tkRestoreOldGrab {} { proc tk_menuSetFocus {menu} { global tkPriv - if {![info exists tkPriv(focus)] || [string length $tkPriv(focus)] == 0} { + if {![info exists tkPriv(focus)] || ![string compare $tkPriv(focus) {}]} { set tkPriv(focus) [focus] } focus $menu @@ -1204,9 +1212,8 @@ proc tk_menuSetFocus {menu} { proc tkGenerateMenuSelect {menu} { global tkPriv - if {([string compare $tkPriv(activeMenu) $menu] == 0) \ - && ([string compare $tkPriv(activeItem) [$menu index active]] \ - == 0)} { + if {![string compare $tkPriv(activeMenu) $menu] \ + && ![string compare $tkPriv(activeItem) [$menu index active]]} { return } @@ -1230,11 +1237,12 @@ proc tkGenerateMenuSelect {menu} { proc tk_popup {menu x y {entry {}}} { global tkPriv global tcl_platform - if {($tkPriv(popup) != "") || ($tkPriv(postedMb) != "")} { + if {[string compare $tkPriv(popup) ""] + || [string compare $tkPriv(postedMb) ""]} { tkMenuUnpost {} } tkPostOverPoint $menu $x $y $entry - if {$tcl_platform(platform) == "unix"} { + if {![string compare $tcl_platform(platform) "unix"]} { tkSaveGrabInfo $menu grab -global $menu set tkPriv(popup) $menu diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 093afdf..ea04e86 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.4 1998/11/12 06:22:05 welch Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.5 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -49,15 +49,13 @@ proc tkMessageBox {args} { tclParseConfigSpec $w $specs "" $args if {[lsearch {info warning error question} $data(-icon)] == -1} { - error "invalid icon \"$data(-icon)\", must be error, info, question or warning" + error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning" } - if {$tcl_platform(platform) == "macintosh"} { - if {$data(-icon) == "error"} { - set data(-icon) "stop" - } elseif {$data(-icon) == "warning"} { - set data(-icon) "caution" - } elseif {$data(-icon) == "info"} { - set data(-icon) "note" + if {![string compare $tcl_platform(platform) "macintosh"]} { + switch -- $data(-icon) { + "error" {set data(-icon) "stop"} + "warning" {set data(-icon) "caution"} + "info" {set data(-icon) "note"} } } @@ -77,7 +75,7 @@ proc tkMessageBox {args} { set buttons { {ok -width 6 -text OK -under 0} } - if {$data(-default) == ""} { + if {![string compare $data(-default) ""]} { set data(-default) "ok" } } @@ -107,7 +105,7 @@ proc tkMessageBox {args} { } } default { - error "invalid message box type \"$data(-type)\", must be abortretryignore, ok, okcancel, retrycancel, yesno or yesnocancel" + error "bad -type value \"$data(-type)\": must be abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel" } } @@ -142,7 +140,7 @@ proc tkMessageBox {args} { wm iconname $w Dialog wm protocol $w WM_DELETE_WINDOW { } wm transient $w $data(-parent) - if {$tcl_platform(platform) == "macintosh"} { + if {![string compare $tcl_platform(platform) "macintosh"]} { unsupported1 style $w dBoxProc } @@ -150,22 +148,25 @@ proc tkMessageBox {args} { pack $w.bot -side bottom -fill both frame $w.top pack $w.top -side top -fill both -expand 1 - if {$tcl_platform(platform) != "macintosh"} { + if {[string compare $tcl_platform(platform) "macintosh"]} { $w.bot configure -relief raised -bd 1 $w.top configure -relief raised -bd 1 } # 4. Fill the top part with bitmap and message (use the option - # database for -wraplength so that it can be overridden by - # the caller). + # database for -wraplength and -font so that they can be + # overridden by the caller). option add *Dialog.msg.wrapLength 3i widgetDefault - label $w.msg -justify left -text $data(-message) - catch {$w.msg configure -font \ - -Adobe-Times-Medium-R-Normal--*-180-*-*-*-*-*-* + if {![string compare $tcl_platform(platform) "macintosh"]} { + option add *Dialog.msg.font system widgetDefault + } else { + option add *Dialog.msg.font {Times 18} widgetDefault } + + label $w.msg -justify left -text $data(-message) pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m - if {$data(-icon) != ""} { + if {[string compare $data(-icon) ""]} { label $w.bitmap -bitmap $data(-icon) pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } @@ -176,29 +177,27 @@ proc tkMessageBox {args} { foreach but $buttons { set name [lindex $but 0] set opts [lrange $but 1 end] - if {![string compare $opts {}]} { + if {![llength $opts]} { # Capitalize the first letter of $name - set capName \ - [string toupper \ + set capName [string toupper \ [string index $name 0]][string range $name 1 end] set opts [list -text $capName] } - eval button $w.$name $opts -command [list "set tkPriv(button) $name"] + eval button [list $w.$name] $opts [list -command [list set tkPriv(button) $name]] if {![string compare $name $data(-default)]} { $w.$name configure -default active } - pack $w.$name -in $w.bot -side left -expand 1 \ - -padx 3m -pady 2m + pack $w.$name -in $w.bot -side left -expand 1 -padx 3m -pady 2m # create the binding for the key accelerator, based on the underline # set underIdx [$w.$name cget -under] if {$underIdx >= 0} { set key [string index [$w.$name cget -text] $underIdx] - bind $w <Alt-[string tolower $key]> "$w.$name invoke" - bind $w <Alt-[string toupper $key]> "$w.$name invoke" + bind $w <Alt-[string tolower $key]> [list $w.$name invoke] + bind $w <Alt-[string toupper $key]> [list $w.$name invoke] } incr i } @@ -207,7 +206,7 @@ proc tkMessageBox {args} { # default button. if {[string compare $data(-default) ""]} { - bind $w <Return> "tkButtonInvoke $w.$data(-default)" + bind $w <Return> [list tkButtonInvoke $w.$data(-default)] } # 7. Withdraw the window, then update all the geometry information @@ -227,7 +226,7 @@ proc tkMessageBox {args} { set oldFocus [focus] set oldGrab [grab current $w] - if {$oldGrab != ""} { + if {[string compare $oldGrab ""]} { set grabStatus [grab status $oldGrab] } grab $w @@ -246,8 +245,8 @@ proc tkMessageBox {args} { tkwait variable tkPriv(button) catch {focus $oldFocus} destroy $w - if {$oldGrab != ""} { - if {$grabStatus == "global"} { + if {[string compare $oldGrab ""]} { + if {![string compare $grabStatus "global"]} { grab -global $oldGrab } else { grab $oldGrab diff --git a/library/palette.tcl b/library/palette.tcl index 572e1e3..45000b0 100644 --- a/library/palette.tcl +++ b/library/palette.tcl @@ -3,7 +3,7 @@ # This file contains procedures that change the color palette used # by Tk. # -# RCS: @(#) $Id: palette.tcl,v 1.3 1998/09/14 18:23:24 stanton Exp $ +# RCS: @(#) $Id: palette.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # @@ -187,23 +187,22 @@ proc tkRecolorTree {w colors} { # by 10%. proc tkDarken {color percent} { - set l [winfo rgb . $color] - set red [expr {[lindex $l 0]/256}] - set green [expr {[lindex $l 1]/256}] - set blue [expr {[lindex $l 2]/256}] - set red [expr {($red*$percent)/100}] + foreach {red green blue} [winfo rgb . $color] { + set red [expr {($red/256)*$percent/100}] + set green [expr {($green/256)*$percent/100}] + set blue [expr {($blue/256)*$percent/100}] + break + } if {$red > 255} { set red 255 } - set green [expr {($green*$percent)/100}] if {$green > 255} { set green 255 } - set blue [expr {($blue*$percent)/100}] if {$blue > 255} { set blue 255 } - format #%02x%02x%02x $red $green $blue + return [format "#%02x%02x%02x" $red $green $blue] } # tk_bisque -- diff --git a/library/safetk.tcl b/library/safetk.tcl index 78aeb86..0ceaebe 100644 --- a/library/safetk.tcl +++ b/library/safetk.tcl @@ -2,7 +2,7 @@ # # Support procs to use Tk in safe interpreters. # -# RCS: @(#) $Id: safetk.tcl,v 1.3 1998/09/14 18:23:24 stanton Exp $ +# RCS: @(#) $Id: safetk.tcl,v 1.4 1999/04/16 01:51:26 stanton Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -22,7 +22,7 @@ # # We use opt (optional arguments parsing) -package require opt 0.1; +package require opt 0.4.1; namespace eval ::safe { @@ -62,65 +62,83 @@ namespace eval ::safe { # empty definition for auto_mkIndex proc ::safe::loadTk {} {} - ::tcl::OptProc loadTk { - {slave -interp "name of the slave interpreter"} - {-use -windowId {} "window Id to use (new toplevel otherwise)"} - {-display -displayName {} "display name to use (current one otherwise)"} - } { - set displayGiven [::tcl::OptProcArgGiven "-display"] - if {!$displayGiven} { - # Try to get the current display from "." - # (which might not exist if the master is tk-less) - if {[catch {set display [winfo screen .]}]} { - if {[info exists ::env(DISPLAY)]} { - set display $::env(DISPLAY) - } else { - Log $slave "no winfo screen . nor env(DISPLAY)" WARNING - set display ":0.0" - } +::tcl::OptProc loadTk { + {slave -interp "name of the slave interpreter"} + {-use -windowId {} "window Id to use (new toplevel otherwise)"} + {-display -displayName {} "display name to use (current one otherwise)"} +} { + set displayGiven [::tcl::OptProcArgGiven "-display"] + if {!$displayGiven} { + + # Try to get the current display from "." + # (which might not exist if the master is tk-less) + + if {[catch {set display [winfo screen .]}]} { + if {[info exists ::env(DISPLAY)]} { + set display $::env(DISPLAY) + } else { + Log $slave "no winfo screen . nor env(DISPLAY)" WARNING + set display ":0.0" } } - if {![::tcl::OptProcArgGiven "-use"]} { - # create a decorated toplevel - ::tcl::Lassign [tkTopLevel $slave $display] w use; - # set our delete hook (slave arg is added by interpDelete) - Set [DeleteHookName $slave] [list tkDelete {} $w]; + } + if {![::tcl::OptProcArgGiven "-use"]} { + + # create a decorated toplevel + + ::tcl::Lassign [tkTopLevel $slave $display] w use; + + # set our delete hook (slave arg is added by interpDelete) + # to clean up both window related code and tkInit(slave) + Set [DeleteHookName $slave] [list tkDelete {} $w]; + + } else { + + # set our delete hook (slave arg is added by interpDelete) + # to clean up tkInit(slave) + + Set [DeleteHookName $slave] [list disallowTk] + + # Let's be nice and also accept tk window names instead of ids + + if {[string match ".*" $use]} { + set windowName $use + set use [winfo id $windowName] + set nDisplay [winfo screen $windowName] } else { - # Let's be nice and also accept tk window names instead of ids - if {[string match ".*" $use]} { - set windowName $use - set use [winfo id $windowName] - set nDisplay [winfo screen $windowName] + + # Check for a better -display value + # (works only for multi screens on single host, but not + # cross hosts, for that a tk window name would be better + # but embeding is also usefull for non tk names) + + if {![catch {winfo pathname $use} name]} { + set nDisplay [winfo screen $name] } else { - # Check for a better -display value - # (works only for multi screens on single host, but not - # cross hosts, for that a tk window name would be better - # but embeding is also usefull for non tk names) - if {![catch {winfo pathname $use} name]} { - set nDisplay [winfo screen $name] - } else { - # Can't have a better one - set nDisplay $display - } + + # Can't have a better one + + set nDisplay $display } - if {[string compare $nDisplay $display]} { - if {$displayGiven} { - error "conflicting -display $display and -use\ - $use -> $nDisplay" - } else { - set display $nDisplay - } + } + if {[string compare $nDisplay $display]} { + if {$displayGiven} { + error "conflicting -display $display and -use\ + $use -> $nDisplay" + } else { + set display $nDisplay } } + } - # Prepares the slave for tk with those parameters - - tkInterpInit $slave [list "-use" $use "-display" $display] - - load {} Tk $slave + # Prepares the slave for tk with those parameters + + tkInterpInit $slave [list "-use" $use "-display" $display] + + load {} Tk $slave - return $slave - } + return $slave +} proc ::safe::TkInit {interpPath} { variable tkInit @@ -135,25 +153,73 @@ proc ::safe::TkInit {interpPath} { } } +# safe::allowTk -- +# +# Set tkInit(interpPath) to allow Tk to be initialized in +# safe::TkInit. +# +# Arguments: +# interpPath slave interpreter handle +# argv arguments passed to safe::TkInterpInit +# +# Results: +# none. + proc ::safe::allowTk {interpPath argv} { variable tkInit set tkInit($interpPath) $argv + return } - proc ::safe::tkDelete {W window slave} { - # we are going to be called for each widget... skip untill it's - # top level - Log $slave "Called tkDelete $W $window" NOTICE; - if {[::interp exists $slave]} { - if {[catch {::safe::interpDelete $slave} msg]} { - Log $slave "Deletion error : $msg"; - } - } - if {[winfo exists $window]} { - Log $slave "Destroy toplevel $window" NOTICE; - destroy $window; + +# safe::disallowTk -- +# +# Unset tkInit(interpPath) to disallow Tk from getting initialized +# in safe::TkInit. +# +# Arguments: +# interpPath slave interpreter handle +# +# Results: +# none. + +proc ::safe::disallowTk {interpPath} { + variable tkInit + unset tkInit($interpPath) + none +} + + +# safe::disallowTk -- +# +# Clean up the window associated with the interp being deleted. +# +# Arguments: +# interpPath slave interpreter handle +# +# Results: +# none. + +proc ::safe::tkDelete {W window slave} { + + # we are going to be called for each widget... skip untill it's + # top level + + Log $slave "Called tkDelete $W $window" NOTICE; + if {[::interp exists $slave]} { + if {[catch {::safe::interpDelete $slave} msg]} { + Log $slave "Deletion error : $msg"; } } + if {[winfo exists $window]} { + Log $slave "Destroy toplevel $window" NOTICE; + destroy $window; + } + + # clean up tkInit(slave) + disallowTk $slave + return +} proc ::safe::tkTopLevel {slave display} { variable tkSafeId; diff --git a/library/scale.tcl b/library/scale.tcl index a761a01..e36dbe8 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scale.tcl,v 1.3 1998/09/14 18:23:24 stanton Exp $ +# RCS: @(#) $Id: scale.tcl,v 1.4 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -32,7 +32,7 @@ bind Scale <Leave> { if {$tk_strictMotif} { %W config -activebackground $tkPriv(activeBg) } - if {[%W cget -state] == "active"} { + if {![string compare [%W cget -state] "active"]} { %W configure -state normal } } @@ -107,10 +107,10 @@ bind Scale <End> { proc tkScaleActivate {w x y} { global tkPriv - if {[$w cget -state] == "disabled"} { - return; + if {![string compare [$w cget -state] "disabled"]} { + return } - if {[$w identify $x $y] == "slider"} { + if {![string compare [$w identify $x $y] "slider"]} { $w configure -state active } else { $w configure -state normal @@ -129,11 +129,11 @@ proc tkScaleButtonDown {w x y} { global tkPriv set tkPriv(dragging) 0 set el [$w identify $x $y] - if {$el == "trough1"} { + if {![string compare $el "trough1"]} { tkScaleIncrement $w up little initial - } elseif {$el == "trough2"} { + } elseif {![string compare $el "trough2"]} { tkScaleIncrement $w down little initial - } elseif {$el == "slider"} { + } elseif {![string compare $el "slider"]} { set tkPriv(dragging) 1 set tkPriv(initValue) [$w get] set coords [$w coords] @@ -194,7 +194,7 @@ proc tkScaleEndDrag {w} { proc tkScaleIncrement {w dir big repeat} { global tkPriv if {![winfo exists $w]} return - if {$big == "big"} { + if {![string compare $big "big"]} { set inc [$w cget -bigincrement] if {$inc == 0} { set inc [expr {abs([$w cget -to] - [$w cget -from])/10.0}] @@ -205,15 +205,15 @@ proc tkScaleIncrement {w dir big repeat} { } else { set inc [$w cget -resolution] } - if {([$w cget -from] > [$w cget -to]) ^ ($dir == "up")} { + if {([$w cget -from] > [$w cget -to]) ^ ![string compare $dir "up"]} { set inc [expr {-$inc}] } $w set [expr {[$w get] + $inc}] - if {$repeat == "again"} { + if {![string compare $repeat "again"]} { set tkPriv(afterId) [after [$w cget -repeatinterval] \ tkScaleIncrement $w $dir $big again] - } elseif {$repeat == "initial"} { + } elseif {![string compare $repeat "initial"]} { set delay [$w cget -repeatdelay] if {$delay > 0} { set tkPriv(afterId) [after $delay \ @@ -233,9 +233,9 @@ proc tkScaleIncrement {w dir big repeat} { proc tkScaleControlPress {w x y} { set el [$w identify $x $y] - if {$el == "trough1"} { + if {![string compare $el "trough1"]} { $w set [$w cget -from] - } elseif {$el == "trough2"} { + } elseif {![string compare $el "trough2"]} { $w set [$w cget -to] } } @@ -252,8 +252,8 @@ proc tkScaleControlPress {w x y} { proc tkScaleButton2Down {w x y} { global tkPriv - if {[$w cget -state] == "disabled"} { - return; + if {![string compare [$w cget -state] "disabled"]} { + return } $w configure -state active $w set [$w get $x $y] diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 48f2c11..93d4a3c 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scrollbar widgets. # It also provides procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scrlbar.tcl,v 1.4 1998/11/12 06:22:05 welch Exp $ +# RCS: @(#) $Id: scrlbar.tcl,v 1.5 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,8 +17,8 @@ #------------------------------------------------------------------------- # Standard Motif bindings: -if {($tcl_platform(platform) != "windows") && - ($tcl_platform(platform) != "macintosh")} { +if {[string compare $tcl_platform(platform) "windows"] && + [string compare $tcl_platform(platform) "macintosh"]} { bind Scrollbar <Enter> { if {$tk_strictMotif} { set tkPriv(activeBg) [%W cget -activebackground] @@ -144,7 +144,7 @@ proc tkScrollButtonDown {w x y} { set tkPriv(relief) [$w cget -activerelief] $w configure -activerelief sunken set element [$w identify $x $y] - if {$element == "slider"} { + if {![string compare $element "slider"]} { tkScrollStartDrag $w $x $y } else { tkScrollSelect $w $element initial @@ -185,21 +185,17 @@ proc tkScrollButtonUp {w x y} { proc tkScrollSelect {w element repeat} { global tkPriv if {![winfo exists $w]} return - if {$element == "arrow1"} { - tkScrollByUnits $w hv -1 - } elseif {$element == "trough1"} { - tkScrollByPages $w hv -1 - } elseif {$element == "trough2"} { - tkScrollByPages $w hv 1 - } elseif {$element == "arrow2"} { - tkScrollByUnits $w hv 1 - } else { - return + switch -- $element { + "arrow1" {tkScrollByUnits $w hv -1} + "trough1" {tkScrollByPages $w hv -1} + "trough2" {tkScrollByPages $w hv 1} + "arrow2" {tkScrollByUnits $w hv 1} + default {return} } - if {$repeat == "again"} { + if {![string compare $repeat "again"]} { set tkPriv(afterId) [after [$w cget -repeatinterval] \ tkScrollSelect $w $element again] - } elseif {$repeat == "initial"} { + } elseif {![string compare $repeat "initial"]} { set delay [$w cget -repeatdelay] if {$delay > 0} { set tkPriv(afterId) [after $delay tkScrollSelect $w $element again] @@ -218,7 +214,7 @@ proc tkScrollSelect {w element repeat} { proc tkScrollStartDrag {w x y} { global tkPriv - if {[$w cget -command] == ""} { + if {![string compare [$w cget -command] ""]} { return } set tkPriv(pressX) $x @@ -250,7 +246,7 @@ proc tkScrollStartDrag {w x y} { proc tkScrollDrag {w x y} { global tkPriv - if {$tkPriv(initPos) == ""} { + if {![string compare $tkPriv(initPos) ""]} { return } set delta [$w delta [expr {$x - $tkPriv(pressX)}] [expr {$y - $tkPriv(pressY)}]] @@ -280,7 +276,7 @@ proc tkScrollDrag {w x y} { proc tkScrollEndDrag {w x y} { global tkPriv - if {$tkPriv(initPos) == ""} { + if {![string compare $tkPriv(initPos) ""]} { return } if {[$w cget -jump]} { @@ -304,7 +300,7 @@ proc tkScrollEndDrag {w x y} { proc tkScrollByUnits {w orient amount} { set cmd [$w cget -command] - if {($cmd == "") || ([string first \ + if {![string compare $cmd ""] || ([string first \ [string index [$w cget -orient] 0] $orient] < 0)} { return } @@ -329,7 +325,7 @@ proc tkScrollByUnits {w orient amount} { proc tkScrollByPages {w orient amount} { set cmd [$w cget -command] - if {($cmd == "") || ([string first \ + if {![string compare $cmd ""] || ([string first \ [string index [$w cget -orient] 0] $orient] < 0)} { return } @@ -353,7 +349,7 @@ proc tkScrollByPages {w orient amount} { proc tkScrollToPos {w pos} { set cmd [$w cget -command] - if {($cmd == "")} { + if {![string compare $cmd ""]} { return } set info [$w get] @@ -399,7 +395,8 @@ proc tkScrollTopBottom {w x y} { proc tkScrollButton2Down {w x y} { global tkPriv set element [$w identify $x $y] - if {($element == "arrow1") || ($element == "arrow2")} { + if {![string compare $element "arrow1"] + || ![string compare $element "arrow2"]} { tkScrollButtonDown $w $x $y return } diff --git a/library/tearoff.tcl b/library/tearoff.tcl index c68c32d..7a240c3 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -2,7 +2,7 @@ # # This file contains procedures that implement tear-off menus. # -# RCS: @(#) $Id: tearoff.tcl,v 1.3 1998/09/14 18:23:25 stanton Exp $ +# RCS: @(#) $Id: tearoff.tcl,v 1.4 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -40,11 +40,11 @@ proc tkTearOffMenu {w {x 0} {y 0}} { } set parent [winfo parent $w] - while {([winfo toplevel $parent] != $parent) - || ([winfo class $parent] == "Menu")} { + while {[string compare [winfo toplevel $parent] $parent] + || ![string compare [winfo class $parent] "Menu"]} { set parent [winfo parent $parent] } - if {$parent == "."} { + if {![string compare $parent "."]} { set parent "" } for {set i 1} 1 {incr i} { @@ -61,7 +61,7 @@ proc tkTearOffMenu {w {x 0} {y 0}} { # entry. If it's a menubutton then use its text. set parent [winfo parent $w] - if {[$menu cget -title] != ""} { + if {[string compare [$menu cget -title] ""]} { wm title $menu [$menu cget -title] } else { switch [winfo class $parent] { @@ -92,7 +92,7 @@ proc tkTearOffMenu {w {x 0} {y 0}} { # now. set cmd [$w cget -tearoffcommand] - if {$cmd != ""} { + if {[string compare $cmd ""]} { uplevel #0 $cmd $w $menu } return $menu @@ -121,7 +121,7 @@ proc tkMenuDup {src dst type} { } eval $cmd set last [$src index last] - if {$last == "none"} { + if {![string compare $last "none"]} { return } for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { @@ -134,12 +134,33 @@ proc tkMenuDup {src dst type} { # Duplicate the binding tags and bindings from the source menu. - regsub -all . $src {\\&} quotedSrc - regsub -all . $dst {\\&} quotedDst - regsub -all $quotedSrc [bindtags $src] $dst x + set tags [bindtags $src] + set srcLen [string length $src] + + # Copy tags to x, replacing each substring of src with dst. + + while {[set index [string first $src $tags]] != -1} { + append x [string range $tags 0 [expr {$index - 1}]]$dst + set tags [string range $tags [expr {$index + $srcLen}] end] + } + append x $tags + bindtags $dst $x + foreach event [bind $src] { - regsub -all $quotedSrc [bind $src $event] $dst x + unset x + set script [bind $src $event] + set eventLen [string length $event] + + # Copy script to x, replacing each substring of event with dst. + + while {[set index [string first $event $script]] != -1} { + append x [string range $script 0 [expr {$index - 1}]] + append x $dst + set script [string range $script [expr {$index + $eventLen}] end] + } + append x $script + bind $dst $event $x } } diff --git a/library/text.tcl b/library/text.tcl index 6ef185c..a780bda 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk text widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: text.tcl,v 1.5 1998/10/10 00:30:36 rjohnson Exp $ +# RCS: @(#) $Id: text.tcl,v 1.6 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -202,7 +202,7 @@ bind Text <Return> { tkTextInsert %W \n } bind Text <Delete> { - if {[%W tag nextrange sel 1.0 end] != ""} { + if {[string compare [%W tag nextrange sel 1.0 end] ""]} { %W delete sel.first sel.last } else { %W delete insert @@ -210,7 +210,7 @@ bind Text <Delete> { } } bind Text <BackSpace> { - if {[%W tag nextrange sel 1.0 end] != ""} { + if {[string compare [%W tag nextrange sel 1.0 end] ""]} { %W delete sel.first sel.last } elseif {[%W compare insert != 1.0]} { %W delete insert-1c @@ -272,7 +272,7 @@ bind Text <Meta-KeyPress> {# nothing} bind Text <Control-KeyPress> {# nothing} bind Text <Escape> {# nothing} bind Text <KP_Enter> {# nothing} -if {$tcl_platform(platform) == "macintosh"} { +if {![string compare $tcl_platform(platform) "macintosh"]} { bind Text <Command-KeyPress> {# nothing} } @@ -334,7 +334,7 @@ bind Text <Control-t> { } } -if {$tcl_platform(platform) != "windows"} { +if {[string compare $tcl_platform(platform) "windows"]} { bind Text <Control-v> { if {!$tk_strictMotif} { tkTextScrollPages %W 1 @@ -381,7 +381,7 @@ bind Text <Meta-Delete> { # Macintosh only bindings: # if text black & highlight black -> text white, other text the same -if {$tcl_platform(platform) == "macintosh"} { +if {![string compare $tcl_platform(platform) "macintosh"]} { bind Text <FocusIn> { %W tag configure sel -borderwidth 0 %W configure -selectbackground systemHighlight -selectforeground systemHighlightText @@ -453,7 +453,7 @@ set tkPriv(prevPos) {} # on other platforms. bind Text <MouseWheel> { - %W yview scroll [expr - (%D / 120) * 4] units + %W yview scroll [expr {- (%D / 120) * 4}] units } # tkTextClosestGap -- @@ -496,7 +496,7 @@ proc tkTextButton1 {w x y} { set tkPriv(pressX) $x $w mark set insert [tkTextClosestGap $w $x $y] $w mark set anchor insert - if {[$w cget -state] == "normal"} {focus $w} + if {![string compare [$w cget -state] "normal"]} {focus $w} } # tkTextSelectTo -- @@ -551,8 +551,9 @@ proc tkTextSelectTo {w x y} { } } } - if {$tkPriv(mouseMoved) || ($tkPriv(selectMode) != "char")} { - if {$tcl_platform(platform) != "unix" && [$w compare $cur < anchor]} { + if {$tkPriv(mouseMoved) || [string compare $tkPriv(selectMode) "char"]} { + if {[string compare $tcl_platform(platform) "unix"] + && [$w compare $cur < anchor]} { $w mark set insert $first } else { $w mark set insert $last @@ -604,7 +605,7 @@ proc tkTextKeyExtend {w index} { proc tkTextPaste {w x y} { $w mark set insert [tkTextClosestGap $w $x $y] catch {$w insert insert [selection get -displayof $w]} - if {[$w cget -state] == "normal"} {focus $w} + if {![string compare [$w cget -state] "normal"]} {focus $w} } # tkTextAutoScan -- @@ -670,7 +671,7 @@ proc tkTextSetCursor {w pos} { proc tkTextKeySelect {w new} { global tkPriv - if {[$w tag nextrange sel 1.0 end] == ""} { + if {![string compare [$w tag nextrange sel 1.0 end] ""]} { if {[$w compare $new < insert]} { $w tag add sel $new insert } else { @@ -711,7 +712,7 @@ proc tkTextKeySelect {w new} { proc tkTextResetAnchor {w index} { global tkPriv - if {[$w tag ranges sel] == ""} { + if {![string compare [$w tag ranges sel] ""]} { $w mark set anchor $index return } @@ -758,7 +759,8 @@ proc tkTextResetAnchor {w index} { # s - The string to insert (usually just a single character) proc tkTextInsert {w s} { - if {($s == "") || ([$w cget -state] == "disabled")} { + if {![string compare $s ""] || + ![string compare [$w cget -state] "disabled"]} { return } catch { @@ -812,13 +814,14 @@ proc tkTextUpDownLine {w n} { proc tkTextPrevPara {w pos} { set pos [$w index "$pos linestart"] while 1 { - if {(([$w get "$pos - 1 line"] == "\n") && ([$w get $pos] != "\n")) - || ($pos == "1.0")} { + if {(![string compare [$w get "$pos - 1 line"] "\n"] + && [string compare [$w get $pos] "\n"]) + || ![string compare $pos "1.0"]} { if {[regexp -indices {^[ ]+(.)} [$w get $pos "$pos lineend"] \ dummy index]} { set pos [$w index "$pos + [lindex $index 0] chars"] } - if {[$w compare $pos != insert] || ($pos == "1.0")} { + if {[$w compare $pos != insert] || ![string compare $pos 1.0]} { return $pos } } @@ -837,13 +840,13 @@ proc tkTextPrevPara {w pos} { proc tkTextNextPara {w start} { set pos [$w index "$start linestart + 1 line"] - while {[$w get $pos] != "\n"} { + while {[string compare [$w get $pos] "\n"]} { if {[$w compare $pos == end]} { return [$w index "end - 1c"] } set pos [$w index "$pos + 1 line"] } - while {[$w get $pos] == "\n"} { + while {![string compare [$w get $pos] "\n"]} { set pos [$w index "$pos + 1 line"] if {[$w compare $pos == end]} { return [$w index "end - 1c"] @@ -871,7 +874,7 @@ proc tkTextNextPara {w start} { proc tkTextScrollPages {w count} { set bbox [$w bbox insert] $w yview scroll $count pages - if {$bbox == ""} { + if {![string compare $bbox ""]} { return [$w index @[expr {[winfo height $w]/2}],0] } return [$w index @[lindex $bbox 0],[lindex $bbox 1]] @@ -941,7 +944,7 @@ proc tk_textCut w { proc tk_textPaste w { global tcl_platform catch { - if {"$tcl_platform(platform)" != "unix"} { + if {[string compare $tcl_platform(platform) "unix"]} { catch { $w delete sel.first sel.last } @@ -960,7 +963,7 @@ proc tk_textPaste w { # w - The text window in which the cursor is to move. # start - Position at which to start search. -if {$tcl_platform(platform) == "windows"} { +if {![string compare $tcl_platform(platform) "windows"]} { proc tkTextNextWord {w start} { tkTextNextPos $w [tkTextNextPos $w $start tcl_endOfWord] \ tcl_startOfNextWord diff --git a/library/tk.tcl b/library/tk.tcl index 4e9cb08..0a4aaae 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -3,7 +3,7 @@ # Initialization script normally executed in the interpreter for each # Tk-based application. Arranges class bindings for widgets. # -# RCS: @(#) $Id: tk.tcl,v 1.6 1999/01/04 19:25:27 rjohnson Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.7 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -14,8 +14,8 @@ # Insist on running with compatible versions of Tcl and Tk. -package require -exact Tk 8.0 -package require -exact Tcl 8.0 +package require -exact Tk 8.1 +package require -exact Tcl 8.1 # Add Tk's directory to the end of the auto-load search path, if it # isn't already on the path: @@ -56,27 +56,29 @@ proc tkScreenChanged screen { set tkPriv(screen) $screen return } - set tkPriv(activeMenu) {} - set tkPriv(activeItem) {} - set tkPriv(afterId) {} - set tkPriv(buttons) 0 - set tkPriv(buttonWindow) {} - set tkPriv(dragging) 0 - set tkPriv(focus) {} - set tkPriv(grab) {} - set tkPriv(initPos) {} - set tkPriv(inMenubutton) {} - set tkPriv(listboxPrev) {} - set tkPriv(menuBar) {} - set tkPriv(mouseMoved) 0 - set tkPriv(oldGrab) {} - set tkPriv(popup) {} - set tkPriv(postedMb) {} - set tkPriv(pressX) 0 - set tkPriv(pressY) 0 - set tkPriv(prevPos) 0 + array set tkPriv { + activeMenu {} + activeItem {} + afterId {} + buttons 0 + buttonWindow {} + dragging 0 + focus {} + grab {} + initPos {} + inMenubutton {} + listboxPrev {} + menuBar {} + mouseMoved 0 + oldGrab {} + popup {} + postedMb {} + pressX 0 + pressY 0 + prevPos 0 + selectMode char + } set tkPriv(screen) $screen - set tkPriv(selectMode) char if {[string compare $tcl_platform(platform) "unix"] == 0} { set tkPriv(tearoff) 1 } else { @@ -114,6 +116,40 @@ proc tkEventMotifBindings {n1 dummy dummy} { } #---------------------------------------------------------------------- +# Define common dialogs on platforms where they are not implemented +# using compiled code. +#---------------------------------------------------------------------- + +if {![string compare [info commands tk_chooseColor] ""]} { + proc tk_chooseColor {args} { + return [eval tkColorDialog $args] + } +} +if {![string compare [info commands tk_getOpenFile] ""]} { + proc tk_getOpenFile {args} { + if {$::tk_strictMotif} { + return [eval tkMotifFDialog open $args] + } else { + return [eval tkFDialog open $args] + } + } +} +if {![string compare [info commands tk_getSaveFile] ""]} { + proc tk_getSaveFile {args} { + if {$::tk_strictMotif} { + return [eval tkMotifFDialog save $args] + } else { + return [eval tkFDialog save $args] + } + } +} +if {![string compare [info commands tk_messageBox] ""]} { + proc tk_messageBox {args} { + return [eval tkMessageBox $args] + } +} + +#---------------------------------------------------------------------- # Define the set of common virtual events. #---------------------------------------------------------------------- @@ -145,7 +181,7 @@ switch $tcl_platform(platform) { # Read in files that define all of the class bindings. # ---------------------------------------------------------------------- -if {$tcl_platform(platform) != "macintosh"} { +if {[string compare $tcl_platform(platform) "macintosh"]} { source [file join $tk_library button.tcl] source [file join $tk_library entry.tcl] source [file join $tk_library listbox.tcl] @@ -185,7 +221,7 @@ proc tkCancelRepeat {} { # w - Window to which focus should be set. proc tkTabToWindow {w} { - if {"[winfo class $w]" == "Entry"} { + if {![string compare [winfo class $w] Entry]} { $w select range 0 end $w icur end } diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 2fa9578..ec56b48 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,9 +11,9 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.8 1998/11/12 06:22:05 welch Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.9 1999/04/16 01:51:27 stanton Exp $ # -# Copyright (c) 1994-1996 Sun Microsystems, Inc. +# Copyright (c) 1994-1998 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -95,10 +95,10 @@ proc tkIconList_Create {w} { bind $data(canvas) <1> "tkIconList_Btn1 $w %x %y" bind $data(canvas) <B1-Motion> "tkIconList_Motion1 $w %x %y" - bind $data(canvas) <Double-1> "tkIconList_Double1 $w %x %y" - bind $data(canvas) <ButtonRelease-1> "tkCancelRepeat" bind $data(canvas) <B1-Leave> "tkIconList_Leave1 $w %x %y" bind $data(canvas) <B1-Enter> "tkCancelRepeat" + bind $data(canvas) <ButtonRelease-1> "tkCancelRepeat" + bind $data(canvas) <Double-ButtonRelease-1> "tkIconList_Double1 $w %x %y" bind $data(canvas) <Up> "tkIconList_UpDown $w -1" bind $data(canvas) <Down> "tkIconList_UpDown $w 1" @@ -628,23 +628,22 @@ proc tkIconList_Reset {w} { # the tk_strictMotif flag is set to false. This procedure shouldn't # be called directly. Call tk_getOpenFile or tk_getSaveFile instead. # -proc tkFDialog {args} { - global tkPriv - set w __tk_filedialog - upvar #0 $w data +# Arguments: +# type "open" or "save" +# args Options parsed by the procedure. +# - if {![string compare [lindex [info level 0] 0] tk_getOpenFile]} { - set type open - } else { - set type save - } +proc tkFDialog {type args} { + global tkPriv + set dataName __tk_filedialog + upvar #0 $dataName data - tkFDialog_Config $w $type $args + tkFDialog_Config $dataName $type $args if {![string compare $data(-parent) .]} { - set w .$w + set w .$dataName } else { - set w $data(-parent).$w + set w $data(-parent).$dataName } # (re)create the dialog box if necessary @@ -668,7 +667,9 @@ proc tkFDialog {args} { } wm transient $w $data(-parent) - # 5. Initialize the file types menu + trace variable data(selectPath) w "tkFDialog_SetPath $w" + + # Initialize the file types menu # if {$data(-filetypes) != {}} { $data(typeMenu) delete 0 end @@ -689,7 +690,7 @@ proc tkFDialog {args} { tkFDialog_UpdateWhenIdle $w - # 6. Withdraw the window, then update all the geometry information + # Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display and de-iconify it. @@ -703,7 +704,7 @@ proc tkFDialog {args} { wm deiconify $w wm title $w $data(-title) - # 7. Set a grab and claim the focus too. + # Set a grab and claim the focus too. set oldFocus [focus] set oldGrab [grab current $w] @@ -718,7 +719,7 @@ proc tkFDialog {args} { $data(ent) select to end $data(ent) icursor end - # 8. Wait for the user to respond, then restore the focus and + # Wait for the user to respond, then restore the focus and # return the index of the selected button. Restore the focus # before deleting the window, since otherwise the window manager # may take the focus away so we can't redirect it. Finally, @@ -735,6 +736,7 @@ proc tkFDialog {args} { grab $oldGrab } } + return $tkPriv(selectFilePath) } @@ -742,11 +744,19 @@ proc tkFDialog {args} { # # Configures the TK filedialog according to the argument list # -proc tkFDialog_Config {w type argList} { - upvar #0 $w data +proc tkFDialog_Config {dataName type argList} { + upvar #0 $dataName data set data(type) $type + # 0: Delete all variable that were set on data(selectPath) the + # last time the file dialog is used. The traces may cause troubles + # if the dialog is now used with a different -parent option. + + foreach trace [trace vinfo data(selectPath)] { + trace vdelete data(selectPath) [lindex $trace 0] [lindex $trace 1] + } + # 1: the configuration specs # set specs { @@ -768,7 +778,7 @@ proc tkFDialog_Config {w type argList} { # 3: parse the arguments # - tclParseConfigSpec $w $specs "" $argList + tclParseConfigSpec $dataName $specs "" $argList if {![string compare $data(-title) ""]} { if {![string compare $type "open"]} { @@ -782,9 +792,8 @@ proc tkFDialog_Config {w type argList} { # settings # if {[string compare $data(-initialdir) ""]} { - if {[file isdirectory $data(-initialdir)]} { - set data(selectPath) [glob $data(-initialdir)] + set data(selectPath) [lindex [glob $data(-initialdir)] 0] } else { set data(selectPath) [pwd] } @@ -915,8 +924,6 @@ static char updir_bits[] = { $data(okBtn) config -command "tkFDialog_OkCmd $w" $data(cancelBtn) config -command "tkFDialog_CancelCmd $w" - trace variable data(selectPath) w "tkFDialog_SetPath $w" - bind $w <Alt-d> "focus $data(dirMenuBtn)" bind $w <Alt-t> [format { if {"[%s cget -state]" == "normal"} { @@ -1068,6 +1075,14 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # cd $appPWD + # Restore the Open/Save Button + # + if {![string compare $data(type) open]} { + $data(okBtn) config -text "Open" + } else { + $data(okBtn) config -text "Save" + } + # turn off the busy cursor. # $data(ent) config -cursor $entCursor diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 15ff0ac..2080c97 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -4,53 +4,105 @@ # Unix platform. This implementation is used only if the # "tk_strictMotif" flag is set. # -# RCS: @(#) $Id: xmfbox.tcl,v 1.6 1998/11/12 06:22:05 welch Exp $ +# RCS: @(#) $Id: xmfbox.tcl,v 1.7 1999/04/16 01:51:27 stanton Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# - # tkMotifFDialog -- # # Implements a file dialog similar to the standard Motif file # selection box. # -# Return value: +# Arguments: +# type "open" or "save" +# args Options parsed by the procedure. # +# Results: # A list of two members. The first member is the absolute # pathname of the selected file or "" if user hits cancel. The # second member is the name of the selected file type, or "" # which stands for "default file type" -# -proc tkMotifFDialog {args} { + +proc tkMotifFDialog {type args} { global tkPriv - set w __tk_filedialog - upvar #0 $w data + set dataName __tk_filedialog + upvar #0 $dataName data - if {![string compare [lindex [info level 0] 0] tk_getOpenFile]} { - set type open - } else { - set type save + set w [tkMotifFDialog_Create $dataName $type $args] + + # Set a grab and claim the focus too. + + set oldFocus [focus] + set oldGrab [grab current $w] + if {$oldGrab != ""} { + set grabStatus [grab status $oldGrab] } + grab $w + focus $data(sEnt) + $data(sEnt) select from 0 + $data(sEnt) select to end + + # Wait for the user to respond, then restore the focus and + # return the index of the selected button. Restore the focus + # before deleting the window, since otherwise the window manager + # may take the focus away so we can't redirect it. Finally, + # restore any grab that was in effect. - tkMotifFDialog_Config $w $type $args + tkwait variable tkPriv(selectFilePath) + catch {focus $oldFocus} + grab release $w + wm withdraw $w + if {$oldGrab != ""} { + if {$grabStatus == "global"} { + grab -global $oldGrab + } else { + grab $oldGrab + } + } + return $tkPriv(selectFilePath) +} + +# tkMotifFDialog_Create -- +# +# Creates the Motif file dialog (if it doesn't exist yet) and +# initialize the internal data structure associated with the +# dialog. +# +# This procedure is used by tkMotifFDialog to create the +# dialog. It's also used by the test suite to test the Motif +# file dialog implementation. User code shouldn't call this +# procedure directly. +# +# Arguments: +# dataName Name of the global "data" array for the file dialog. +# type "Save" or "Open" +# argList Options parsed by the procedure. +# +# Results: +# Pathname of the file dialog. + +proc tkMotifFDialog_Create {dataName type argList} { + global tkPriv + upvar #0 $dataName data + + tkMotifFDialog_Config $dataName $type $argList if {![string compare $data(-parent) .]} { - set w .$w + set w .$dataName } else { - set w $data(-parent).$w + set w $data(-parent).$dataName } # (re)create the dialog box if necessary # if {![winfo exists $w]} { - tkMotifFDialog_Create $w + tkMotifFDialog_BuildUI $w } elseif {[string compare [winfo class $w] TkMotifFDialog]} { destroy $w - tkMotifFDialog_Create $w + tkMotifFDialog_BuildUI $w } else { set data(fEnt) $w.top.f1.ent set data(dList) $w.top.f2.a.l @@ -60,58 +112,42 @@ proc tkMotifFDialog {args} { set data(filterBtn) $w.bot.filter set data(cancelBtn) $w.bot.cancel } + wm transient $w $data(-parent) tkMotifFDialog_Update $w - # 5. Withdraw the window, then update all the geometry information + # Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the # display and de-iconify it. wm withdraw $w update idletasks - set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - - [winfo vrootx [winfo parent $w]]}] - set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - - [winfo vrooty [winfo parent $w]]}] + set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ + - [winfo vrootx [winfo parent $w]]] + set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ + - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w wm title $w $data(-title) - # 6. Set a grab and claim the focus too. - - set oldFocus [focus] - set oldGrab [grab current $w] - if {$oldGrab != ""} { - set grabStatus [grab status $oldGrab] - } - grab $w - focus $data(sEnt) - $data(sEnt) select from 0 - $data(sEnt) select to end - - # 7. Wait for the user to respond, then restore the focus and - # return the index of the selected button. Restore the focus - # before deleting the window, since otherwise the window manager - # may take the focus away so we can't redirect it. Finally, - # restore any grab that was in effect. - - tkwait variable tkPriv(selectFilePath) - catch {focus $oldFocus} - grab release $w - wm withdraw $w - if {$oldGrab != ""} { - if {$grabStatus == "global"} { - grab -global $oldGrab - } else { - grab $oldGrab - } - } - return $tkPriv(selectFilePath) + return $w } -proc tkMotifFDialog_Config {w type argList} { - upvar #0 $w data +# tkMotifFDialog_Config -- +# +# Iterates over the optional arguments to determine the option +# values for the Motif file dialog; gives default values to +# unspecified options. +# +# Arguments: +# dataName The name of the global variable in which +# data for the file dialog is stored. +# type "Save" or "Open" +# argList Options parsed by the procedure. + +proc tkMotifFDialog_Config {dataName type argList} { + upvar #0 $dataName data set data(type) $type @@ -136,7 +172,7 @@ proc tkMotifFDialog_Config {w type argList} { # 3: parse the arguments # - tclParseConfigSpec $w $specs "" $argList + tclParseConfigSpec $dataName $specs "" $argList if {![string compare $data(-title) ""]} { if {![string compare $type "open"]} { @@ -179,11 +215,21 @@ proc tkMotifFDialog_Config {w type argList} { } } -proc tkMotifFDialog_Create {w} { +# tkMotifFDialog_BuildUI -- +# +# Builds the UI components of the Motif file dialog. +# +# Arguments: +# w Pathname of the dialog to build. +# +# Results: +# None. + +proc tkMotifFDialog_BuildUI {w} { set dataName [lindex [split $w .] end] upvar #0 $dataName data - # 1: Create the dialog ... + # Create the dialog toplevel and internal frames. # toplevel $w -class TkMotifFDialog set top [frame $w.top -relief raised -bd 1] @@ -261,7 +307,22 @@ proc tkMotifFDialog_Create {w} { wm protocol $w WM_DELETE_WINDOW "tkMotifFDialog_CancelCmd $w" } -proc tkMotifFDialog_MakeSList {w f label under cmd} { +# tkMotifFDialog_MakeSList -- +# +# Create a scrolled-listbox and set the keyboard accelerator +# bindings so that the list selection follows what the user +# types. +# +# Arguments: +# w Pathname of the dialog box. +# f Frame widget inside which to create the scrolled +# listbox. This frame widget already exists. +# label The string to display on top of the listbox. +# under Sets the -under option of the label. +# cmdPrefix Specifies procedures to call when the listbox is +# browsed or activated. + +proc tkMotifFDialog_MakeSList {w f label under cmdPrefix} { label $f.lab -text $label -under $under -anchor w listbox $f.l -width 12 -height 5 -selectmode browse -exportselection 0\ -xscrollcommand "$f.h set" \ @@ -283,13 +344,14 @@ proc tkMotifFDialog_MakeSList {w f label under cmd} { # bindings for the listboxes # set list $f.l - bind $list <Up> "tkMotifFDialog_Browse$cmd $w" - bind $list <Down> "tkMotifFDialog_Browse$cmd $w" - bind $list <space> "tkMotifFDialog_Browse$cmd $w" - bind $list <1> "tkMotifFDialog_Browse$cmd $w" - bind $list <B1-Motion> "tkMotifFDialog_Browse$cmd $w" - bind $list <Double-1> "tkMotifFDialog_Activate$cmd $w" - bind $list <Return> "tkMotifFDialog_Browse$cmd $w; tkMotifFDialog_Activate$cmd $w" + bind $list <Up> "tkMotifFDialog_Browse$cmdPrefix $w" + bind $list <Down> "tkMotifFDialog_Browse$cmdPrefix $w" + bind $list <space> "tkMotifFDialog_Browse$cmdPrefix $w" + bind $list <1> "tkMotifFDialog_Browse$cmdPrefix $w" + bind $list <B1-Motion> "tkMotifFDialog_Browse$cmdPrefix $w" + bind $list <Double-ButtonRelease-1> "tkMotifFDialog_Activate$cmdPrefix $w" + bind $list <Return> "tkMotifFDialog_Browse$cmdPrefix $w; \ + tkMotifFDialog_Activate$cmdPrefix $w" bindtags $list "Listbox $list [winfo toplevel $list] all" tkListBoxKeyAccel_Set $list @@ -297,6 +359,168 @@ proc tkMotifFDialog_MakeSList {w f label under cmd} { return $f.l } +# tkMotifFDialog_InterpFilter -- +# +# Interpret the string in the filter entry into two components: +# the directory and the pattern. If the string is a relative +# pathname, give a warning to the user and restore the pattern +# to original. +# +# Arguments: +# w pathname of the dialog box. +# +# Results: +# A list of two elements. The first element is the directory +# specified # by the filter. The second element is the filter +# pattern itself. + +proc tkMotifFDialog_InterpFilter {w} { + upvar #0 [winfo name $w] data + + set text [string trim [$data(fEnt) get]] + + # Perform tilde substitution + # + set badTilde 0 + if {[string compare [string index $text 0] ~] == 0} { + set list [file split $text] + set tilde [lindex $list 0] + if [catch {set tilde [glob $tilde]}] { + set badTilde 1 + } else { + set text [eval file join [concat $tilde [lrange $list 1 end]]] + } + } + + # If the string is a relative pathname, combine it + # with the current selectPath. + + set relative 0 + if {[file pathtype $text] == "relative"} { + set relative 1 + } elseif {$badTilde} { + set relative 1 + } + + if {$relative} { + tk_messageBox -icon warning -type ok \ + -message "\"$text\" must be an absolute pathname" + + $data(fEnt) delete 0 end + $data(fEnt) insert 0 [tkFDialog_JoinFile $data(selectPath) \ + $data(filter)] + + return [list $data(selectPath) $data(filter)] + } + + set resolved [tkFDialog_JoinFile [file dirname $text] [file tail $text]] + + if [file isdirectory $resolved] { + set dir $resolved + set fil $data(filter) + } else { + set dir [file dirname $resolved] + set fil [file tail $resolved] + } + + return [list $dir $fil] +} + +# tkMotifFDialog_Update +# +# Load the files and synchronize the "filter" and "selection" fields +# boxes. +# +# Arguments: +# w pathname of the dialog box. +# +# Results: +# None. + +proc tkMotifFDialog_Update {w} { + upvar #0 [winfo name $w] data + + $data(fEnt) delete 0 end + $data(fEnt) insert 0 [tkFDialog_JoinFile $data(selectPath) $data(filter)] + $data(sEnt) delete 0 end + $data(sEnt) insert 0 [tkFDialog_JoinFile $data(selectPath) \ + $data(selectFile)] + + tkMotifFDialog_LoadFiles $w +} + +# tkMotifFDialog_LoadFiles -- +# +# Loads the files and directories into the two listboxes according +# to the filter setting. +# +# Arguments: +# w pathname of the dialog box. +# +# Results: +# None. + +proc tkMotifFDialog_LoadFiles {w} { + upvar #0 [winfo name $w] data + + $data(dList) delete 0 end + $data(fList) delete 0 end + + set appPWD [pwd] + if [catch { + cd $data(selectPath) + }] { + cd $appPWD + + $data(dList) insert end ".." + return + } + + # Make the dir list + # + foreach f [lsort -dictionary [glob -nocomplain .* *]] { + if [file isdir ./$f] { + $data(dList) insert end $f + } + } + # Make the file list + # + if ![string compare $data(filter) *] { + set files [lsort -dictionary [glob -nocomplain .* *]] + } else { + set files [lsort -dictionary \ + [glob -nocomplain $data(filter)]] + } + + set top 0 + foreach f $files { + if ![file isdir ./$f] { + regsub {^[.]/} $f "" f + $data(fList) insert end $f + if [string match .* $f] { + incr top + } + } + } + + # The user probably doesn't want to see the . files. We adjust the view + # so that the listbox displays all the non-dot files + $data(fList) yview $top + + cd $appPWD +} + +# tkMotifFDialog_BrowseFList -- +# +# This procedure is called when the directory list is browsed +# (clicked-over) by the user. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. + proc tkMotifFDialog_BrowseDList {w} { upvar #0 [winfo name $w] data @@ -316,14 +540,15 @@ proc tkMotifFDialog_BrowseDList {w} { switch -- $subdir { . { - set newSpec [file join $data(selectPath) $data(filter)] + set newSpec [tkFDialog_JoinFile $data(selectPath) $data(filter)] } .. { - set newSpec [file join [file dirname $data(selectPath)] \ + set newSpec [tkFDialog_JoinFile [file dirname $data(selectPath)] \ $data(filter)] } default { - set newSpec [file join $data(selectPath) $subdir $data(filter)] + set newSpec [tkFDialog_JoinFile [tkFDialog_JoinFile \ + $data(selectPath) $subdir] $data(filter)] } } @@ -331,6 +556,17 @@ proc tkMotifFDialog_BrowseDList {w} { $data(fEnt) insert 0 $newSpec } +# tkMotifFDialog_ActivateDList -- +# +# This procedure is called when the directory list is activated +# (double-clicked) by the user. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. + proc tkMotifFDialog_ActivateDList {w} { upvar #0 [winfo name $w] data @@ -352,7 +588,7 @@ proc tkMotifFDialog_ActivateDList {w} { set newDir [file dirname $data(selectPath)] } default { - set newDir [file join $data(selectPath) $subdir] + set newDir [tkFDialog_JoinFile $data(selectPath) $subdir] } } @@ -368,6 +604,17 @@ proc tkMotifFDialog_ActivateDList {w} { } } +# tkMotifFDialog_BrowseFList -- +# +# This procedure is called when the file list is browsed +# (clicked-over) by the user. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. + proc tkMotifFDialog_BrowseFList {w} { upvar #0 [winfo name $w] data @@ -383,14 +630,26 @@ proc tkMotifFDialog_BrowseFList {w} { $data(dList) selection clear 0 end $data(fEnt) delete 0 end - $data(fEnt) insert 0 [file join $data(selectPath) $data(filter)] + $data(fEnt) insert 0 [tkFDialog_JoinFile $data(selectPath) $data(filter)] $data(fEnt) xview end $data(sEnt) delete 0 end - $data(sEnt) insert 0 [file join $data(selectPath) $data(selectFile)] + $data(sEnt) insert 0 [tkFDialog_JoinFile $data(selectPath) \ + $data(selectFile)] $data(sEnt) xview end } +# tkMotifFDialog_ActivateFList -- +# +# This procedure is called when the file list is activated +# (double-clicked) by the user. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. + proc tkMotifFDialog_ActivateFList {w} { upvar #0 [winfo name $w] data @@ -405,6 +664,18 @@ proc tkMotifFDialog_ActivateFList {w} { } } +# tkMotifFDialog_ActivateFEnt -- +# +# This procedure is called when the user presses Return inside +# the "filter" entry. It updates the dialog according to the +# text inside the filter entry. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. + proc tkMotifFDialog_ActivateFEnt {w} { upvar #0 [winfo name $w] data @@ -415,34 +686,18 @@ proc tkMotifFDialog_ActivateFEnt {w} { tkMotifFDialog_Update $w } -proc tkMotifFDialog_InterpFilter {w} { - upvar #0 [winfo name $w] data - - set text [string trim [$data(fEnt) get]] - # Perform tilde substitution - # - if {![string compare [string index $text 0] ~]} { - set list [file split $text] - set tilde [lindex $list 0] - catch { - set tilde [glob $tilde] - } - set text [eval file join [concat $tilde [lrange $list 1 end]]] - } - - set resolved [file join [file dirname $text] [file tail $text]] - - if {[file isdirectory $resolved]} { - set dir $resolved - set fil $data(filter) - } else { - set dir [file dirname $resolved] - set fil [file tail $resolved] - } - - return [list $dir $fil] -} - +# tkMotifFDialog_ActivateSEnt -- +# +# This procedure is called when the user presses Return inside +# the "selection" entry. It sets the tkPriv(selectFilePath) global +# variable so that the vwait loop in tkMotifFDialog will be +# terminated. +# +# Arguments: +# w The pathname of the dialog box. +# +# Results: +# None. proc tkMotifFDialog_ActivateSEnt {w} { global tkPriv @@ -452,7 +707,6 @@ proc tkMotifFDialog_ActivateSEnt {w} { set selectFile [file tail $selectFilePath] set selectPath [file dirname $selectFilePath] - if {![string compare $selectFilePath ""]} { tkMotifFDialog_FilterCmd $w return @@ -522,75 +776,6 @@ proc tkMotifFDialog_CancelCmd {w} { set tkPriv(selectPath) "" } -# tkMotifFDialog_Update -# -# Load the files and synchronize the "filter" and "selection" fields -# boxes. -# -# popup: -# If this is true, then update the selection field according to the -# "-selection" flag -# -proc tkMotifFDialog_Update {w} { - upvar #0 [winfo name $w] data - - $data(fEnt) delete 0 end - $data(fEnt) insert 0 [file join $data(selectPath) $data(filter)] - $data(sEnt) delete 0 end - $data(sEnt) insert 0 [file join $data(selectPath) $data(selectFile)] - - tkMotifFDialog_LoadFiles $w -} - -proc tkMotifFDialog_LoadFiles {w} { - upvar #0 [winfo name $w] data - - $data(dList) delete 0 end - $data(fList) delete 0 end - - set appPWD [pwd] - if {[catch { - cd $data(selectPath) - }]} { - cd $appPWD - - $data(dList) insert end ".." - return - } - - # Make the dir list - # - foreach f [lsort -command tclSortNoCase [glob -nocomplain .* *]] { - if {[file isdirectory $f]} { - $data(dList) insert end $f - } - } - # Make the file list - # - if {![string compare $data(filter) *]} { - set files [lsort -command tclSortNoCase [glob -nocomplain .* *]] - } else { - set files [lsort -command tclSortNoCase \ - [glob -nocomplain $data(filter)]] - } - - set top 0 - foreach f $files { - if {![file isdir $f]} { - $data(fList) insert end $f - if {[string match .* $f]} { - incr top - } - } - } - - # The user probably doesn't want to see the . files. We adjust the view - # so that the listbox displays all the non-dot files - $data(fList) yview $top - - cd $appPWD -} - proc tkListBoxKeyAccel_Set {w} { bind Listbox <Any-KeyPress> "" bind $w <Destroy> "tkListBoxKeyAccel_Unset $w" @@ -605,6 +790,20 @@ proc tkListBoxKeyAccel_Unset {w} { catch {unset tkPriv(lbAccel,$w,afterId)} } +# tkListBoxKeyAccel_Key-- +# +# This procedure maintains a list of recently entered keystrokes +# over a listbox widget. It arranges an idle event to move the +# selection of the listbox to the entry that begins with the +# keystrokes. +# +# Arguments: +# w The pathname of the listbox. +# key The key which the user just pressed. +# +# Results: +# None. + proc tkListBoxKeyAccel_Key {w key} { global tkPriv |