summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-10-14 21:19:53 (GMT)
committertreectrl <treectrl>2006-10-14 21:19:53 (GMT)
commitb3397722a2f81f202020aabf01206bd96a99948f (patch)
tree2ff1e236f6557ae0c82bd37f8e831cc66e3f9c87 /library
parentfa86b7c5283c56f320d03929b44d988099e50763 (diff)
downloadtktreectrl-b3397722a2f81f202020aabf01206bd96a99948f.zip
tktreectrl-b3397722a2f81f202020aabf01206bd96a99948f.tar.gz
tktreectrl-b3397722a2f81f202020aabf01206bd96a99948f.tar.bz2
Remove rowlabels.
Diffstat (limited to 'library')
-rw-r--r--library/treectrl.tcl142
1 files changed, 2 insertions, 140 deletions
diff --git a/library/treectrl.tcl b/library/treectrl.tcl
index 0fff4e8..abbd326 100644
--- a/library/treectrl.tcl
+++ b/library/treectrl.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: treectrl.tcl,v 1.27 2006/10/14 20:18:15 treectrl Exp $
+# RCS: @(#) $Id: treectrl.tcl,v 1.28 2006/10/14 21:20:16 treectrl Exp $
bind TreeCtrl <Motion> {
TreeCtrl::CursorCheck %W %x %y
@@ -242,9 +242,7 @@ proc ::TreeCtrl::ColumnCanMoveHere {w column before} {
# ::TreeCtrl::CursorAction --
#
# If the given point is at the left or right edge of a resizable column, the
-# result is "column C". If the given point is at the right edge of a rowlabel,
-# the result is "rowlabel all". If the given point is at the top or bottom
-# edge of a resizable rowlabel, the result is "rowlabel R".
+# result is "column C".
#
# Arguments:
# w The treectrl widget.
@@ -277,29 +275,6 @@ proc ::TreeCtrl::CursorAction {w x y} {
}
}
}
- scan [$w contentbox] "%d %d %d %d" left top right bottom
- if {[$w cget -showrowlabels] && [$w cget -rowlabelresize] &&
- ($x >= $left - 4) && ($x < $left + 4)} {
- if {![$w cget -showheader] || ($y < $top)} {
- return "rowlabel all"
- }
- }
- if {([llength $id] > 1) && ([lindex $id 0] eq "rowlabel")} {
- set rowlabel [lindex $id 1]
- if {[lindex $id end] eq "top"} {
- if {[$w rowlabel compare $rowlabel != "first visible"]} {
- set rowlabel [$w rowlabel id "$rowlabel prev visible"]
- if {[$w rowlabel cget $rowlabel -resize]} {
- return "rowlabel $rowlabel"
- }
- }
- }
- if {[lindex $id end] eq "bottom"} {
- if {[$w rowlabel cget $rowlabel -resize]} {
- return "rowlabel $rowlabel"
- }
- }
- }
return ""
}
@@ -326,14 +301,6 @@ proc ::TreeCtrl::CursorCheck {w x y} {
if {[lindex $action 0] eq "column"} {
set cursor sb_h_double_arrow
}
- if {[lindex $action 0] eq "rowlabel"} {
- set rowlabel [lindex $action 1]
- if {$rowlabel eq "all"} {
- set cursor sb_h_double_arrow
- } else {
- set cursor sb_v_double_arrow
- }
- }
if {![info exists Priv(cursor,$w)]} {
set Priv(cursor,$w) [$w cget -cursor]
}
@@ -459,18 +426,6 @@ proc ::TreeCtrl::ButtonPress1 {w x y} {
focus $w
set action [CursorAction $w $x $y]
- if {$action ne "" && [lindex $action 0] eq "rowlabel"} {
- set Priv(buttonMode) rowlabel
- set Priv(rowlabel) [lindex $action 1]
- set Priv(x) $x
- set Priv(y) $y
- set Priv(width) [$w rowlabel width]
- if {$Priv(rowlabel) ne "all"} {
- scan [$w rowlabel bbox $Priv(rowlabel)] "%d %d %d %d" x1 y1 x2 y2
- set Priv(height) [expr {$y2 - $y1}]
- }
- return
- }
set id [$w identify $x $y]
if {$id eq ""} {
@@ -521,11 +476,6 @@ proc ::TreeCtrl::ButtonPress1 {w x y} {
set Priv(columnDrag,y) $y
return
}
- if {[lindex $id 0] eq "rowlabel"} {
- # What action should be taken when clicking in a rowlabel?
- # Resizing is handled above.
- return
- }
set item [lindex $id 1]
if {![$w item enabled $item]} {
return
@@ -547,14 +497,6 @@ proc ::TreeCtrl::ButtonPress1 {w x y} {
proc ::TreeCtrl::DoubleButton1 {w x y} {
set action [CursorAction $w $x $y]
- if {$action ne "" && [lindex $action 0] eq "rowlabel"} {
- set rowlabel [lindex $action 1]
- if {$rowlabel eq "all"} {
- $w configure -rowlabelwidth ""
- } else {
- $w rowlabel configure $rowlabel -height ""
- }
- }
set id [$w identify $x $y]
if {$id eq ""} {
@@ -725,70 +667,6 @@ proc ::TreeCtrl::Motion1 {w x y} {
}
}
}
- rowlabel {
- if {$Priv(rowlabel) eq "all"} {
- set width [expr {$Priv(width) + $x - $Priv(x)}]
- set minWidth [$w cget -minrowlabelwidth]
- set maxWidth [$w cget -maxrowlabelwidth]
- if {$minWidth eq ""} {
- set minWidth 0
- }
- if {$minWidth >= 0 && $width < $minWidth} {
- set width $minWidth
- }
- if {$maxWidth ne "" && $width > $maxWidth} {
- set width $maxWidth
- }
- if {$width == 0} {
- incr width
- }
- switch -- [$w cget -columnresizemode] {
- proxy {
- scan [$w contentbox] "%d %d %d %d" x1 y1 x2 y2
- incr x1 -[$w rowlabel width]
- # Use "ne" because -columnproxy could be ""
- if {($x1 + $width - 1) ne [$w cget -columnproxy]} {
- $w configure -columnproxy [expr {$x1 + $width - 1}]
- }
- }
- realtime {
- if {[$w cget -rowlabelwidth] != $width} {
- $w configure -rowlabelwidth $width
- }
- }
- }
- } else {
- set height [expr {$Priv(height) + $y - $Priv(y)}]
- set minHeight [$w rowlabel cget $Priv(rowlabel) -minheight]
- set maxHeight [$w rowlabel cget $Priv(rowlabel) -maxheight]
- if {$minHeight eq ""} {
- set minHeight 0
- }
- if {$minHeight >= 0 && $height < $minHeight} {
- set height $minHeight
- }
- if {$maxHeight ne "" && $height > $maxHeight} {
- set height $maxHeight
- }
- if {$height == 0} {
- incr height
- }
- switch -- [$w cget -columnresizemode] {
- proxy {
- scan [$w rowlabel bbox $Priv(rowlabel)] "%d %d %d %d" x1 y1 x2 y2
- # Use "ne" because -rowproxy could be ""
- if {($y1 + $height - 1) ne [$w cget -rowproxy]} {
- $w configure -rowproxy [expr {$y1 + $height - 1}]
- }
- }
- realtime {
- if {[$w rowlabel cget $Priv(rowlabel) -height] != $height} {
- $w rowlabel configure $Priv(rowlabel) -height $height
- }
- }
- }
- }
- }
}
return
}
@@ -901,22 +779,6 @@ set Priv(prev) ""
CursorCheck $w $x $y
}
}
- rowlabel {
- if {[$w cget -columnproxy] ne ""} {
- scan [$w contentbox] "%d %d %d %d" x1 y1 x2 y2
- incr x1 -[$w rowlabel width]
- set width [expr {[$w cget -columnproxy] - $x1 + 1}]
- $w configure -columnproxy {}
- $w configure -rowlabelwidth $width
- CursorCheck $w $x $y
- }
- if {[$w cget -rowproxy] ne ""} {
- scan [$w rowlabel bbox $Priv(rowlabel)] "%d %d %d %d" x1 y1 x2 y2
- set height [expr {[$w cget -rowproxy] - $y1 + 1}]
- $w configure -rowproxy {}
- $w rowlabel configure $Priv(rowlabel) -height $height
- }
- }
}
unset Priv(buttonMode)
return