/usr/share/tk8.6
NameSizeModeActions
demos/-0755rm
images/-0755rm
msgs/-0755rm
ttk/-0755rm
bgerror.tcl82460644editdlrm
button.tcl206420644editdlrm
choosedir.tcl96520644editdlrm
clrpick.tcl214320644editdlrm
comdlg.tcl82290644editdlrm
console.tcl327840644editdlrm
dialog.tcl60250644editdlrm
entry.tcl169500644editdlrm
focus.tcl48570644editdlrm
fontchooser.tcl158400644editdlrm
iconlist.tcl159780644editdlrm
icons.tcl108830644editdlrm
listbox.tcl145950644editdlrm
megawidget.tcl95690644editdlrm
menu.tcl380150644editdlrm
mkpsenc.tcl293520644editdlrm
msgbox.tcl164710644editdlrm
obsolete.tcl55940644editdlrm
optMenu.tcl15860644editdlrm
palette.tcl79230644editdlrm
panedwindow.tcl51760644editdlrm
safetk.tcl73810644editdlrm
scale.tcl77660644editdlrm
scrlbar.tcl127480644editdlrm
spinbox.tcl156400644editdlrm
tclIndex202700644editdlrm
tearoff.tcl51420644editdlrm
text.tcl330870644editdlrm
tk.tcl231420644editdlrm
tkfbox.tcl383730644editdlrm
unsupported.tcl102520644editdlrm
xmfbox.tcl260750644editdlrm
Edit: /usr/share/tk8.6/listbox.tcl (14595B)
# listbox.tcl -- # # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. # Copyright (c) 1998 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. #-------------------------------------------------------------------------- # tk::Priv elements used in this file: # # afterId - Token returned by "after" for autoscanning. # listboxPrev - The last element to be selected or deselected # during a selection operation. # listboxSelection - All of the items that were selected before the # current selection operation (such as a mouse # drag) started; used to cancel an operation. #-------------------------------------------------------------------------- #------------------------------------------------------------------------- # The code below creates the default class bindings for listboxes. #------------------------------------------------------------------------- # Note: the check for existence of %W below is because this binding # is sometimes invoked after a window has been deleted (e.g. because # there is a double-click binding on the widget that deletes it). Users # can put "break"s in their bindings to avoid the error, but this check # makes that unnecessary. bind Listbox <1> { if {[winfo exists %W]} { tk::ListboxBeginSelect %W [%W index @%x,%y] 1 } } # Ignore double clicks so that users can define their own behaviors. # Among other things, this prevents errors if the user deletes the # listbox on a double click. bind Listbox { # Empty script } bind Listbox { set tk::Priv(x) %x set tk::Priv(y) %y tk::ListboxMotion %W [%W index @%x,%y] } bind Listbox { tk::CancelRepeat %W activate @%x,%y } bind Listbox { tk::ListboxBeginExtend %W [%W index @%x,%y] } bind Listbox { tk::ListboxBeginToggle %W [%W index @%x,%y] } bind Listbox { set tk::Priv(x) %x set tk::Priv(y) %y tk::ListboxAutoScan %W } bind Listbox { tk::CancelRepeat } bind Listbox <> { tk::ListboxUpDown %W -1 } bind Listbox <> { tk::ListboxExtendUpDown %W -1 } bind Listbox <> { tk::ListboxUpDown %W 1 } bind Listbox <> { tk::ListboxExtendUpDown %W 1 } bind Listbox <> { %W xview scroll -1 units } bind Listbox <> { %W xview scroll -1 pages } bind Listbox <> { %W xview scroll 1 units } bind Listbox <> { %W xview scroll 1 pages } bind Listbox { %W yview scroll -1 pages %W activate @0,0 } bind Listbox { %W yview scroll 1 pages %W activate @0,0 } bind Listbox { %W xview scroll -1 pages } bind Listbox { %W xview scroll 1 pages } bind Listbox <> { %W xview moveto 0 } bind Listbox <> { %W xview moveto 1 } bind Listbox { %W activate 0 %W see 0 %W selection clear 0 end %W selection set 0 tk::FireListboxSelectEvent %W } bind Listbox { tk::ListboxDataExtend %W 0 } bind Listbox { %W activate end %W see end %W selection clear 0 end %W selection set end tk::FireListboxSelectEvent %W } bind Listbox { tk::ListboxDataExtend %W [%W index end] } bind Listbox <> { if {[selection own -displayof %W] eq "%W"} { clipboard clear -displayof %W clipboard append -displayof %W [selection get -displayof %W] } } bind Listbox { tk::ListboxBeginSelect %W [%W index active] } bind Listbox <> { tk::ListboxBeginSelect %W [%W index active] } bind Listbox