Changeset 6212
- Timestamp:
- Mar 28, 2016, 6:30:14 AM (8 years ago)
- Location:
- branches/1.6
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.6
- Property svn:mergeinfo changed
/trunk merged: 5664,6173,6175,6181,6202-6203
- Property svn:mergeinfo changed
-
branches/1.6/gui/scripts/editor.tcl
r5679 r6212 88 88 [itcl::code $this _resize] 89 89 bind $itk_component(editor) <KeyPress-Return> \ 90 [itcl::code $this deactivate] 91 bind $itk_component(editor) <KP_Enter> \ 90 92 [itcl::code $this deactivate] 91 93 bind $itk_component(editor) <KeyPress-Escape> \ -
branches/1.6/gui/scripts/vtkglyphviewer.tcl
r6155 r6212 70 70 private method BuildDownloadPopup { widget command } 71 71 private method BuildGlyphTab {} 72 private method Combo { option }73 72 private method Connect {} 74 73 private method CurrentDatasets {args} … … 87 86 private method IsValidObject { dataobj } 88 87 private method LeaveLegend {} 88 private method LegendTitleAction { option } 89 89 private method MotionLegend { x y } 90 90 private method Pan {option x y} … … 105 105 private method SetObjectStyle { dataobj comp } 106 106 private method SetOrientation { side } 107 private method SetupKeyboardBindings {} 108 private method SetupMousePanningBindings {} 109 private method SetupMouseRotationBindings {} 110 private method SetupMouseZoomBindings {} 107 111 private method Slice {option args} 108 112 private method ViewToQuaternion {} { … … 133 137 private variable _start 0 134 138 private variable _title "" 139 private variable _widget 135 140 private variable _width 0 136 141 private variable _height 0 … … 225 230 -cutplaneedges 0 226 231 -cutplanelighting 1 227 -cutplaneopacity 1 00232 -cutplaneopacity 1.0 228 233 -cutplanepreinterp 1 229 234 -cutplanesvisible 0 … … 233 238 -glyphlighting 1 234 239 -glyphnormscale 1 235 -glyphopacity 1 00240 -glyphopacity 1.0 236 241 -glyphorient 1 237 242 -glyphscale 1 238 243 -glyphscalemode "vmag" 239 244 -glyphshape "arrow" 240 -glyph visible1245 -glyphsvisible 1 241 246 -glyphwireframe 0 242 247 -legendvisible 1 243 248 -outline 0 244 -saveglyphopacity 100245 249 -xcutplaneposition 50 246 250 -xcutplanevisible 1 … … 255 259 array set _changed { 256 260 -colormap 0 261 -cutplaneedges 0 262 -cutplanelighting 0 263 -cutplaneopacity 0 264 -cutplanepreinterp 0 265 -cutplanesvisible 0 266 -cutplanewireframe 0 267 -glyphedges 0 268 -glyphlighting 0 269 -glyphnormscale 0 257 270 -glyphopacity 0 271 -glyphorient 0 272 -glyphscale 0 273 -glyphscalemode 0 274 -glyphshape 0 275 -glyphsvisible 0 276 -glyphwireframe 0 277 -outline 0 278 -xcutplaneposition 0 279 -xcutplanevisible 0 280 -ycutplaneposition 0 281 -ycutplanevisible 0 282 -zcutplaneposition 0 283 -zcutplanevisible 0 284 } 285 array set _widget { 286 -cutplaneopacity 100 287 -glyphopacity 100 258 288 } 259 289 … … 273 303 ignore -background -foreground -relief -tearoff 274 304 } 305 275 306 set c $itk_component(view) 276 307 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 277 bind $c <4> [itcl::code $this Zoom in 0.25]278 bind $c <5> [itcl::code $this Zoom out 0.25]279 bind $c <KeyPress-Left> [list %W xview scroll 10 units]280 bind $c <KeyPress-Right> [list %W xview scroll -10 units]281 bind $c <KeyPress-Up> [list %W yview scroll 10 units]282 bind $c <KeyPress-Down> [list %W yview scroll -10 units]283 bind $c <Enter> "focus %W"284 308 bind $c <Control-F1> [itcl::code $this ToggleConsole] 285 309 … … 335 359 -onimage [Rappture::icon volume-on] \ 336 360 -offimage [Rappture::icon volume-off] \ 337 -variable [itcl::scope _settings(-glyph visible)] \338 -command [itcl::code $this AdjustSetting -glyph visible]361 -variable [itcl::scope _settings(-glyphsvisible)] \ 362 -command [itcl::code $this AdjustSetting -glyphsvisible] 339 363 } 340 364 $itk_component(glyphs) select … … 384 408 blt::table configure $itk_component(plotarea) c1 -resize none 385 409 410 SetupMouseRotationBindings 411 SetupMousePanningBindings 412 SetupMouseZoomBindings 413 SetupKeyboardBindings 414 415 #bind $itk_component(view) <ButtonRelease-3> \ 416 # [itcl::code $this Pick %x %y] 417 418 set _image(download) [image create photo] 419 420 eval itk_initialize $args 421 422 Connect 423 } 424 425 # ---------------------------------------------------------------------- 426 # DESTRUCTOR 427 # ---------------------------------------------------------------------- 428 itcl::body Rappture::VtkGlyphViewer::destructor {} { 429 Disconnect 430 image delete $_image(plot) 431 image delete $_image(download) 432 catch { blt::arcball destroy $_arcball } 433 } 434 435 itcl::body Rappture::VtkGlyphViewer::SetupMouseRotationBindings {} { 386 436 # Bindings for rotation via mouse 387 437 bind $itk_component(view) <ButtonPress-1> \ … … 391 441 bind $itk_component(view) <ButtonRelease-1> \ 392 442 [itcl::code $this Rotate release %x %y] 393 443 } 444 445 itcl::body Rappture::VtkGlyphViewer::SetupMousePanningBindings {} { 394 446 # Bindings for panning via mouse 395 447 bind $itk_component(view) <ButtonPress-2> \ … … 399 451 bind $itk_component(view) <ButtonRelease-2> \ 400 452 [itcl::code $this Pan release %x %y] 401 402 #bind $itk_component(view) <ButtonRelease-3> \ 403 # [itcl::code $this Pick %x %y] 404 453 } 454 455 itcl::body Rappture::VtkGlyphViewer::SetupMouseZoomBindings {} { 456 if {[string equal "x11" [tk windowingsystem]]} { 457 # Bindings for zoom via mouse 458 bind $itk_component(view) <4> [itcl::code $this Zoom out] 459 bind $itk_component(view) <5> [itcl::code $this Zoom in] 460 } 461 } 462 463 itcl::body Rappture::VtkGlyphViewer::SetupKeyboardBindings {} { 405 464 # Bindings for panning via keyboard 406 465 bind $itk_component(view) <KeyPress-Left> \ … … 428 487 429 488 bind $itk_component(view) <Enter> "focus $itk_component(view)" 430 431 if {[string equal "x11" [tk windowingsystem]]} {432 # Bindings for zoom via mouse433 bind $itk_component(view) <4> [itcl::code $this Zoom out]434 bind $itk_component(view) <5> [itcl::code $this Zoom in]435 }436 437 set _image(download) [image create photo]438 439 eval itk_initialize $args440 441 Connect442 }443 444 # ----------------------------------------------------------------------445 # DESTRUCTOR446 # ----------------------------------------------------------------------447 itcl::body Rappture::VtkGlyphViewer::destructor {} {448 Disconnect449 image delete $_image(plot)450 image delete $_image(download)451 catch { blt::arcball destroy $_arcball }452 489 } 453 490 … … 999 1036 } 1000 1037 1001 InitSettings -glyph visible -outline1038 InitSettings -glyphsvisible -outline 1002 1039 #-cutplanesvisible 1003 1040 if { $_reset } { … … 1321 1358 } 1322 1359 "-cutplaneedges" { 1360 set _changed($what) 1 1323 1361 set bool $_settings($what) 1324 1362 SendCmd "cutplane edges $bool" 1325 1363 } 1326 1364 "-cutplanelighting" { 1365 set _changed($what) 1 1327 1366 set bool $_settings($what) 1328 1367 SendCmd "cutplane lighting $bool" 1329 1368 } 1330 1369 "-cutplaneopacity" { 1331 set val $_settings($what)1332 set sval [expr { 0.01 * double($val) }]1333 SendCmd "cutplane opacity $ sval"1370 set _changed($what) 1 1371 set _settings($what) [expr $_widget($what) * 0.01] 1372 SendCmd "cutplane opacity $_settings($what)" 1334 1373 } 1335 1374 "-cutplanepreinterp" { 1375 set _changed($what) 1 1336 1376 set bool $_settings($what) 1337 1377 SendCmd "cutplane preinterp $bool" 1338 1378 } 1339 1379 "-cutplanesvisible" { 1380 set _changed($what) 1 1340 1381 set bool $_settings($what) 1341 1382 SendCmd "cutplane visible 0" … … 1354 1395 } 1355 1396 "-cutplanewireframe" { 1397 set _changed($what) 1 1356 1398 set bool $_settings($what) 1357 1399 SendCmd "cutplane wireframe $bool" … … 1384 1426 } 1385 1427 "-glyphedges" { 1428 set _changed($what) 1 1386 1429 set bool $_settings($what) 1387 1430 SendCmd "glyphs edges $bool" 1388 1431 } 1389 1432 "-glyphlighting" { 1433 set _changed($what) 1 1390 1434 set bool $_settings($what) 1391 1435 SendCmd "glyphs lighting $bool" 1392 1436 } 1393 1437 "-glyphnormscale" { 1438 set _changed($what) 1 1394 1439 set bool $_settings($what) 1395 1440 SendCmd "glyphs normscale $bool" 1396 1441 } 1397 1442 "-glyphopacity" { 1398 set val $_settings($what)1399 set sval [expr { 0.01 * double($val) }]1400 SendCmd "glyphs opacity $ sval"1443 set _changed($what) 1 1444 set _settings($what) [expr $_widget($what) * 0.01] 1445 SendCmd "glyphs opacity $_settings($what)" 1401 1446 } 1402 1447 "-glyphorient" { 1448 set _changed($what) 1 1403 1449 set bool $_settings($what) 1404 1450 SendCmd "glyphs gorient $bool {}" 1405 1451 } 1406 1452 "-glyphscale" { 1453 set _changed($what) 1 1407 1454 set val $_settings($what) 1408 1455 if { [string is double $val] } { … … 1411 1458 } 1412 1459 "-glyphscalemode" { 1460 set _changed($what) 1 1413 1461 set label [$itk_component(scaleMode) value] 1414 1462 set mode [$itk_component(scaleMode) translate $label] … … 1417 1465 } 1418 1466 "-glyphshape" { 1467 set _changed($what) 1 1419 1468 set label [$itk_component(gshape) value] 1420 1469 set shape [$itk_component(gshape) translate $label] … … 1422 1471 SendCmd "glyphs shape $shape" 1423 1472 } 1424 "-glyphvisible" { 1473 "-glyphsvisible" { 1474 set _changed($what) 1 1425 1475 set bool $_settings($what) 1426 1476 SendCmd "glyphs visible 0" … … 1429 1479 SendCmd "glyphs visible $bool $tag" 1430 1480 } 1431 }1432 if { $bool } {1433 1481 Rappture::Tooltip::for $itk_component(glyphs) \ 1434 1482 "Hide the glyphs" … … 1440 1488 } 1441 1489 "-glyphwireframe" { 1490 set _changed($what) 1 1442 1491 set bool $_settings($what) 1443 1492 SendCmd "glyphs wireframe $bool" … … 1458 1507 } 1459 1508 "-outline" { 1509 set _changed($what) 1 1460 1510 set bool $_settings($what) 1461 1511 SendCmd "outline visible 0" … … 1467 1517 } 1468 1518 "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" { 1519 set _changed($what) 1 1469 1520 set axis [string tolower [string range $what 1 1]] 1470 1521 set bool $_settings($what) … … 1479 1530 } 1480 1531 "-xcutplaneposition" - "-ycutplaneposition" - "-zcutplaneposition" { 1532 set _changed($what) 1 1481 1533 set axis [string tolower [string range $what 1 1]] 1482 1534 set pos [expr $_settings($what) * 0.01] … … 1582 1634 checkbutton $inner.glyphs \ 1583 1635 -text "Glyphs" \ 1584 -variable [itcl::scope _settings(-glyph visible)] \1585 -command [itcl::code $this AdjustSetting -glyph visible] \1636 -variable [itcl::scope _settings(-glyphsvisible)] \ 1637 -command [itcl::code $this AdjustSetting -glyphsvisible] \ 1586 1638 -font "Arial 9" 1587 1639 … … 1678 1730 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1679 1731 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1680 -variable [itcl::scope _ settings(-glyphopacity)] \1732 -variable [itcl::scope _widget(-glyphopacity)] \ 1681 1733 -width 10 \ 1682 1734 -showvalue off \ 1683 1735 -command [itcl::code $this AdjustSetting -glyphopacity] 1736 $inner.opacity set [expr $_settings(-glyphopacity) * 100.0] 1684 1737 1685 1738 label $inner.gscale_l -text "Scale factor" -font "Arial 9" … … 1720 1773 } 1721 1774 1722 $inner.colormap choices insert end [GetColormapList ]1775 $inner.colormap choices insert end [GetColormapList -includeNone] 1723 1776 $itk_component(colormap) value "BCGYR" 1724 1777 bind $inner.colormap <<Value>> \ … … 1917 1970 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1918 1971 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1919 -variable [itcl::scope _ settings(-cutplaneopacity)] \1972 -variable [itcl::scope _widget(-cutplaneopacity)] \ 1920 1973 -width 10 \ 1921 1974 -showvalue off \ 1922 1975 -command [itcl::code $this AdjustSetting -cutplaneopacity] 1923 $inner.opacity set $_settings(-cutplaneopacity)1976 $inner.opacity set [expr $_settings(-cutplaneopacity) * 100.0] 1924 1977 1925 1978 # X-value slicer... … … 2134 2187 2135 2188 itcl::body Rappture::VtkGlyphViewer::SetObjectStyle { dataobj comp } { 2189 DebugTrace "Enter" 2136 2190 # Parse style string. 2137 2191 set tag $dataobj-$comp 2138 2192 array set style { 2139 -color BCGYR 2140 -edgecolor black 2141 -edges 0 2142 -gscale 1 2143 -lighting 1 2144 -linewidth 1.0 2145 -normscale 1 2146 -opacity 1.0 2147 -orientglyphs 1 2148 -outline 0 2149 -ptsize 1.0 2150 -quality 1 2151 -scalemode vmag 2152 -shape arrow 2153 -wireframe 0 2154 } 2193 -color BCGYR 2194 -constcolor white 2195 -colormode vmag 2196 -cutplaneedges 0 2197 -cutplanelighting 1 2198 -cutplaneopacity 1.0 2199 -cutplanepreinterp 1 2200 -cutplanesvisible 0 2201 -cutplanewireframe 0 2202 -edgecolor black 2203 -edges 0 2204 -glyphsvisible 1 2205 -gscale 1 2206 -lighting 1 2207 -linewidth 1.0 2208 -normscale 1 2209 -opacity 1.0 2210 -orientglyphs 1 2211 -outline 0 2212 -ptsize 1.0 2213 -quality 1 2214 -scalemode vmag 2215 -shape arrow 2216 -wireframe 0 2217 -xcutplaneposition 50 2218 -xcutplanevisible 1 2219 -ycutplaneposition 50 2220 -ycutplanevisible 1 2221 -zcutplaneposition 50 2222 -zcutplanevisible 1 2223 } 2224 set style(-constcolor) $itk_option(-plotforeground) 2155 2225 set numComponents [$dataobj numComponents $comp] 2156 2226 if {$numComponents == 3} { … … 2158 2228 set style(-orientglyphs) 1 2159 2229 set style(-scalemode) "vmag" 2230 set style(-colormode) "vmag" 2160 2231 } else { 2161 2232 set style(-shape) "sphere" 2162 2233 set style(-orientglyphs) 0 2163 2234 set style(-scalemode) "scalar" 2235 set style(-colormode) "scalar" 2164 2236 } 2165 2237 array set style [$dataobj style $comp] … … 2184 2256 # the code to handle aberrant cases. 2185 2257 2258 if { $_changed(-glyphedges) } { 2259 set style(-edges) $_settings(-glyphedges) 2260 } 2261 if { $_changed(-glyphlighting) } { 2262 set style(-lighting) $_settings(-glyphlighting) 2263 } 2264 if { $_changed(-glyphnormscale) } { 2265 set style(-normscale) $_settings(-glyphnormscale) 2266 } 2186 2267 if { $_changed(-glyphopacity) } { 2187 set style(-opacity) [expr $_settings(-glyphopacity) * 0.01] 2268 set style(-opacity) $_settings(-glyphopacity) 2269 } 2270 if { $_changed(-glyphorient) } { 2271 set style(-orientglyphs) $_settings(-glyphorient) 2272 } 2273 if { $_changed(-glyphscale) } { 2274 set style(-gscale) $_settings(-glyphscale) 2275 } 2276 if { $_changed(-glyphwireframe) } { 2277 set style(-wireframe) $_settings(-glyphwireframe) 2188 2278 } 2189 2279 if { $_changed(-colormap) } { … … 2192 2282 if { $_currentColormap == "" } { 2193 2283 $itk_component(colormap) value $style(-color) 2284 } 2285 foreach setting {-outline -glyphsvisible -cutplanesvisible \ 2286 -xcutplanevisible -ycutplanevisible -zcutplanevisible \ 2287 -xcutplaneposition -ycutplaneposition -zcutplaneposition \ 2288 -cutplaneedges -cutplanelighting -cutplaneopacity \ 2289 -cutplanepreinterp -cutplanewireframe} { 2290 if {$_changed($setting)} { 2291 # User-modified UI setting overrides style 2292 set style($setting) $_settings($setting) 2293 } else { 2294 # Set UI control to style setting (tool provided or default) 2295 set _settings($setting) $style($setting) 2296 } 2194 2297 } 2195 2298 … … 2197 2300 SendCmd "cutplane add $tag" 2198 2301 SendCmd "cutplane visible 0 $tag" 2302 foreach axis {x y z} { 2303 set pos [expr $style(-${axis}cutplaneposition) * 0.01] 2304 set visible $style(-${axis}cutplanevisible) 2305 SendCmd "cutplane slice $axis $pos $tag" 2306 SendCmd "cutplane axis $axis $visible $tag" 2307 } 2308 SendCmd "cutplane edges $style(-cutplaneedges) $tag" 2309 SendCmd "cutplane lighting $style(-cutplanelighting) $tag" 2310 SendCmd "cutplane opacity $style(-cutplaneopacity) $tag" 2311 set _widget(-cutplaneopacity) [expr $style(-cutplaneopacity) * 100] 2312 SendCmd "cutplane preinterp $style(-cutplanepreinterp) $tag" 2313 SendCmd "cutplane wireframe $style(-cutplanewireframe) $tag" 2314 SendCmd "cutplane visible $style(-cutplanesvisible) $tag" 2199 2315 } 2200 2316 2201 2317 SendCmd "outline add $tag" 2202 SendCmd "outline color [Color2RGB $ itk_option(-plotforeground)] $tag"2318 SendCmd "outline color [Color2RGB $style(-constcolor)] $tag" 2203 2319 SendCmd "outline visible $style(-outline) $tag" 2204 set _settings(-outline) $style(-outline)2205 2320 2206 2321 SendCmd "glyphs add $style(-shape) $tag" 2207 2322 set _settings(-glyphshape) $style(-shape) 2208 2323 $itk_component(gshape) value $style(-shape) 2324 SendCmd "glyphs visible $style(-glyphsvisible) $tag" 2209 2325 SendCmd "glyphs edges $style(-edges) $tag" 2210 2326 set _settings(-glyphedges) $style(-edges) … … 2220 2336 set _settings(-glyphscale) $style(-gscale) 2221 2337 2338 if {$style(-colormode) == "constant" || $style(-color) == "none"} { 2339 SendCmd "glyphs colormode constant {} $tag" 2340 set _settings(-colormapvisible) 0 2341 set _settings(-colormap) "none" 2342 } else { 2343 SendCmd "glyphs colormode $style(-colormode) $_curFldName $tag" 2344 set _settings(-colormapvisible) 1 2345 set _settings(-colormap) $style(-color) 2346 SetCurrentColormap $style(-color) 2347 } 2348 $itk_component(colormap) value $_settings(-colormap) 2349 set _colorMode $style(-colormode) 2350 2222 2351 # constant color only used if colormode set to constant 2223 SendCmd "glyphs color [Color2RGB $ itk_option(-plotforeground)] $tag"2352 SendCmd "glyphs color [Color2RGB $style(-constcolor)] $tag" 2224 2353 # Omitting field name for gorient and smode commands 2225 2354 # defaults to active scalars or vectors depending on mode … … 2236 2365 SendCmd "glyphs ptsize $style(-ptsize) $tag" 2237 2366 SendCmd "glyphs opacity $style(-opacity) $tag" 2238 set _settings(-glyphopacity) [expr $style(-opacity) * 100.0]2239 SetCurrentColormap $style(-color)2367 set _settings(-glyphopacity) $style(-opacity) 2368 set _widget(-glyphopacity) [expr $style(-opacity) * 100.0] 2240 2369 SendCmd "glyphs wireframe $style(-wireframe) $tag" 2241 2370 set _settings(-glyphwireframe) $style(-wireframe) … … 2452 2581 set x1 [expr $x2 - ($iw*12)/10] 2453 2582 2454 $c bind title <ButtonPress> [itcl::code $this Combopost]2455 $c bind title <Enter> [itcl::code $this Combo activate]2456 $c bind title <Leave> [itcl::code $this Combo deactivate]2583 $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post] 2584 $c bind title <Enter> [itcl::code $this LegendTitleAction enter] 2585 $c bind title <Leave> [itcl::code $this LegendTitleAction leave] 2457 2586 # Reset the item coordinates according the current size of the plot. 2458 2587 $c itemconfigure title -text $title … … 2479 2608 2480 2609 # ---------------------------------------------------------------------- 2481 # USAGE: _dropdown post 2482 # USAGE: _dropdown unpost 2483 # USAGE: _dropdown select 2484 # 2485 # Used internally to handle the dropdown list for this combobox. The 2486 # post/unpost options are invoked when the list is posted or unposted 2487 # to manage the relief of the controlling button. The select option 2488 # is invoked whenever there is a selection from the list, to assign 2489 # the value back to the gauge. 2490 # ---------------------------------------------------------------------- 2491 itcl::body Rappture::VtkGlyphViewer::Combo {option} { 2610 # USAGE: LegendTitleAction post 2611 # USAGE: LegendTitleAction enter 2612 # USAGE: LegendTitleAction leave 2613 # USAGE: LegendTitleAction save 2614 # 2615 # Used internally to handle the dropdown list for the fields menu combobox. 2616 # The post option is invoked when the field title is pressed to launch the 2617 # dropdown. The enter option is invoked when the user mouses over the field 2618 # title. The leave option is invoked when the user moves the mouse away 2619 # from the field title. The save option is invoked whenever there is a 2620 # selection from the list, to alert the visualization server. 2621 # ---------------------------------------------------------------------- 2622 itcl::body Rappture::VtkGlyphViewer::LegendTitleAction {option} { 2492 2623 set c $itk_component(view) 2493 2624 switch -- $option { … … 2501 2632 tk_popup $itk_component(fieldmenu) $x $y 2502 2633 } 2503 activate{2634 enter { 2504 2635 $c itemconfigure title -fill red 2505 2636 } 2506 deactivate {2637 leave { 2507 2638 $c itemconfigure title -fill $itk_option(-plotforeground) 2508 2639 } 2509 invoke {2640 save { 2510 2641 $itk_component(field) value $_curFldLabel 2511 2642 AdjustSetting -field 2512 2643 } 2513 2644 default { 2514 error "bad option \"$option\": should be post, unpost, select"2645 error "bad option \"$option\": should be post, enter, leave or save" 2515 2646 } 2516 2647 } … … 2528 2659 set _currentColormap $name 2529 2660 SendCmd "glyphs colormap $_currentColormap" 2661 #SendCmd "cutplane colormap $_currentColormap" 2530 2662 } 2531 2663 … … 2585 2717 -activeforeground $itk_option(-plotforeground) \ 2586 2718 -font "Arial 8" \ 2587 -command [itcl::code $this Combo invoke]2719 -command [itcl::code $this LegendTitleAction save] 2588 2720 set _fields($fname) [list $label $units $components] 2589 2721 if { $_curFldName == "" } { -
branches/1.6/gui/scripts/vtkheightmapviewer.tcl
r6155 r6212 113 113 114 114 private variable _arcball "" 115 private variable _dlist "" ;# list of data objects116 private variable _obj2ovride ;# maps dataobj => style override115 private variable _dlist ""; # list of data objects 116 private variable _obj2ovride; # maps dataobj => style override 117 117 private variable _comp2scale; # maps dataset to the heightmap scale. 118 private variable _datasets ;# contains all the dataobj-component119 ;# datasets in the server120 private variable _colormaps ;# contains all the colormaps121 ;# in the server.118 private variable _datasets; # contains all the dataobj-component 119 # datasets in the server 120 private variable _colormaps; # contains all the colormaps 121 # in the server. 122 122 123 123 # The name of the current colormap used. The colormap is global to all … … 131 131 # -stretchtofit 132 132 133 private variable _click ;# info used for rotate operations134 private variable _limits ;# Holds overall limits for all dataobjs133 private variable _click; # info used for rotate operations 134 private variable _limits; # Holds overall limits for all dataobjs 135 135 # using the viewer. 136 private variable _view ;# view params for 3D view136 private variable _view; # view params for 3D view 137 137 private variable _settings 138 138 private variable _changed 139 139 private variable _reset 1; # Connection to server has been reset. 140 140 141 private variable _first "" ;# This is the topmost dataset.141 private variable _first ""; # This is the topmost dataset. 142 142 private variable _start 0 143 143 private variable _isolines … … 153 153 private variable _curFldName "" 154 154 private variable _curFldLabel "" 155 private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)155 private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar) 156 156 157 157 private common _downloadPopup; # download options from popup … … 193 193 # 194 194 $_parser alias image [itcl::code $this ReceiveImage] 195 $_parser alias legend [itcl::code $this ReceiveLegend] 195 196 $_parser alias dataset [itcl::code $this ReceiveDataset] 196 $_parser alias legend [itcl::code $this ReceiveLegend]197 197 198 198 # Create image for legend colorbar. … … 264 264 set c $itk_component(view) 265 265 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 266 bind $c <4> [itcl::code $this Zoom in 0.25]267 bind $c <5> [itcl::code $this Zoom out 0.25]268 bind $c <KeyPress-Left> [list %W xview scroll 10 units]269 bind $c <KeyPress-Right> [list %W xview scroll -10 units]270 bind $c <KeyPress-Up> [list %W yview scroll 10 units]271 bind $c <KeyPress-Down> [list %W yview scroll -10 units]272 bind $c <Enter> "focus %W"273 266 bind $c <Control-F1> [itcl::code $this ToggleConsole] 274 267 -
branches/1.6/gui/scripts/vtkimageviewer.tcl
r6155 r6212 109 109 110 110 private variable _arcball "" 111 private variable _dlist "" ;# list of data objects112 private variable _obj2ovride ;# maps dataobj => style override113 private variable _datasets ;# contains all the dataobj-component114 ;# datasets in the server115 private variable _colormaps ;# contains all the colormaps116 ;# in the server.111 private variable _dlist ""; # list of data objects 112 private variable _obj2ovride; # maps dataobj => style override 113 private variable _datasets; # contains all the dataobj-component 114 # datasets in the server 115 private variable _colormaps; # contains all the colormaps 116 # in the server. 117 117 118 118 # The name of the current colormap used. The colormap is global to all … … 126 126 # -stretchtofit 127 127 128 private variable _click ;# info used for rotate operations129 private variable _limits ;# Holds overall limits for all dataobjs128 private variable _click; # info used for rotate operations 129 private variable _limits; # Holds overall limits for all dataobjs 130 130 # using the viewer. 131 private variable _view ;# view params for 3D view131 private variable _view; # view params for 3D view 132 132 private variable _settings 133 133 private variable _changed 134 134 private variable _reset 1; # Connection to server has been reset. 135 135 136 private variable _first "" ;# This is the topmost dataset.136 private variable _first ""; # This is the topmost dataset. 137 137 private variable _start 0 138 138 private variable _isolines … … 148 148 private variable _curFldName "" 149 149 private variable _curFldLabel "" 150 private variable _colorMode "scalar"; #Mode of colormap (vmag or scalar)150 private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar) 151 151 152 152 private common _downloadPopup; # download options from popup … … 188 188 # 189 189 $_parser alias image [itcl::code $this ReceiveImage] 190 $_parser alias legend [itcl::code $this ReceiveLegend] 190 191 $_parser alias dataset [itcl::code $this ReceiveDataset] 191 $_parser alias legend [itcl::code $this ReceiveLegend]192 192 193 193 # Create image for legend colorbar. … … 252 252 set c $itk_component(view) 253 253 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 254 bind $c <4> [itcl::code $this Zoom in 0.25]255 bind $c <5> [itcl::code $this Zoom out 0.25]256 bind $c <KeyPress-Left> [list %W xview scroll 10 units]257 bind $c <KeyPress-Right> [list %W xview scroll -10 units]258 bind $c <KeyPress-Up> [list %W yview scroll 10 units]259 bind $c <KeyPress-Down> [list %W yview scroll -10 units]260 bind $c <Enter> "focus %W"261 254 bind $c <Control-F1> [itcl::code $this ToggleConsole] 262 255 -
branches/1.6/gui/scripts/vtkisosurfaceviewer.tcl
r6155 r6212 116 116 private method SetObjectStyle { dataobj comp } 117 117 private method SetOrientation { side } 118 private method SetupKeyboardBindings {} 119 private method SetupMousePanningBindings {} 118 120 private method SetupMouseRotationBindings {} 119 private method SetupMousePanningBindings {} 120 private method SetupKeyboardBindings {} 121 private method SetupMouseZoomBindings {} 121 122 private method Slice {option args} 122 123 private method ToggleCustomRange { args } … … 338 339 set c $itk_component(view) 339 340 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 340 bind $c <4> [itcl::code $this Zoom in 0.25]341 bind $c <5> [itcl::code $this Zoom out 0.25]342 bind $c <KeyPress-Left> [list %W xview scroll 10 units]343 bind $c <KeyPress-Right> [list %W xview scroll -10 units]344 bind $c <KeyPress-Up> [list %W yview scroll 10 units]345 bind $c <KeyPress-Down> [list %W yview scroll -10 units]346 bind $c <Enter> "focus %W"347 341 bind $c <Control-F1> [itcl::code $this ToggleConsole] 348 342 … … 417 411 pack $itk_component(cutplane) -padx 2 -pady 2 418 412 419 420 413 if { [catch { 421 414 BuildIsosurfaceTab … … 448 441 SetupMouseRotationBindings 449 442 SetupMousePanningBindings 443 SetupMouseZoomBindings 450 444 SetupKeyboardBindings 451 452 445 453 446 #bind $itk_component(view) <ButtonRelease-3> \ 454 447 # [itcl::code $this Pick %x %y] 455 456 457 if {[string equal "x11" [tk windowingsystem]]} {458 # Bindings for zoom via mouse459 bind $itk_component(view) <4> [itcl::code $this Zoom out]460 bind $itk_component(view) <5> [itcl::code $this Zoom in]461 }462 448 463 449 set _image(download) [image create photo] … … 503 489 bind $itk_component(view) <ButtonRelease-2> \ 504 490 [itcl::code $this Pan release %x %y] 491 } 492 493 itcl::body Rappture::VtkIsosurfaceViewer::SetupMouseZoomBindings {} { 494 if {[string equal "x11" [tk windowingsystem]]} { 495 # Bindings for zoom via mouse 496 bind $itk_component(view) <4> [itcl::code $this Zoom out] 497 bind $itk_component(view) <5> [itcl::code $this Zoom in] 498 } 505 499 } 506 500 … … 1677 1671 set _colormaps($cmap) 1 1678 1672 } 1679 #SendCmd "legend $cmap scalar$_curFldName {} $w $h 0"1673 #SendCmd "legend $cmap $_colorMode $_curFldName {} $w $h 0" 1680 1674 SendCmd "legend2 $cmap $w $h" 1681 1675 } … … 1821 1815 [itcl::code $this AdjustSetting -numcontours] 1822 1816 1823 1824 1817 # add widgets for setting a custom range on the legend 1825 1818 … … 1854 1847 $itk_component(min) configure -state disabled 1855 1848 $itk_component(max) configure -state disabled 1856 1857 1849 1858 1850 blt::table $inner \ … … 2762 2754 # Used internally to handle the dropdown list for the fields menu combobox. 2763 2755 # The post option is invoked when the field title is pressed to launch the 2764 # dropdown. The enter option is invoked when the user mouses over the field2756 # dropdown. The enter option is invoked when the user mouses over the field 2765 2757 # title. The leave option is invoked when the user moves the mouse away 2766 2758 # from the field title. The save option is invoked whenever there is a … … 2790 2782 } 2791 2783 default { 2792 error "bad option \"$option\": should be post, enter, leave ,save"2784 error "bad option \"$option\": should be post, enter, leave or save" 2793 2785 } 2794 2786 } -
branches/1.6/gui/scripts/vtkmeshviewer.tcl
r6155 r6212 210 210 set c $itk_component(view) 211 211 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 212 bind $c <4> [itcl::code $this Zoom in 0.25]213 bind $c <5> [itcl::code $this Zoom out 0.25]214 bind $c <KeyPress-Left> [list %W xview scroll 10 units]215 bind $c <KeyPress-Right> [list %W xview scroll -10 units]216 bind $c <KeyPress-Up> [list %W yview scroll 10 units]217 bind $c <KeyPress-Down> [list %W yview scroll -10 units]218 bind $c <Enter> "focus %W"219 212 bind $c <Control-F1> [itcl::code $this ToggleConsole] 220 213 -
branches/1.6/gui/scripts/vtkstreamlinesviewer.tcl
r6155 r6212 114 114 private variable _arcball "" 115 115 116 private variable _dlist "" ;# list of data objects117 private variable _obj2ovride ;# maps dataobj => style override118 private variable _datasets ;# contains all the dataobj-component119 ;# datasets in the server120 private variable _colormaps ;# contains all the colormaps121 ;# in the server.116 private variable _dlist ""; # list of data objects 117 private variable _obj2ovride; # maps dataobj => style override 118 private variable _datasets; # contains all the dataobj-component 119 # datasets in the server 120 private variable _colormaps; # contains all the colormaps 121 # in the server. 122 122 private variable _currentColormap "" 123 123 124 private variable _click ;# info used for rotate operations125 private variable _limits ;# autoscale min/max for all axes126 private variable _view ;# view params for 3D view124 private variable _click; # info used for rotate operations 125 private variable _limits; # autoscale min/max for all axes 126 private variable _view; # view params for 3D view 127 127 private variable _settings 128 128 private variable _reset 1; # Connection to server has been reset. 129 129 130 private variable _first "" ;# This is the topmost dataset.130 private variable _first ""; # This is the topmost dataset. 131 131 private variable _start 0 132 132 private variable _title "" … … 144 144 private variable _field "" 145 145 private variable _numSeeds 200 146 private variable _colorMode "vmag"; #Mode of colormap (vmag or scalar)146 private variable _colorMode "vmag"; # Mode of colormap (vmag or scalar) 147 147 148 148 private common _downloadPopup; # download options from popup … … 271 271 set c $itk_component(view) 272 272 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 273 bind $c <4> [itcl::code $this Zoom in 0.25]274 bind $c <5> [itcl::code $this Zoom out 0.25]275 bind $c <KeyPress-Left> [list %W xview scroll 10 units]276 bind $c <KeyPress-Right> [list %W xview scroll -10 units]277 bind $c <KeyPress-Up> [list %W yview scroll 10 units]278 bind $c <KeyPress-Down> [list %W yview scroll -10 units]279 bind $c <Enter> "focus %W"280 273 bind $c <Control-F1> [itcl::code $this ToggleConsole] 281 274 -
branches/1.6/gui/scripts/vtksurfaceviewer.tcl
r6155 r6212 111 111 private variable _arcball "" 112 112 113 private variable _dlist "" ;# list of data objects114 private variable _obj2ovride ;# maps dataobj => style override115 private variable _datasets ;# contains all the dataobj-component116 ;# datasets in the server117 private variable _colormaps ;# contains all the colormaps118 ;# in the server.113 private variable _dlist ""; # list of data objects 114 private variable _obj2ovride; # maps dataobj => style override 115 private variable _datasets; # contains all the dataobj-component 116 # datasets in the server 117 private variable _colormaps; # contains all the colormaps 118 # in the server. 119 119 # The name of the current colormap used. The colormap is global to all 120 120 # heightmaps displayed. … … 122 122 private variable _currentNumContours -1 123 123 124 private variable _click ;# info used for rotate operations125 private variable _limits ;# autoscale min/max for all axes126 private variable _view ;# view params for 3D view124 private variable _click; # info used for rotate operations 125 private variable _limits; # autoscale min/max for all axes 126 private variable _view; # view params for 3D view 127 127 private variable _settings 128 128 private variable _changed 129 129 private variable _reset 1; # Connection to server has been reset. 130 130 131 private variable _first "" ;# This is the topmost dataset.131 private variable _first ""; # This is the topmost dataset. 132 132 private variable _start 0 133 133 private variable _title "" … … 139 139 private variable _legendPending 0 140 140 private variable _rotatePending 0 141 private variable _field 142 private variable _colorMode "scalar"; # 141 private variable _field "" 142 private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar) 143 143 private variable _fields 144 144 private variable _curFldName "" … … 251 251 set c $itk_component(view) 252 252 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 253 bind $c <4> [itcl::code $this Zoom in 0.25]254 bind $c <5> [itcl::code $this Zoom out 0.25]255 bind $c <KeyPress-Left> [list %W xview scroll 10 units]256 bind $c <KeyPress-Right> [list %W xview scroll -10 units]257 bind $c <KeyPress-Up> [list %W yview scroll 10 units]258 bind $c <KeyPress-Down> [list %W yview scroll -10 units]259 bind $c <Enter> "focus %W"260 253 bind $c <Control-F1> [itcl::code $this ToggleConsole] 261 254 -
branches/1.6/gui/scripts/vtkviewer.tcl
r6155 r6212 225 225 # 226 226 $_parser alias image [itcl::code $this ReceiveImage] 227 $_parser alias legend [itcl::code $this ReceiveLegend] 227 228 $_parser alias dataset [itcl::code $this ReceiveDataset] 228 $_parser alias legend [itcl::code $this ReceiveLegend]229 229 230 230 # Initialize the view to some default parameters. … … 305 305 set c $itk_component(view) 306 306 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 307 bind $c <4> [itcl::code $this Zoom in 0.25]308 bind $c <5> [itcl::code $this Zoom out 0.25]309 bind $c <KeyPress-Left> [list %W xview scroll 10 units]310 bind $c <KeyPress-Right> [list %W xview scroll -10 units]311 bind $c <KeyPress-Up> [list %W yview scroll 10 units]312 bind $c <KeyPress-Down> [list %W yview scroll -10 units]313 bind $c <Enter> "focus %W"314 307 bind $c <Control-F1> [itcl::code $this ToggleConsole] 315 308 -
branches/1.6/gui/scripts/vtkvolumeviewer.tcl
r6155 r6212 267 267 set c $itk_component(view) 268 268 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] 269 bind $c <4> [itcl::code $this Zoom in 0.25]270 bind $c <5> [itcl::code $this Zoom out 0.25]271 bind $c <KeyPress-Left> [list %W xview scroll 10 units]272 bind $c <KeyPress-Right> [list %W xview scroll -10 units]273 bind $c <KeyPress-Up> [list %W yview scroll 10 units]274 bind $c <KeyPress-Down> [list %W yview scroll -10 units]275 bind $c <Enter> "focus %W"276 269 bind $c <Control-F1> [itcl::code $this ToggleConsole] 277 270 -
branches/1.6/puq/Makefile.in
r6189 r6212 35 35 $(INSTALL) -m 0444 $$i $(puq_libdir) ; \ 36 36 done 37 $(INSTALL) -m 0555 puq.sh $(bindir) 38 37 $(INSTALL) -m 0555 puq.sh $(bindir) 39 38 40 39 clean: -
branches/1.6/puq/puq.sh.in
- Property svn:executable set to *
Note: See TracChangeset
for help on using the changeset viewer.