Changeset 0bf09a4 in tol for tolbase/lib/toltk/graph.tcl
- Timestamp:
- Nov 28, 2016, 10:35:21 AM (10 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 7b8f6fc
- Parents:
- 0f71b65
- File:
-
- 1 edited
-
tolbase/lib/toltk/graph.tcl (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/toltk/graph.tcl
r0f71b65 r0bf09a4 20 20 } 21 21 default { 22 22 23 23 } 24 24 } … … 52 52 bind scroll-$graph <ButtonRelease-1> { rbc::SetScrollPoint %W %x %y } 53 53 # este evento posiblemente ya no hara falta 54 bind scroll-$graph <ButtonPress-3> { 55 if { [%W inside %x %y] } { 56 rbc::ResetScroll %W 54 bind scroll-$graph <ButtonPress-3> { 55 if { [%W inside %x %y] } { 56 rbc::ResetScroll %W 57 57 } 58 58 } … … 61 61 puts "mode = $mode" 62 62 bind zoom-$graph <ButtonPress-1> { rbc::SetZoomPoint %W %x %y } 63 if { [string equal $mode zoom-frame] } { 63 if { [string equal $mode zoom-frame] } { 64 64 bind zoom-$graph <ButtonRelease-1> { rbc::SetZoomPoint %W %x %y } 65 65 } else { 66 66 bind zoom-$graph <ButtonRelease-1> "" 67 67 } 68 bind zoom-$graph <ButtonPress-3> { 69 if { [%W inside %x %y] } { 70 rbc::ResetZoom %W 68 bind zoom-$graph <ButtonPress-3> { 69 if { [%W inside %x %y] } { 70 rbc::ResetZoom %W 71 71 } 72 72 } … … 80 80 set index [lsearch $oldTagList $tag] 81 81 if { $index >= 0 } { 82 bindtags $widget [lreplace $oldTagList $index $index]82 bindtags $widget [lreplace $oldTagList $index $index] 83 83 } 84 84 } … … 87 87 proc rbc::InitStack { graph {mode zoom-frame} } { 88 88 global zoomInfo 89 89 90 90 _rbc_InitStack $graph 91 91 # this is to allow zoom in, out scroll 92 92 93 93 set zoomInfo($graph,mode) $mode 94 94 } … … 135 135 } 136 136 set zoomInfo($graph,stack) [linsert $zoomInfo($graph,stack) 0 $cmd] 137 busy hold $graph 137 busy hold $graph 138 138 # This update lets the busy cursor take effect. 139 139 update … … 162 162 ::bayesGraph::GrapOptApplyAxisTicks $this ${this}::options gr,$gr 163 163 update 164 164 165 165 busy release $graph 166 166 } … … 185 185 set modifier "Any-" 186 186 } 187 bind select-region-$graph <${modifier}Motion> { 187 bind select-region-$graph <${modifier}Motion> { 188 188 rbc::GetCoords %W %x %y B 189 189 #rbc::MarkPoint $graph B … … 191 191 } 192 192 if { $zoomInfo($graph,corner) == "A" } { 193 if { ![$graph inside $x $y] } {194 return195 }196 # First corner selected, start watching motion events197 198 #rbc::MarkPoint $graph A199 rbc::ZoomTitleNext $graph 200 201 rbc::AddBindTag $graph select-region-$graph202 set zoomInfo($graph,corner) B203 } else { 204 # Delete the modal binding205 rbc::RemoveBindTag $graph select-region-$graph206 rbc::PushZoom $graph 207 set zoomInfo($graph,corner) A193 if { ![$graph inside $x $y] } { 194 return 195 } 196 # First corner selected, start watching motion events 197 198 #rbc::MarkPoint $graph A 199 rbc::ZoomTitleNext $graph 200 201 rbc::AddBindTag $graph select-region-$graph 202 set zoomInfo($graph,corner) B 203 } else { 204 # Delete the modal binding 205 rbc::RemoveBindTag $graph select-region-$graph 206 rbc::PushZoom $graph 207 set zoomInfo($graph,corner) A 208 208 } 209 209 } … … 213 213 214 214 rbc::GetCoords $graph $x $y A 215 bind scroll-region-$graph <Any-Motion> { 216 rbc::GetCoords %W %x %y B217 #rbc::MarkPoint $graph B218 rbc::Scroll %W215 bind scroll-region-$graph <Any-Motion> { 216 rbc::GetCoords %W %x %y B 217 #rbc::MarkPoint $graph B 218 rbc::Scroll %W 219 219 } 220 220 if { $zoomInfo($graph,corner) == "A" } { 221 if { ![$graph inside $x $y] } {222 return223 }224 # First corner selected, start watching motion events225 226 #rbc::MarkPoint $graph A227 rbc::ScrollTitle $graph 228 229 rbc::AddBindTag $graph scroll-region-$graph230 set zoomInfo($graph,corner) B231 } else { 232 # Delete the modal binding233 ResetScroll $graph221 if { ![$graph inside $x $y] } { 222 return 223 } 224 # First corner selected, start watching motion events 225 226 #rbc::MarkPoint $graph A 227 rbc::ScrollTitle $graph 228 229 rbc::AddBindTag $graph scroll-region-$graph 230 set zoomInfo($graph,corner) B 231 } else { 232 # Delete the modal binding 233 ResetScroll $graph 234 234 } 235 235 } … … 262 262 eval $graph marker delete [$graph marker names "scroll*"] 263 263 rbc::RemoveBindTag $graph scroll-region-$graph 264 set zoomInfo($graph,corner) A 264 set zoomInfo($graph,corner) A 265 265 } 266 266 267 267 proc rbc::ScrollTitle { graph } { 268 268 if { [$graph cget -invertxy] } { 269 set coords "-Inf -Inf"270 } else { 271 set coords "-Inf Inf"269 set coords "-Inf -Inf" 270 } else { 271 set coords "-Inf Inf" 272 272 } 273 273 $graph marker create text -name "scrollTitle" -text "scrolling ..." \ 274 -coords $coords -bindtags "" -anchor nw275 } 274 -coords $coords -bindtags "" -anchor nw 275 }
Note: See TracChangeset
for help on using the changeset viewer.
