diff options
Diffstat (limited to 'library')
75 files changed, 88 insertions, 561 deletions
diff --git a/library/demos/anilabel.tcl b/library/demos/anilabel.tcl index be1b402..6662f9a 100644 --- a/library/demos/anilabel.tcl +++ b/library/demos/anilabel.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .anilabel catch {destroy $w} diff --git a/library/demos/aniwave.tcl b/library/demos/aniwave.tcl index 1f7e8f3..50de429 100644 --- a/library/demos/aniwave.tcl +++ b/library/demos/aniwave.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .aniwave catch {destroy $w} diff --git a/library/demos/arrow.tcl b/library/demos/arrow.tcl index 5674be9..e30406b 100644 --- a/library/demos/arrow.tcl +++ b/library/demos/arrow.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # scl -- # Scales an integer according to the display's current scaling percentage. diff --git a/library/demos/bind.tcl b/library/demos/bind.tcl index 8b56639..179310a 100644 --- a/library/demos/bind.tcl +++ b/library/demos/bind.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .bind catch {destroy $w} diff --git a/library/demos/bitmap.tcl b/library/demos/bitmap.tcl index 453987d..2787efa 100644 --- a/library/demos/bitmap.tcl +++ b/library/demos/bitmap.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # bitmapRow -- # Create a row of bitmap items in a window. diff --git a/library/demos/browse b/library/demos/browse index d107f28..e401034 100644 --- a/library/demos/browse +++ b/library/demos/browse @@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"} # directory and allows you to open files or subdirectories by # double-clicking. -package require Tk +package require tk # Create a scrollbar on the right side of the main window and a listbox # on the left side. diff --git a/library/demos/button.tcl b/library/demos/button.tcl index 0169c2a..d7cd4ce 100644 --- a/library/demos/button.tcl +++ b/library/demos/button.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .button catch {destroy $w} diff --git a/library/demos/check.tcl b/library/demos/check.tcl index 96ff251..2623618 100644 --- a/library/demos/check.tcl +++ b/library/demos/check.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .check catch {destroy $w} diff --git a/library/demos/clrpick.tcl b/library/demos/clrpick.tcl index ba50b75..7322bcf 100644 --- a/library/demos/clrpick.tcl +++ b/library/demos/clrpick.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .clrpick catch {destroy $w} diff --git a/library/demos/colors.tcl b/library/demos/colors.tcl index f1f931d..3a79cb1 100644 --- a/library/demos/colors.tcl +++ b/library/demos/colors.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .colors catch {destroy $w} diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl index 53e5a27..7f33fa9 100644 --- a/library/demos/combo.tcl +++ b/library/demos/combo.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .combo catch {destroy $w} diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl index ed21310..3d14146 100644 --- a/library/demos/cscroll.tcl +++ b/library/demos/cscroll.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .cscroll catch {destroy $w} @@ -56,7 +56,7 @@ for {set i 0} {$i < 20} {incr i} { $c bind all <Enter> "scrollEnter $c" $c bind all <Leave> "scrollLeave $c" $c bind all <Button-1> "scrollButton $c" -if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk] 8.7-]} { +if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide tk] 8.7-]} { bind $c <Button-3> "$c scan mark %x %y" bind $c <B3-Motion> "$c scan dragto %x %y" bind $c <MouseWheel> { @@ -116,7 +116,7 @@ if {([tk windowingsystem] eq "aqua") && ![package vsatisfies [package provide Tk } } -if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide Tk] 8.7-]} { +if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide tk] 8.7-]} { # Support for mousewheels on Linux/Unix commonly comes through mapping # the wheel to the extended buttons. If you have a mousewheel, find # Linux configuration info at: diff --git a/library/demos/ctext.tcl b/library/demos/ctext.tcl index 6874226..db78a20 100644 --- a/library/demos/ctext.tcl +++ b/library/demos/ctext.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ctext catch {destroy $w} @@ -50,7 +50,7 @@ $c bind text <Return> "textInsert $c \\n" $c bind text <Control-h> "textBs $c" $c bind text <BackSpace> "textBs $c" $c bind text <Delete> "textDel $c" -if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} { +if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} { $c bind text <Button-3> "textPaste $c @%x,%y" } else { $c bind text <Button-2> "textPaste $c @%x,%y" diff --git a/library/demos/entry1.tcl b/library/demos/entry1.tcl index f41c2ab..f6b087e 100644 --- a/library/demos/entry1.tcl +++ b/library/demos/entry1.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .entry1 catch {destroy $w} diff --git a/library/demos/entry2.tcl b/library/demos/entry2.tcl index ac82c6a..7f15ee1 100644 --- a/library/demos/entry2.tcl +++ b/library/demos/entry2.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .entry2 catch {destroy $w} diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl index f229de6..f6c2e8c 100644 --- a/library/demos/entry3.tcl +++ b/library/demos/entry3.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .entry3 catch {destroy $w} diff --git a/library/demos/filebox.tcl b/library/demos/filebox.tcl index a8f5c32..06dacc8 100644 --- a/library/demos/filebox.tcl +++ b/library/demos/filebox.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .filebox catch {destroy $w} diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl index 81920ed..3cec5de 100644 --- a/library/demos/floor.tcl +++ b/library/demos/floor.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # floorDisplay -- # Recreate the floorplan display in the canvas given by "w". The @@ -1372,7 +1372,7 @@ $c bind floor2 <Button-1> "floorDisplay $c 2" $c bind floor3 <Button-1> "floorDisplay $c 3" $c bind room <Enter> "newRoom $c" $c bind room <Leave> {set currentRoom ""} -if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} { +if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} { bind $c <Button-3> "$c scan mark %x %y" bind $c <B3-Motion> "$c scan dragto %x %y" } else { diff --git a/library/demos/fontchoose.tcl b/library/demos/fontchoose.tcl index 4353a4d..de9e854 100644 --- a/library/demos/fontchoose.tcl +++ b/library/demos/fontchoose.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .fontchoose catch {destroy $w} diff --git a/library/demos/form.tcl b/library/demos/form.tcl index 4d80437..f0f3109 100644 --- a/library/demos/form.tcl +++ b/library/demos/form.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .form catch {destroy $w} diff --git a/library/demos/goldberg.tcl b/library/demos/goldberg.tcl index 860d03c..5a5b462 100644 --- a/library/demos/goldberg.tcl +++ b/library/demos/goldberg.tcl @@ -40,7 +40,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .goldberg catch {destroy $w} diff --git a/library/demos/hello b/library/demos/hello index d10b8d5..d5e733d 100644 --- a/library/demos/hello +++ b/library/demos/hello @@ -6,7 +6,7 @@ exec wish "$0" ${1+"$@"} # Simple Tk script to create a button that prints "Hello, world". # Click on the button to terminate the program. -package require Tk +package require tk # The first line below creates the button, and the second line # asks the packer to shrink-wrap the application's main window diff --git a/library/demos/hscale.tcl b/library/demos/hscale.tcl index 26745bc..777b195 100644 --- a/library/demos/hscale.tcl +++ b/library/demos/hscale.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .hscale catch {destroy $w} diff --git a/library/demos/icon.tcl b/library/demos/icon.tcl index c8c1e18..14e1c0b 100644 --- a/library/demos/icon.tcl +++ b/library/demos/icon.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .icon catch {destroy $w} diff --git a/library/demos/image1.tcl b/library/demos/image1.tcl index c174a92..1e67e24 100644 --- a/library/demos/image1.tcl +++ b/library/demos/image1.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .image1 catch {destroy $w} diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl index 9691b87..f3aab60 100644 --- a/library/demos/image2.tcl +++ b/library/demos/image2.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # loadDir -- # This procedure reloads the directory listbox from the directory diff --git a/library/demos/items.tcl b/library/demos/items.tcl index 335971b..56080fd 100644 --- a/library/demos/items.tcl +++ b/library/demos/items.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .items catch {destroy $w} @@ -185,7 +185,7 @@ $c create text 28.5c 17.4c -text Scale: -anchor s $c bind item <Enter> "itemEnter $c" $c bind item <Leave> "itemLeave $c" -if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide Tk] 8.7-]} { +if {[tk windowingsystem] eq "aqua" && ![package vsatisfies [package provide tk] 8.7-]} { bind $c <Button-2> "itemMark $c %x %y" bind $c <B2-Motion> "itemStroke $c %x %y" bind $c <Button-3> "$c scan mark %x %y" diff --git a/library/demos/ixset b/library/demos/ixset index 80dba4a..c934668 100644 --- a/library/demos/ixset +++ b/library/demos/ixset @@ -9,7 +9,7 @@ exec wish "$0" ${1+"$@"} # 91/11/23 : pda@masi.ibp.fr, jt@ratp.fr : design # 92/08/01 : pda@masi.ibp.fr : cleaning -package require Tk +package require tk # # Button actions diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl index 8367477..76b6a4f 100644 --- a/library/demos/knightstour.tcl +++ b/library/demos/knightstour.tcl @@ -21,7 +21,7 @@ # If you let it repeat then it will choose random start positions # for each new tour. -package require Tk +package require tk # Return a list of accessible squares from a given square proc ValidMoves {square} { diff --git a/library/demos/label.tcl b/library/demos/label.tcl index d2823e1..0644de8 100644 --- a/library/demos/label.tcl +++ b/library/demos/label.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .label catch {destroy $w} diff --git a/library/demos/labelframe.tcl b/library/demos/labelframe.tcl index b40bd54..08e8a23 100644 --- a/library/demos/labelframe.tcl +++ b/library/demos/labelframe.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .labelframe catch {destroy $w} diff --git a/library/demos/mac_styles.tcl b/library/demos/mac_styles.tcl index 33fa888..3fff03c 100644 --- a/library/demos/mac_styles.tcl +++ b/library/demos/mac_styles.tcl @@ -8,12 +8,10 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk - set w .mac_styles catch {destroy $w} toplevel $w -package require Tk +package require tk wm title $w "Tk Aqua Widgets" wm iconname $w "mac_styles" positionWindow $w diff --git a/library/demos/mac_tabs.tcl b/library/demos/mac_tabs.tcl index 16771a8..fea9b03 100644 --- a/library/demos/mac_tabs.tcl +++ b/library/demos/mac_tabs.tcl @@ -8,12 +8,11 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk catch {font create giant -family {Times New Roman} -size 64} set w .mac_tabs catch {destroy $w} toplevel $w -package require Tk wm title $w "Tabbed Windows in Aqua" wm iconname $w "mac_tabs" positionWindow $w diff --git a/library/demos/mac_wm.tcl b/library/demos/mac_wm.tcl index 3272623..105c12c 100644 --- a/library/demos/mac_wm.tcl +++ b/library/demos/mac_wm.tcl @@ -8,12 +8,11 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .mac_wm catch {destroy $w} toplevel $w -package require Tk wm title $w "Tk Aqua Window Styles" wm iconname $w "mac_wm" positionWindow $w diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl index 086fbf5..a60a00f 100644 --- a/library/demos/mclist.tcl +++ b/library/demos/mclist.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .mclist catch {destroy $w} diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index d43a374..2a8ad1c 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .menu catch {destroy $w} diff --git a/library/demos/menubu.tcl b/library/demos/menubu.tcl index cb52f43..a45fe84 100644 --- a/library/demos/menubu.tcl +++ b/library/demos/menubu.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .menubu catch {destroy $w} diff --git a/library/demos/msgbox.tcl b/library/demos/msgbox.tcl index 6f34e16..1c9a319 100644 --- a/library/demos/msgbox.tcl +++ b/library/demos/msgbox.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .msgbox catch {destroy $w} diff --git a/library/demos/paned1.tcl b/library/demos/paned1.tcl index 829988a..8e2568b 100644 --- a/library/demos/paned1.tcl +++ b/library/demos/paned1.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .paned1 catch {destroy $w} diff --git a/library/demos/paned2.tcl b/library/demos/paned2.tcl index 73af21d..feb0254 100644 --- a/library/demos/paned2.tcl +++ b/library/demos/paned2.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .paned2 catch {destroy $w} diff --git a/library/demos/pendulum.tcl b/library/demos/pendulum.tcl index d76a1ec..060c070 100644 --- a/library/demos/pendulum.tcl +++ b/library/demos/pendulum.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .pendulum catch {destroy $w} diff --git a/library/demos/plot.tcl b/library/demos/plot.tcl index 5df318b..32bc2d5 100644 --- a/library/demos/plot.tcl +++ b/library/demos/plot.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .plot catch {destroy $w} diff --git a/library/demos/puzzle.tcl b/library/demos/puzzle.tcl index 30c0562..aab5744 100644 --- a/library/demos/puzzle.tcl +++ b/library/demos/puzzle.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # puzzleSwitch -- # This procedure is invoked when the user clicks on a particular button; diff --git a/library/demos/radio.tcl b/library/demos/radio.tcl index 41f8db2..c6f5135 100644 --- a/library/demos/radio.tcl +++ b/library/demos/radio.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .radio catch {destroy $w} diff --git a/library/demos/rmt b/library/demos/rmt index 00bdc9d..21c6ca0 100644 --- a/library/demos/rmt +++ b/library/demos/rmt @@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"} # Tk applications. It allows you to select an application and # then type commands to that application. -package require Tk +package require tk wm title . "Tk Remote Controller" wm iconname . "Tk Remote" diff --git a/library/demos/rolodex b/library/demos/rolodex index d82faf9..891c666 100644 --- a/library/demos/rolodex +++ b/library/demos/rolodex @@ -8,7 +8,7 @@ exec wish "$0" ${1+"$@"} # feel of a rolodex program, although it's lifeless and doesn't # actually do the rolodex application. -package require Tk +package require tk foreach i [winfo children .] { catch {destroy $i} diff --git a/library/demos/ruler.tcl b/library/demos/ruler.tcl index 0b78370..761892e 100644 --- a/library/demos/ruler.tcl +++ b/library/demos/ruler.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # rulerMkTab -- # This procedure creates a new triangular polygon in a canvas to diff --git a/library/demos/sayings.tcl b/library/demos/sayings.tcl index 3458016..b7be791 100644 --- a/library/demos/sayings.tcl +++ b/library/demos/sayings.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .sayings catch {destroy $w} diff --git a/library/demos/search.tcl b/library/demos/search.tcl index b4beb28..f4913f8 100644 --- a/library/demos/search.tcl +++ b/library/demos/search.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # textLoadFile -- # This procedure below loads a file into a text widget, discarding diff --git a/library/demos/spin.tcl b/library/demos/spin.tcl index b08ed16..203850d 100644 --- a/library/demos/spin.tcl +++ b/library/demos/spin.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .spin catch {destroy $w} diff --git a/library/demos/states.tcl b/library/demos/states.tcl index e2acd80..4e14fd5 100644 --- a/library/demos/states.tcl +++ b/library/demos/states.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .states catch {destroy $w} diff --git a/library/demos/style.tcl b/library/demos/style.tcl index 80b78f3..be0d365 100644 --- a/library/demos/style.tcl +++ b/library/demos/style.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .style catch {destroy $w} diff --git a/library/demos/tcolor b/library/demos/tcolor index 0aa133b..b349c5b 100644 --- a/library/demos/tcolor +++ b/library/demos/tcolor @@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"} # create colors using either the RGB, HSB, or CYM color spaces # and apply the color to existing applications. -package require Tk +package require tk wm title . "Color Editor" # Global variables that control the program: diff --git a/library/demos/text.tcl b/library/demos/text.tcl index 2736b88..130a4a5 100644 --- a/library/demos/text.tcl +++ b/library/demos/text.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .text catch {destroy $w} diff --git a/library/demos/textpeer.tcl b/library/demos/textpeer.tcl index 83e8e14..7dd55a7 100644 --- a/library/demos/textpeer.tcl +++ b/library/demos/textpeer.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .textpeer catch {destroy $w} diff --git a/library/demos/timer b/library/demos/timer index 6b61ca4..2d96ec4 100644 --- a/library/demos/timer +++ b/library/demos/timer @@ -5,7 +5,7 @@ exec wish "$0" ${1+"$@"} # timer -- # This script generates a counter with start and stop buttons. -package require Tk +package require tk label .counter -text 0.00 -relief raised -width 10 -padx 2m -pady 1m button .start -text Start -command { diff --git a/library/demos/toolbar.tcl b/library/demos/toolbar.tcl index c8248e3..50d4e49 100644 --- a/library/demos/toolbar.tcl +++ b/library/demos/toolbar.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .toolbar destroy $w diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl index 1cc70f8..fe06ce1 100644 --- a/library/demos/tree.tcl +++ b/library/demos/tree.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .tree catch {destroy $w} diff --git a/library/demos/ttkbut.tcl b/library/demos/ttkbut.tcl index 86e4382..f567790 100644 --- a/library/demos/ttkbut.tcl +++ b/library/demos/ttkbut.tcl @@ -8,7 +8,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttkbut catch {destroy $w} diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl index aad5aa0..35cf935 100644 --- a/library/demos/ttkmenu.tcl +++ b/library/demos/ttkmenu.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttkmenu catch {destroy $w} diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl index 5e5551d..d1d15f9 100644 --- a/library/demos/ttknote.tcl +++ b/library/demos/ttknote.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttknote catch {destroy $w} diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl index bae8716..749f940 100644 --- a/library/demos/ttkpane.tcl +++ b/library/demos/ttkpane.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttkpane catch {destroy $w} diff --git a/library/demos/ttkprogress.tcl b/library/demos/ttkprogress.tcl index e5d0e22..6e5068e 100644 --- a/library/demos/ttkprogress.tcl +++ b/library/demos/ttkprogress.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttkprogress catch {destroy $w} diff --git a/library/demos/ttkscale.tcl b/library/demos/ttkscale.tcl index e08d9b2..6aeb11c 100644 --- a/library/demos/ttkscale.tcl +++ b/library/demos/ttkscale.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .ttkscale catch {destroy $w} diff --git a/library/demos/twind.tcl b/library/demos/twind.tcl index 5268fdf..b974456 100644 --- a/library/demos/twind.tcl +++ b/library/demos/twind.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk # Make an Aqua button's fill color match its parent's background proc blend {bt} { diff --git a/library/demos/unicodeout.tcl b/library/demos/unicodeout.tcl index 1ecc064..0f3dc2d 100644 --- a/library/demos/unicodeout.tcl +++ b/library/demos/unicodeout.tcl @@ -7,7 +7,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .unicodeout catch {destroy $w} diff --git a/library/demos/vscale.tcl b/library/demos/vscale.tcl index 3a041a6..f1529c0 100644 --- a/library/demos/vscale.tcl +++ b/library/demos/vscale.tcl @@ -6,7 +6,7 @@ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } -package require Tk +package require tk set w .vscale catch {destroy $w} diff --git a/library/demos/widget b/library/demos/widget index 51ef220..384d860 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -10,7 +10,7 @@ exec wish "$0" ${1+"$@"} # separate ".tcl" files is this directory, which are sourced by this script as # needed. -package require Tk 8.6- +package require tk package require msgcat destroy {*}[winfo children .] diff --git a/library/menu.tcl b/library/menu.tcl index cffa0e2..57dc963 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -487,7 +487,6 @@ proc ::tk::MenuMotion {menu x y state} { } set index [$menu index @$x,$y] if {[info exists Priv(menuActivated)] \ - && $index ne "none" \ && $index >= 0 \ && $index ne $activeindex} { set mode [option get $menu clickToFocus ClickToFocus] @@ -530,8 +529,7 @@ proc ::tk::MenuButtonDown menu { if {![winfo viewable $menu]} { return } - set activeindex [$menu index active] - if {($activeindex eq "none") || ($activeindex < 0)} { + if {[$menu index active] < 0} { if {[$menu cget -type] ne "menubar" } { set Priv(window) {} } @@ -589,8 +587,7 @@ proc ::tk::MenuButtonDown menu { proc ::tk::MenuLeave {menu rootx rooty state} { variable ::tk::Priv set Priv(window) {} - set activeindex [$menu index active] - if {($activeindex eq "none") || ($activeindex < 0)} { + if {[$menu index active] < 0} { return } if {[$menu type active] eq "cascade" \ @@ -657,8 +654,7 @@ proc ::tk::MenuInvoke {w buttonRelease} { uplevel #0 [list $w invoke $activeindex] } } else { - set activeindex [$w index active] - if {($Priv(popup) eq "") || (($activeindex ne "none") && ($activeindex >= 0))} { + if {$Priv(popup) eq "" || [$w index active] >= 0} { MenuUnpost $w } uplevel #0 [list $w invoke active] @@ -802,7 +798,6 @@ proc ::tk::MenuNextMenu {menu direction} { if {[winfo class $mb] eq "Menubutton" \ && [$mb cget -state] ne "disabled" \ && [$mb cget -menu] ne "" \ - && [[$mb cget -menu] index last] ne "none" \ && [[$mb cget -menu] index last] >= 0} { break } @@ -826,13 +821,13 @@ proc ::tk::MenuNextMenu {menu direction} { proc ::tk::MenuNextEntry {menu count} { set last [$menu index last] - if {($last eq "none") || ($last < 0)} { + if {$last < 0} { return } set length [expr {$last+1}] set quitAfter $length set activeindex [$menu index active] - if {($activeindex eq "none") || ($activeindex < 0)} { + if {$activeindex < 0} { set i 0 } else { set i [expr {$activeindex + $count}] @@ -1032,9 +1027,6 @@ proc ::tk::TraverseWithinMenu {w char} { } set char [string tolower $char] set last [$w index last] - if {$last eq "none"} { - return - } for {set i 0} {$i <= $last} {incr i} { if {[catch {set char2 [string index \ [$w entrycget $i -label] [$w entrycget $i -underline]]}]} { @@ -1074,14 +1066,10 @@ proc ::tk::MenuFirstEntry menu { return } tk_menuSetFocus $menu - set activeindex [$menu index active] - if {($activeindex ne "none") && ($activeindex >= 0)} { + if {[$menu index active] >= 0} { return } set last [$menu index last] - if {$last eq "none"} { - return - } for {set i 0} {$i <= $last} {incr i} { if {([catch {set state [$menu entrycget $i -state]}] == 0) \ && $state ne "disabled" && [$menu type $i] ne "tearoff"} { @@ -1121,9 +1109,6 @@ proc ::tk::MenuFindName {menu s} { return $i } set last [$menu index last] - if {$last eq "none"} { - return "" - } for {set i 0} {$i <= $last} {incr i} { if {![catch {$menu entrycget $i -label} label]} { if {$label eq $s} { diff --git a/library/obsolete.tcl b/library/obsolete.tcl deleted file mode 100644 index a31884d..0000000 --- a/library/obsolete.tcl +++ /dev/null @@ -1,178 +0,0 @@ -# obsolete.tcl -- -# -# This file contains obsolete procedures that people really shouldn't -# be using anymore, but which are kept around for backward compatibility. -# -# Copyright © 1994 The Regents of the University of California. -# Copyright © 1994 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# - -# The procedures below are here strictly for backward compatibility with -# Tk version 3.6 and earlier. The procedures are no longer needed, so -# they are no-ops. You should not use these procedures anymore, since -# they may be removed in some future release. - -proc tk_menuBar args {} -proc tk_bindForTraversal args {} - -# ::tk::classic::restore -- -# -# Restore the pre-8.5 (Tk classic) look as the widget defaults for classic -# Tk widgets. -# -# The value following an 'option add' call is the new 8.5 value. -# -namespace eval ::tk::classic { - # This may need to be adjusted for some window managers that are - # more aggressive with their own Xdefaults (like KDE and CDE) - variable prio "widgetDefault" -} - -proc ::tk::classic::restore {args} { - # Restore classic (8.4) look to classic Tk widgets - variable prio - - if {[llength $args]} { - foreach what $args { - ::tk::classic::restore_$what - } - } else { - foreach cmd [info procs restore_*] { - $cmd - } - } -} - -proc ::tk::classic::restore_font {args} { - # Many widgets were adjusted from hard-coded defaults to using the - # TIP#145 fonts defined in fonts.tcl (eg TkDefaultFont, TkFixedFont, ...) - # For restoring compatibility, we only correct size and weighting changes, - # as the fonts themselves remained mostly the same. - if {[tk windowingsystem] eq "x11"} { - font configure TkDefaultFont -weight bold ; # normal - font configure TkFixedFont -size -12 ; # -10 - } - # Add these with prio 21 to override value in dialog/msgbox.tcl - if {[tk windowingsystem] eq "aqua"} { - option add *Dialog.msg.font system 21; # TkCaptionFont - option add *Dialog.dtl.font system 21; # TkCaptionFont - option add *ErrorDialog*Label.font system 21; # TkCaptionFont - } else { - option add *Dialog.msg.font {Times 12} 21; # TkCaptionFont - option add *Dialog.dtl.font {Times 10} 21; # TkCaptionFont - option add *ErrorDialog*Label.font {Times -18} 21; # TkCaptionFont - } -} - -proc ::tk::classic::restore_button {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - foreach cls {Button Radiobutton Checkbutton} { - option add *$cls.borderWidth 2 $prio; # 1 - } - } -} - -proc ::tk::classic::restore_entry {args} { - variable prio - # Entry and Spinbox share core defaults - foreach cls {Entry Spinbox} { - if {[tk windowingsystem] ne "aqua"} { - option add *$cls.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "x11"} { - option add *$cls.background "#d9d9d9" $prio; # "white" - option add *$cls.selectBorderWidth 1 $prio; # 0 - } - } -} - -proc ::tk::classic::restore_listbox {args} { - variable prio - if {[tk windowingsystem] ne "win32"} { - option add *Listbox.background "#d9d9d9" $prio; # "white" - option add *Listbox.activeStyle "underline" $prio; # "dotbox" - } - if {[tk windowingsystem] ne "aqua"} { - option add *Listbox.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "x11"} { - option add *Listbox.selectBorderWidth 1 $prio; # 0 - } - # Remove focus into Listbox added for 8.5 - bind Listbox <Button-1> { - if {[winfo exists %W]} { - tk::ListboxBeginSelect %W [%W index @%x,%y] - } - } -} - -proc ::tk::classic::restore_menu {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - option add *Menu.activeBorderWidth 2 $prio; # 1 - option add *Menu.borderWidth 2 $prio; # 1 - option add *Menu.clickToFocus true $prio - option add *Menu.useMotifHelp true $prio - } - if {[tk windowingsystem] ne "aqua"} { - option add *Menu.font "TkDefaultFont" $prio; # "TkMenuFont" - } -} - -proc ::tk::classic::restore_menubutton {args} { - variable prio - option add *Menubutton.borderWidth 2 $prio; # 1 -} - -proc ::tk::classic::restore_message {args} { - variable prio - option add *Message.borderWidth 2 $prio; # 1 -} - -proc ::tk::classic::restore_panedwindow {args} { - variable prio - option add *Panedwindow.borderWidth 2 $prio; # 1 - option add *Panedwindow.sashWidth 2 $prio; # 3 - option add *Panedwindow.sashPad 2 $prio; # 0 - option add *Panedwindow.sashRelief raised $prio; # flat - option add *Panedwindow.opaqueResize 0 $prio; # 1 - if {[tk windowingsystem] ne "win32"} { - option add *Panedwindow.showHandle 1 $prio; # 0 - } -} - -proc ::tk::classic::restore_scale {args} { - variable prio - option add *Scale.borderWidth 2 $prio; # 1 - if {[tk windowingsystem] eq "x11"} { - option add *Scale.troughColor "#c3c3c3" $prio; # "#b3b3b3" - } -} - -proc ::tk::classic::restore_scrollbar {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - option add *Scrollbar.borderWidth 2 $prio; # 1 - option add *Scrollbar.highlightThickness 1 $prio; # 0 - option add *Scrollbar.width 15 $prio; # 11 - option add *Scrollbar.troughColor "#c3c3c3" $prio; # "#b3b3b3" - } -} - -proc ::tk::classic::restore_text {args} { - variable prio - if {[tk windowingsystem] ne "aqua"} { - option add *Text.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "win32"} { - option add *Text.font "TkDefaultFont" $prio; # "TkFixedFont" - } - if {[tk windowingsystem] eq "x11"} { - option add *Text.background "#d9d9d9" $prio; # white - option add *Text.selectBorderWidth 1 $prio; # 0 - } -} diff --git a/library/tclIndex b/library/tclIndex index 06f31b2..9b5f889 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -122,9 +122,6 @@ set auto_index(::tk::GenerateMenuSelect) [list source [file join $dir menu.tcl]] set auto_index(tk_popup) [list source [file join $dir menu.tcl]] set auto_index(::tk::ensure_psenc_is_loaded) [list source [file join $dir mkpsenc.tcl]] set auto_index(::tk::MessageBox) [list source [file join $dir msgbox.tcl]] -set auto_index(tk_menuBar) [list source [file join $dir obsolete.tcl]] -set auto_index(tk_bindForTraversal) [list source [file join $dir obsolete.tcl]] -set auto_index(::tk::classic::restore) [list source [file join $dir obsolete.tcl]] set auto_index(tk_optionMenu) [list source [file join $dir optMenu.tcl]] set auto_index(tk_setPalette) [list source [file join $dir palette.tcl]] set auto_index(::tk::RecolorTree) [list source [file join $dir palette.tcl]] @@ -252,6 +249,4 @@ set auto_index(::tk::ListBoxKeyAccel_Unset) [list source [file join $dir xmfbox. set auto_index(::tk::ListBoxKeyAccel_Key) [list source [file join $dir xmfbox.tcl]] set auto_index(::tk::ListBoxKeyAccel_Goto) [list source [file join $dir xmfbox.tcl]] set auto_index(::tk::ListBoxKeyAccel_Reset) [list source [file join $dir xmfbox.tcl]] -set auto_index(::tk::unsupported::ExposePrivateCommand) [list source [file join $dir unsupported.tcl]] -set auto_index(::tk::unsupported::ExposePrivateVariable) [list source [file join $dir unsupported.tcl]] set auto_index(::tk::fontchooser) [list source [file join $dir fontchooser.tcl]] diff --git a/library/tearoff.tcl b/library/tearoff.tcl index 1591942..7b2ed66 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -138,14 +138,12 @@ proc ::tk::MenuDup {src dst type} { # Copy the meny entries, if any set last [$src index last] - if {$last ne "none"} { - for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { - set cmd [list $dst add [$src type $i] [$src id $i]] - foreach option [$src entryconfigure $i] { - lappend cmd [lindex $option 0] [lindex $option 4] - } - eval $cmd + for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { + set cmd [list $dst add [$src type $i] [$src id $i]] + foreach option [$src entryconfigure $i] { + lappend cmd [lindex $option 0] [lindex $option 4] } + eval $cmd } # Duplicate the binding tags from the source menu, replacing src with dst diff --git a/library/tk.tcl b/library/tk.tcl index a9db88c..1f7e787 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -11,7 +11,7 @@ # this file, and for a DISCLAIMER OF ALL WARRANTIES. # Verify that we have Tk binary and script components from the same release -package require -exact tk 8.7a6 +package require -exact tk 9.0b1 # Create a ::tk namespace namespace eval ::tk { diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl index abd0bc3..f4644ee 100644 --- a/library/ttk/clamTheme.tcl +++ b/library/ttk/clamTheme.tcl @@ -145,15 +145,15 @@ namespace eval ttk::theme::clam { -labeloutside true -labelmargins {0 0 0 3p} \ -borderwidth 2 -relief raised - ttk::style configure TScrollbar -gripcount 3.75p \ + ttk::style configure TScrollbar -gripsize 7.5p \ -arrowsize 10.5p -width 10.5p - ttk::style configure TScale -gripcount 3.75p \ + ttk::style configure TScale -gripsize 7.5p \ -arrowsize 10.5p -sliderlength 22.5p ttk::style configure TProgressbar -background $colors(-frame) \ -arrowsize 10.5p -sliderlength 22.5p - ttk::style configure Sash -sashthickness 4.5p -gripcount 7.5p + ttk::style configure Sash -sashthickness 4.5p -gripsize 15p } } diff --git a/library/unsupported.tcl b/library/unsupported.tcl deleted file mode 100644 index b5f404a..0000000 --- a/library/unsupported.tcl +++ /dev/null @@ -1,269 +0,0 @@ -# unsupported.tcl -- -# -# Commands provided by Tk without official support. Use them at your -# own risk. They may change or go away without notice. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -# ---------------------------------------------------------------------- -# Unsupported compatibility interface for folks accessing Tk's private -# commands and variable against recommended usage. -# ---------------------------------------------------------------------- - -namespace eval ::tk::unsupported { - - # Map from the old global names of Tk private commands to their - # new namespace-encapsulated names. - - variable PrivateCommands - array set PrivateCommands { - tkButtonAutoInvoke ::tk::ButtonAutoInvoke - tkButtonDown ::tk::ButtonDown - tkButtonEnter ::tk::ButtonEnter - tkButtonInvoke ::tk::ButtonInvoke - tkButtonLeave ::tk::ButtonLeave - tkButtonUp ::tk::ButtonUp - tkCancelRepeat ::tk::CancelRepeat - tkCheckRadioDown ::tk::CheckRadioDown - tkCheckRadioEnter ::tk::CheckRadioEnter - tkCheckRadioInvoke ::tk::CheckRadioInvoke - tkColorDialog ::tk::dialog::color:: - tkColorDialog_BuildDialog ::tk::dialog::color::BuildDialog - tkColorDialog_CancelCmd ::tk::dialog::color::CancelCmd - tkColorDialog_Config ::tk::dialog::color::Config - tkColorDialog_CreateSelector ::tk::dialog::color::CreateSelector - tkColorDialog_DrawColorScale ::tk::dialog::color::DrawColorScale - tkColorDialog_EnterColorBar ::tk::dialog::color::EnterColorBar - tkColorDialog_InitValues ::tk::dialog::color::InitValues - tkColorDialog_HandleRGBEntry ::tk::dialog::color::HandleRGBEntry - tkColorDialog_HandleSelEntry ::tk::dialog::color::HandleSelEntry - tkColorDialog_LeaveColorBar ::tk::dialog::color::LeaveColorBar - tkColorDialog_MoveSelector ::tk::dialog::color::MoveSelector - tkColorDialog_OkCmd ::tk::dialog::color::OkCmd - tkColorDialog_RedrawColorBars ::tk::dialog::color::RedrawColorBars - tkColorDialog_RedrawFinalColor ::tk::dialog::color::RedrawFinalColor - tkColorDialog_ReleaseMouse ::tk::dialog::color::ReleaseMouse - tkColorDialog_ResizeColorBars ::tk::dialog::color::ResizeColorBars - tkColorDialog_RgbToX ::tk::dialog::color::RgbToX - tkColorDialog_SetRGBValue ::tk::dialog::color::SetRGBValue - tkColorDialog_StartMove ::tk::dialog::color::StartMove - tkColorDialog_XToRgb ::tk::dialog::color::XToRGB - tkConsoleAbout ::tk::ConsoleAbout - tkConsoleBind ::tk::ConsoleBind - tkConsoleExit ::tk::ConsoleExit - tkConsoleHistory ::tk::ConsoleHistory - tkConsoleInit ::tk::ConsoleInit - tkConsoleInsert ::tk::ConsoleInsert - tkConsoleInvoke ::tk::ConsoleInvoke - tkConsoleOutput ::tk::ConsoleOutput - tkConsolePrompt ::tk::ConsolePrompt - tkConsoleSource ::tk::ConsoleSource - tkDarken ::tk::Darken - tkEntryAutoScan ::tk::EntryAutoScan - tkEntryBackspace ::tk::EntryBackspace - tkEntryButton1 ::tk::EntryButton1 - tkEntryClosestGap ::tk::EntryClosestGap - tkEntryGetSelection ::tk::EntryGetSelection - tkEntryInsert ::tk::EntryInsert - tkEntryKeySelect ::tk::EntryKeySelect - tkEntryMouseSelect ::tk::EntryMouseSelect - tkEntryNextWord ::tk::EntryNextWord - tkEntryPaste ::tk::EntryPaste - tkEntryPreviousWord ::tk::EntryPreviousWord - tkEntrySeeInsert ::tk::EntrySeeInsert - tkEntrySetCursor ::tk::EntrySetCursor - tkEntryTranspose ::tk::EntryTranspose - tkEventMotifBindings ::tk::EventMotifBindings - tkFDGetFileTypes ::tk::FDGetFileTypes - tkFirstMenu ::tk::FirstMenu - tkFocusGroup_BindIn ::tk::FocusGroup_BindIn - tkFocusGroup_BindOut ::tk::FocusGroup_BindOut - tkFocusGroup_Create ::tk::FocusGroup_Create - tkFocusGroup_Destroy ::tk::FocusGroup_Destroy - tkFocusGroup_In ::tk::FocusGroup_In - tkFocusGroup_Out ::tk::FocusGroup_Out - tkFocusOK ::tk::FocusOK - tkGenerateMenuSelect ::tk::GenerateMenuSelect - tkIconList ::tk::IconList - tkListbox ::tk::Listbox - tkListboxAutoScan ::tk::ListboxAutoScan - tkListboxBeginExtend ::tk::ListboxBeginExtend - tkListboxBeginSelect ::tk::ListboxBeginSelect - tkListboxBeginToggle ::tk::ListboxBeginToggle - tkListboxCancel ::tk::ListboxCancel - tkListboxDataExtend ::tk::ListboxDataExtend - tkListboxExtendUpDown ::tk::ListboxExtendUpDown - tkListboxKeyAccel_Goto ::tk::ListboxKeyAccel_Goto - tkListboxKeyAccel_Key ::tk::ListboxKeyAccel_Key - tkListboxKeyAccel_Reset ::tk::ListboxKeyAccel_Reset - tkListboxKeyAccel_Set ::tk::ListboxKeyAccel_Set - tkListboxKeyAccel_Unset ::tk::ListboxKeyAccel_Unxet - tkListboxMotion ::tk::ListboxMotion - tkListboxSelectAll ::tk::ListboxSelectAll - tkListboxUpDown ::tk::ListboxUpDown - tkListboxBeginToggle ::tk::ListboxBeginToggle - tkMbButtonUp ::tk::MbButtonUp - tkMbEnter ::tk::MbEnter - tkMbLeave ::tk::MbLeave - tkMbMotion ::tk::MbMotion - tkMbPost ::tk::MbPost - tkMenuButtonDown ::tk::MenuButtonDown - tkMenuDownArrow ::tk::MenuDownArrow - tkMenuDup ::tk::MenuDup - tkMenuEscape ::tk::MenuEscape - tkMenuFind ::tk::MenuFind - tkMenuFindName ::tk::MenuFindName - tkMenuFirstEntry ::tk::MenuFirstEntry - tkMenuInvoke ::tk::MenuInvoke - tkMenuLeave ::tk::MenuLeave - tkMenuLeftArrow ::tk::MenuLeftArrow - tkMenuMotion ::tk::MenuMotion - tkMenuNextEntry ::tk::MenuNextEntry - tkMenuNextMenu ::tk::MenuNextMenu - tkMenuRightArrow ::tk::MenuRightArrow - tkMenuUnpost ::tk::MenuUnpost - tkMenuUpArrow ::tk::MenuUpArrow - tkMessageBox ::tk::MessageBox - tkMotifFDialog ::tk::MotifFDialog - tkMotifFDialog_ActivateDList ::tk::MotifFDialog_ActivateDList - tkMotifFDialog_ActivateFList ::tk::MotifFDialog_ActivateFList - tkMotifFDialog_ActivateFEnt ::tk::MotifFDialog_ActivateFEnt - tkMotifFDialog_ActivateSEnt ::tk::MotifFDialog_ActivateSEnt - tkMotifFDialog ::tk::MotifFDialog - tkMotifFDialog_BrowseDList ::tk::MotifFDialog_BrowseDList - tkMotifFDialog_BrowseFList ::tk::MotifFDialog_BrowseFList - tkMotifFDialog_BuildUI ::tk::MotifFDialog_BuildUI - tkMotifFDialog_CancelCmd ::tk::MotifFDialog_CancelCmd - tkMotifFDialog_Config ::tk::MotifFDialog_Config - tkMotifFDialog_Create ::tk::MotifFDialog_Create - tkMotifFDialog_FileTypes ::tk::MotifFDialog_FileTypes - tkMotifFDialog_FilterCmd ::tk::MotifFDialog_FilterCmd - tkMotifFDialog_InterpFilter ::tk::MotifFDialog_InterpFilter - tkMotifFDialog_LoadFiles ::tk::MotifFDialog_LoadFiles - tkMotifFDialog_MakeSList ::tk::MotifFDialog_MakeSList - tkMotifFDialog_OkCmd ::tk::MotifFDialog_OkCmd - tkMotifFDialog_SetFilter ::tk::MotifFDialog_SetFilter - tkMotifFDialog_SetListMode ::tk::MotifFDialog_SetListMode - tkMotifFDialog_Update ::tk::MotifFDialog_Update - tkPostOverPoint ::tk::PostOverPoint - tkRecolorTree ::tk::RecolorTree - tkRestoreOldGrab ::tk::RestoreOldGrab - tkSaveGrabInfo ::tk::SaveGrabInfo - tkScaleActivate ::tk::ScaleActivate - tkScaleButtonDown ::tk::ScaleButtonDown - tkScaleButton2Down ::tk::ScaleButton2Down - tkScaleControlPress ::tk::ScaleControlPress - tkScaleDrag ::tk::ScaleDrag - tkScaleEndDrag ::tk::ScaleEndDrag - tkScaleIncrement ::tk::ScaleIncrement - tkScreenChanged ::tk::ScreenChanged - tkScrollButtonDown ::tk::ScrollButtonDown - tkScrollButton2Down ::tk::ScrollButton2Down - tkScrollButtonDrag ::tk::ScrollButtonDrag - tkScrollButtonUp ::tk::ScrollButtonUp - tkScrollByPages ::tk::ScrollByPages - tkScrollByUnits ::tk::ScrollByUnits - tkScrollEndDrag ::tk::ScrollEndDrag - tkScrollSelect ::tk::ScrollSelect - tkScrollStartDrag ::tk::ScrollStartDrag - tkScrollTopBottom ::tk::ScrollTopBottom - tkScrollToPos ::tk::ScrollToPos - tkTabToWindow ::tk::TabToWindow - tkTearOffMenu ::tk::TearOffMenu - tkTextAutoScan ::tk::TextAutoScan - tkTextButton1 ::tk::TextButton1 - tkTextClosestGap ::tk::TextClosestGap - tkTextInsert ::tk::TextInsert - tkTextKeyExtend ::tk::TextKeyExtend - tkTextKeySelect ::tk::TextKeySelect - tkTextNextPara ::tk::TextNextPara - tkTextNextPos ::tk::TextNextPos - tkTextNextWord ::tk::TextNextWord - tkTextPaste ::tk::TextPaste - tkTextPrevPara ::tk::TextPrevPara - tkTextPrevPos ::tk::TextPrevPos - tkTextPrevWord ::tk::TextPrevWord - tkTextResetAnchor ::tk::TextResetAnchor - tkTextScrollPages ::tk::TextScrollPages - tkTextSelectTo ::tk::TextSelectTo - tkTextSetCursor ::tk::TextSetCursor - tkTextTranspose ::tk::TextTranspose - tkTextUpDownLine ::tk::TextUpDownLine - tkTraverseToMenu ::tk::TraverseToMenu - tkTraverseWithinMenu ::tk::TraverseWithinMenu - unsupported1 ::tk::unsupported::MacWindowStyle - } - - # Map from the old global names of Tk private variable to their - # new namespace-encapsulated names. - - variable PrivateVariables - array set PrivateVariables { - droped_to_start ::tk::mac::Droped_to_start - histNum ::tk::HistNum - stub_location ::tk::mac::Stub_location - tkFocusIn ::tk::FocusIn - tkFocusOut ::tk::FocusOut - tkPalette ::tk::Palette - tkPriv ::tk::Priv - tkPrivMsgBox ::tk::PrivMsgBox - } -} - -# ::tk::unsupported::ExposePrivateCommand -- -# -# Expose one of Tk's private commands to be visible under its -# old global name -# -# Arguments: -# cmd Global name by which the command was once known, -# or a glob-style pattern. -# -# Results: -# None. -# -# Side effects: -# The old command name in the global namespace is aliased to the -# new private name. - -proc ::tk::unsupported::ExposePrivateCommand {cmd} { - variable PrivateCommands - set cmds [array get PrivateCommands $cmd] - if {[llength $cmds] == 0} { - return -code error -errorcode {TK EXPOSE_PRIVATE_COMMAND} \ - "No compatibility support for \[$cmd]" - } - foreach {old new} $cmds { - namespace eval :: [list interp alias {} $old {}] $new - } -} - -# ::tk::unsupported::ExposePrivateVariable -- -# -# Expose one of Tk's private variables to be visible under its -# old global name -# -# Arguments: -# var Global name by which the variable was once known, -# or a glob-style pattern. -# -# Results: -# None. -# -# Side effects: -# The old variable name in the global namespace is aliased to the -# new private name. - -proc ::tk::unsupported::ExposePrivateVariable {var} { - variable PrivateVariables - set vars [array get PrivateVariables $var] - if {[llength $vars] == 0} { - return -code error -errorcode {TK EXPOSE_PRIVATE_VARIABLE} \ - "No compatibility support for \$$var" - } - namespace eval ::tk::mac {} - foreach {old new} $vars { - namespace eval :: [list upvar "#0" $new $old] - } -} |