Changeset 95 for trunk/gui/scripts
- Timestamp:
- Oct 9, 2005, 9:41:29 PM (19 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/analyzer.tcl
r69 r95 157 157 pack $w.info -expand yes -fill both -padx 4 -pady 4 158 158 itk_component add runinfo { 159 text $w.info.text -width 1 -height 1 -wrap word\159 text $w.info.text -width 1 -height 1 -wrap none \ 160 160 -borderwidth 0 -highlightthickness 0 \ 161 161 -state disabled -
trunk/gui/scripts/cloud.tcl
r17 r95 32 32 private variable _cloud "" ;# lib obj representing this cloud 33 33 34 private variable _units "m " ;# system of units for this cloud35 private variable _limits ;# limits xmin, xmax, ymin, ymax, ...34 private variable _units "m m m" ;# system of units for x, y, z 35 private variable _limits ;# limits xmin, xmax, ymin, ymax, ... 36 36 37 37 private common _xp2obj ;# used for fetch/release ref counting … … 98 98 set u [$_cloud get units] 99 99 if {"" != $u} { 100 while {[llength $u] < 3} { 101 lappend u [lindex $u end] 102 } 100 103 set _units $u 101 104 } … … 120 123 # extract each point and add it to the points list 121 124 foreach {x y z} $line break 122 foreach dim {x y z} {125 foreach dim {x y z} units $_units { 123 126 set v [Rappture::Units::convert [set $dim] \ 124 -context $ _units -to $_units -units off]127 -context $units -to $units -units off] 125 128 126 129 set $dim $v ;# save back to real x/y/z variable -
trunk/gui/scripts/mesh.tcl
r17 r95 35 35 private variable _mesh "" ;# lib obj representing this mesh 36 36 37 private variable _units "m " ;# system of units for this mesh38 private variable _limits ;# limits xmin, xmax, ymin, ymax, ...37 private variable _units "m m m" ;# system of units for x, y, z 38 private variable _limits ;# limits xmin, xmax, ymin, ymax, ... 39 39 40 40 private common _xp2obj ;# used for fetch/release ref counting … … 101 101 set u [$_mesh get units] 102 102 if {"" != $u} { 103 while {[llength $u] < 3} { 104 lappend u [lindex $u end] 105 } 103 106 set _units $u 104 107 } … … 126 129 # extract each point and add it to the points list 127 130 foreach {x y z} $xyz break 128 foreach dim {x y z} {131 foreach dim {x y z} units $_units { 129 132 set v [Rappture::Units::convert [set $dim] \ 130 -context $ _units -to $_units -units off]133 -context $units -to $units -units off] 131 134 132 135 set $dim $v ;# save back to real x/y/z variable -
trunk/gui/scripts/scroller.tcl
r44 r95 35 35 protected method _fixframe {which} 36 36 protected method _fixsize {} 37 protected method _lock {option }37 protected method _lock {option which} 38 38 39 39 private variable _dispatcher "" ;# dispatcher for !events 40 40 private variable _contents "" ;# widget being controlled 41 41 private variable _frame "" ;# for "contents frame" calls 42 private variable _lock 0 ;# for _lock on x-scrollbar42 private variable _lock ;# for _lock on x/y scrollbar 43 43 } 44 44 … … 54 54 # ---------------------------------------------------------------------- 55 55 itcl::body Rappture::Scroller::constructor {args} { 56 array set _lock { x 0 y 0 } 57 56 58 Rappture::dispatcher _dispatcher 57 59 … … 196 198 x { 197 199 if {$state} { 198 grid $itk_component(xsbar) -row 1 -column 0 -sticky ew 199 _lock set 200 if {![_lock active x]} { 201 grid $itk_component(xsbar) -row 1 -column 0 -sticky ew 202 } 200 203 } else { 201 if {![_lock active]} { 202 grid forget $itk_component(xsbar) 203 } 204 grid forget $itk_component(xsbar) 205 _lock set x 204 206 } 205 207 } 206 208 y { 207 209 if {$state} { 208 grid $itk_component(ysbar) -row 0 -column 1 -sticky ns 210 if {![_lock active y]} { 211 grid $itk_component(ysbar) -row 0 -column 1 -sticky ns 212 } 209 213 } else { 210 214 grid forget $itk_component(ysbar) 215 _lock set y 211 216 } 212 217 } … … 263 268 264 269 # ---------------------------------------------------------------------- 265 # USAGE: _lock set 266 # USAGE: _lock reset 267 # USAGE: _lock active 270 # USAGE: _lock set <which> 271 # USAGE: _lock reset <which> 272 # USAGE: _lock active <which> 268 273 # 269 274 # Used internally to lock out vibrations when the x-scrollbar pops … … 275 280 # up. 276 281 # ---------------------------------------------------------------------- 277 itcl::body Rappture::Scroller::_lock {option } {282 itcl::body Rappture::Scroller::_lock {option which} { 278 283 switch -- $option { 279 284 set { 280 set _lock 1281 after cancel [itcl::code $this _lock reset ]282 after 50 [itcl::code $this _lock reset ]285 set _lock($which) 1 286 after cancel [itcl::code $this _lock reset $which] 287 after 50 [itcl::code $this _lock reset $which] 283 288 } 284 289 reset { 285 set _lock 0290 set _lock($which) 0 286 291 } 287 292 active { 288 return $_lock 293 return $_lock($which) 289 294 } 290 295 default {
Note: See TracChangeset
for help on using the changeset viewer.