From 0cd318fe6154a2486a04ef71f06ec907d34fb5c4 Mon Sep 17 00:00:00 2001 From: treectrl Date: Wed, 11 May 2005 03:18:55 +0000 Subject: Removed some useless bindings and code. --- demos/help.tcl | 59 +++++++-------------------------------------------- demos/random.tcl | 16 -------------- demos/www-options.tcl | 55 ----------------------------------------------- 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 { - TreeCtrl::HelpMotion1 %W %x %y - break + # noop } bind TreeCtrlHelp { - TreeCtrl::HelpLeave1 %W %x %y - break - } - bind TreeCtrlHelp { - TreeCtrl::HelpRelease1 %W %x %y - break + # noop } bind TreeCtrlHelp { 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 { - TreeCtrl::HelpMotion1 %W %x %y - break + # noop } bind TreeCtrlHelp { - TreeCtrl::HelpLeave1 %W %x %y - break - } - bind TreeCtrlHelp { - TreeCtrl::HelpRelease1 %W %x %y - break + # noop } bind TreeCtrlHelp { - TreeCtrl::HelpMotion2 %W %x %y + TreeCtrl::HelpMotion_2 %W %x %y } bind TreeCtrlHelp { - TreeCtrl::HelpMotion2 %W %x %y + TreeCtrl::HelpMotion_2 %W %x %y } bind TreeCtrlHelp { 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 { - TreeCtrl::RandomLeave1 %W %x %y - break - } bind TreeCtrlRandom { 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 { - TreeCtrl::OptionMotion1 %W %x %y - break - } - bind TreeCtrlOption { - TreeCtrl::OptionLeave1 %W %x %y - break - } - bind TreeCtrlOption { - 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 { - TreeCtrl::OptionMotion1 %W %x %y - break - } - bind TreeCtrlOption { - TreeCtrl::OptionLeave1 %W %x %y - break - } - bind TreeCtrlOption { - 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 -} -- cgit v0.12