summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortreectrl <treectrl>2005-05-11 03:18:55 (GMT)
committertreectrl <treectrl>2005-05-11 03:18:55 (GMT)
commit0cd318fe6154a2486a04ef71f06ec907d34fb5c4 (patch)
tree0be8ed5d416274def193332dfdcd0368910815ca
parent3a42d8f9954d2bee5306ca5d085a67560c3447e2 (diff)
downloadtktreectrl-0cd318fe6154a2486a04ef71f06ec907d34fb5c4.zip
tktreectrl-0cd318fe6154a2486a04ef71f06ec907d34fb5c4.tar.gz
tktreectrl-0cd318fe6154a2486a04ef71f06ec907d34fb5c4.tar.bz2
Removed some useless bindings and code.
-rw-r--r--demos/help.tcl59
-rw-r--r--demos/random.tcl16
-rw-r--r--demos/www-options.tcl55
3 files changed, 8 insertions, 122 deletions
diff --git a/demos/help.tcl b/demos/help.tcl
index fc0fb59..e131f15 100644
--- a/demos/help.tcl
+++ b/demos/help.tcl
@@ -102,16 +102,10 @@ proc DemoHelpContents {} {
break
}
bind TreeCtrlHelp <Button1-Motion> {
- TreeCtrl::HelpMotion1 %W %x %y
- break
+ # noop
}
bind TreeCtrlHelp <Button1-Leave> {
- TreeCtrl::HelpLeave1 %W %x %y
- break
- }
- bind TreeCtrlHelp <ButtonRelease-1> {
- TreeCtrl::HelpRelease1 %W %x %y
- break
+ # noop
}
bind TreeCtrlHelp <Motion> {
TreeCtrl::HelpMotion %W %x %y
@@ -134,7 +128,7 @@ proc DemoHelpContents {} {
# This is an alternate implementation that does not define a new item state
# to change the appearance of the item under the cursor.
-proc DemoHelpContents2 {} {
+proc DemoHelpContents_2 {} {
set T .f2.f1.t
@@ -247,22 +241,16 @@ proc DemoHelpContents2 {} {
break
}
bind TreeCtrlHelp <Button1-Motion> {
- TreeCtrl::HelpMotion1 %W %x %y
- break
+ # noop
}
bind TreeCtrlHelp <Button1-Leave> {
- TreeCtrl::HelpLeave1 %W %x %y
- break
- }
- bind TreeCtrlHelp <ButtonRelease-1> {
- TreeCtrl::HelpRelease1 %W %x %y
- break
+ # noop
}
bind TreeCtrlHelp <Motion> {
- TreeCtrl::HelpMotion2 %W %x %y
+ TreeCtrl::HelpMotion_2 %W %x %y
}
bind TreeCtrlHelp <Leave> {
- TreeCtrl::HelpMotion2 %W %x %y
+ TreeCtrl::HelpMotion_2 %W %x %y
}
bind TreeCtrlHelp <KeyPress-Return> {
if {[llength [%W selection get]] == 1} {
@@ -310,37 +298,6 @@ proc TreeCtrl::HelpButton1 {w x y} {
}
return
}
-proc TreeCtrl::HelpMotion1 {w x y} {
- variable Priv
- switch $Priv(buttonMode) {
- default {
- Motion1 $w $x $y
- }
- }
- return
-}
-proc TreeCtrl::HelpLeave1 {w x y} {
- variable Priv
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- if {![info exists Priv(buttonMode)]} return
- switch $Priv(buttonMode) {
- default {
- Leave1 $w $x $y
- }
- }
- return
-}
-proc TreeCtrl::HelpRelease1 {w x y} {
- variable Priv
- if {![info exists Priv(buttonMode)]} return
- switch $Priv(buttonMode) {
- default {
- Release1 $w $x $y
- }
- }
- return
-}
proc TreeCtrl::HelpMotion {w x y} {
variable Priv
@@ -368,7 +325,7 @@ proc TreeCtrl::HelpMotion {w x y} {
}
# Alternate implementation that does not rely on run-time states
-proc TreeCtrl::HelpMotion2 {w x y} {
+proc TreeCtrl::HelpMotion_2 {w x y} {
variable Priv
set id [$w identify $x $y]
if {[lindex $id 0] eq "header"} {
diff --git a/demos/random.tcl b/demos/random.tcl
index d7a76c3..e9f1a1f 100644
--- a/demos/random.tcl
+++ b/demos/random.tcl
@@ -142,10 +142,6 @@ proc DemoRandom {} {
TreeCtrl::RandomMotion1 %W %x %y
break
}
- bind TreeCtrlRandom <Button1-Leave> {
- TreeCtrl::RandomLeave1 %W %x %y
- break
- }
bind TreeCtrlRandom <ButtonRelease-1> {
TreeCtrl::RandomRelease1 %W %x %y
break
@@ -333,18 +329,6 @@ proc TreeCtrl::RandomMotion {T x y} {
}
return
}
-proc TreeCtrl::RandomLeave1 {T x y} {
- variable Priv
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- if {![info exists Priv(buttonMode)]} return
- switch $Priv(buttonMode) {
- default {
- Leave1 $T $x $y
- }
- }
- return
-}
proc TreeCtrl::RandomRelease1 {T x y} {
variable Priv
if {![info exists Priv(buttonMode)]} return
diff --git a/demos/www-options.tcl b/demos/www-options.tcl
index 851e828..a53e3f5 100644
--- a/demos/www-options.tcl
+++ b/demos/www-options.tcl
@@ -102,18 +102,6 @@ proc DemoInternetOptions {} {
TreeCtrl::OptionButton1 %W %x %y
break
}
- bind TreeCtrlOption <Button1-Motion> {
- TreeCtrl::OptionMotion1 %W %x %y
- break
- }
- bind TreeCtrlOption <Button1-Leave> {
- TreeCtrl::OptionLeave1 %W %x %y
- break
- }
- bind TreeCtrlOption <ButtonRelease-1> {
- TreeCtrl::OptionRelease1 %W %x %y
- break
- }
bindtags $T [list $T TreeCtrlOption TreeCtrl [winfo toplevel $T] all]
@@ -251,18 +239,6 @@ proc DemoInternetOptions_2 {} {
TreeCtrl::OptionButton1 %W %x %y
break
}
- bind TreeCtrlOption <Button1-Motion> {
- TreeCtrl::OptionMotion1 %W %x %y
- break
- }
- bind TreeCtrlOption <Button1-Leave> {
- TreeCtrl::OptionLeave1 %W %x %y
- break
- }
- bind TreeCtrlOption <ButtonRelease-1> {
- TreeCtrl::OptionRelease1 %W %x %y
- break
- }
bindtags $T [list $T TreeCtrlOption TreeCtrl [winfo toplevel $T] all]
@@ -304,35 +280,4 @@ proc TreeCtrl::OptionButton1_2 {T x y} {
}
return
}
-proc TreeCtrl::OptionMotion1 {T x y} {
- variable Priv
- switch $Priv(buttonMode) {
- default {
- Motion1 $T $x $y
- }
- }
- return
-}
-proc TreeCtrl::OptionLeave1 {T x y} {
- variable Priv
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- if {![info exists Priv(buttonMode)]} return
- switch $Priv(buttonMode) {
- default {
- Leave1 $T $x $y
- }
- }
- return
-}
-proc TreeCtrl::OptionRelease1 {T x y} {
- variable Priv
- if {![info exists Priv(buttonMode)]} return
- switch $Priv(buttonMode) {
- default {
- Release1 $T $x $y
- }
- }
- return
-}