A Widget Library
Check-in [2c42160bbf]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixup of typos. Ticket <cbc4b72a81>, attached patch. Thanks to Eric Lindblad for the submission, and apologies for the delay in application.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 2c42160bbf6e0a261c580e11682596b2bbf9ecb25151d3a13b5e0c74740737d6
User & Date: aku 2025-07-08 13:17:55.655
References
2025-07-08
13:25 Closed ticket [cbc4b72a81]: R Project plus 6 other changes artifact: c48131c298 user: aku
Context
2025-07-08
13:17
Fixup of typos. Ticket <cbc4b72a81>, attached patch. Thanks to Eric Lindblad for the submission, and apologies for the delay in application. Leaf check-in: 2c42160bbf user: aku tags: trunk
2005-07-12
23:28
scrub mailto and obvious email refs to hobbs check-in: 401a955574 user: hobbs tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to library/hierarchy.tcl.
1
2
3
4
5
6
7
8
9
##
## Layout routines taken from oooold code, author unkown.
## Copyright 1995-1998 Jeffrey Hobbs, jeff at hobbs org
##
## Last Update: 28 June 1997
##
package require Widget 2.0
package provide Hierarchy 2.0


|







1
2
3
4
5
6
7
8
9
##
## Layout routines taken from oooold code, author unknown.
## Copyright 1995-1998 Jeffrey Hobbs, jeff at hobbs org
##
## Last Update: 28 June 1997
##
package require Widget 2.0
package provide Hierarchy 2.0

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
##	Show files as well as directories.
##
## -showparent string				DEFAULT: {}
##	For hierarchy_dir nodelook, if string != {}, then it will show that
##	string which will reset the root node to its parent.
##
## METHODS
##	These are the methods that the hierachical listbox object recognizes.
##	(ie - hierachy .h ; .h <method> <args>)
##	Any unique substring is acceptable
##
## configure ?option? ?value option value ...?
## cget option
##	Standard tk widget routines.
##
## close index







|
|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
##	Show files as well as directories.
##
## -showparent string				DEFAULT: {}
##	For hierarchy_dir nodelook, if string != {}, then it will show that
##	string which will reset the root node to its parent.
##
## METHODS
##	These are the methods that the hierarchical listbox object recognizes.
##	(i.e. - hierarchy .h ; .h <method> <args>)
##	Any unique substring is acceptable
##
## configure ?option? ?value option value ...?
## cget option
##	Standard tk widget routines.
##
## close index
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
## index index
##	Returns the hierarchy numerical index of the item (the numerical
##	index has no implied order relative to the list items).  index
##	may be of the form:
##
##	number - Specifies the element as a numerical index.
##	root   - specifies the root item.
##	string - Specifis an item that has that text in it's node.
##	@x,y   - Indicates the element that covers the point in
##		the listbox window specified by x and y (in pixel
##		coordinates).  If no element covers that point,
##		then the closest element to that point is used.
##
## open index
##	Opens the specified index (will trigger -command).







|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
## index index
##	Returns the hierarchy numerical index of the item (the numerical
##	index has no implied order relative to the list items).  index
##	may be of the form:
##
##	number - Specifies the element as a numerical index.
##	root   - specifies the root item.
##	string - Specifies an item that has that text in it's node.
##	@x,y   - Indicates the element that covers the point in
##		the listbox window specified by x and y (in pixel
##		coordinates).  If no element covers that point,
##		then the closest element to that point is used.
##
## open index
##	Opens the specified index (will trigger -command).
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
    after idle "catch { [list $c] raise image text; [list $c] lower box text }"
}

## RECOMPUTE recurses through the tree working out the relative offsets
## of children from their parents in terms of stack values.  
##
## "cnp" is either empty or a node name which indicates where the only
## changes have occured in the hierarchy since the last call to Recompute.
## This is used because when a node is toggled on/off deep in the
## hierarchy then not all the positions of items need to be recomputed.
## The only ones that do are everything below the changed node (of
## course), and also everything which might depend on the stack usage of
## that node (i.e. everything above it).  Specifically the usages of the
## changed node's siblings do *not* need to be recomputed.
##







|







775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
    after idle "catch { [list $c] raise image text; [list $c] lower box text }"
}

## RECOMPUTE recurses through the tree working out the relative offsets
## of children from their parents in terms of stack values.  
##
## "cnp" is either empty or a node name which indicates where the only
## changes have occurred in the hierarchy since the last call to Recompute.
## This is used because when a node is toggled on/off deep in the
## hierarchy then not all the positions of items need to be recomputed.
## The only ones that do are everything below the changed node (of
## course), and also everything which might depend on the stack usage of
## that node (i.e. everything above it).  Specifically the usages of the
## changed node's siblings do *not* need to be recomputed.
##
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
}

## BINDING HELPER PROCEDURES
##
## These are mostly mirrored from the Listbox class bindings.
##
## Some of these are hacked up to be more efficient by making calls
## that require forknowledge of the megawidget structure.
##

# BeginSelect --
#
# This procedure is typically invoked on button-1 presses.  It begins
# the process of making a selection in the hierarchy.  Its exact behavior
# depends on the selection mode currently in effect for the hierarchy;







|







984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
}

## BINDING HELPER PROCEDURES
##
## These are mostly mirrored from the Listbox class bindings.
##
## Some of these are hacked up to be more efficient by making calls
## that require foreknowledge of the megawidget structure.
##

# BeginSelect --
#
# This procedure is typically invoked on button-1 presses.  It begins
# the process of making a selection in the hierarchy.  Its exact behavior
# depends on the selection mode currently in effect for the hierarchy;