Changeset 4481 for branches/1.3/gui
- Timestamp:
- Jul 10, 2014, 6:08:15 AM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 deleted
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 4169,4344
- Property svn:mergeinfo changed
-
branches/1.3/gui/scripts/Makefile.in
r4474 r4481 51 51 $(srcdir)/energyLevels.tcl \ 52 52 $(srcdir)/field.tcl \ 53 $(srcdir)/field2dresult.tcl \ 54 $(srcdir)/field3dresult.tcl \ 53 $(srcdir)/fieldresult.tcl \ 55 54 $(srcdir)/filexfer.tcl \ 56 55 $(srcdir)/flowdial.tcl \ … … 135 134 $(srcdir)/vtkmeshviewer.tcl \ 136 135 $(srcdir)/vtkstreamlinesviewer.tcl \ 136 $(srcdir)/vtksurfaceviewer.tcl \ 137 137 $(srcdir)/vtkvolumeviewer.tcl \ 138 138 $(srcdir)/vtkheightmapviewer.tcl \ -
branches/1.3/gui/scripts/fieldresult.tcl
r4169 r4481 61 61 set servers [Rappture::VisViewer::GetServerList "nanovis"] 62 62 } 63 "contour" - "glyphs" - "heightmap" - "isosurface" - "streamlines" - " vtkimage" - "vtkviewer" - "vtkvolume" {63 "contour" - "glyphs" - "heightmap" - "isosurface" - "streamlines" - "surface" - "vtkimage" - "vtkviewer" - "vtkvolume" { 64 64 set servers [Rappture::VisViewer::GetServerList "vtkvis"] 65 65 } … … 87 87 "contour" - "heightmap" { 88 88 itk_component add renderer { 89 Rappture::VtkHeightmapViewer $itk_interior.ren \90 $servers-mode $flags(-mode)89 Rappture::VtkHeightmapViewer $itk_interior.ren $servers \ 90 -mode $flags(-mode) 91 91 } 92 92 } … … 99 99 itk_component add renderer { 100 100 Rappture::VtkStreamlinesViewer $itk_interior.ren $servers 101 } 102 } 103 "surface" { 104 itk_component add renderer { 105 Rappture::VtkSurfaceViewer $itk_interior.ren $servers 101 106 } 102 107 } -
branches/1.3/gui/scripts/resultviewer.tcl
r4474 r4481 307 307 } 308 308 } 309 2D { 310 set mode "field2d" 311 set viewer [$dataobj viewer] 312 set extents [$dataobj extents] 313 if { $extents > 1 } { 314 set mode "flowvis" 315 } 316 if {![info exists _mode2widget($mode)]} { 317 set w $itk_interior.$mode 318 if { ![winfo exists $w] } { 319 Rappture::Field2DResult $w -mode $viewer 320 } 321 set _mode2widget($mode) $w 322 } 323 } 324 3D { 309 default { 325 310 set mode [$dataobj viewer] 326 set extents [$dataobj extents]327 if { $extents > 1 } {328 set mode "flowvis"329 }330 311 if {![info exists _mode2widget($mode)]} { 331 312 set w $itk_interior.$mode 332 313 if { ![winfo exists $w] } { 333 Rappture::Field 3DResult $w -mode $mode314 Rappture::FieldResult $w -mode $mode 334 315 } 335 316 set _mode2widget($mode) $w 336 317 } 337 }338 default {339 puts stderr "WARNING: can't handle \"$dims\" dimension field"340 return341 318 } 342 319 } -
branches/1.3/gui/scripts/sequenceresult.tcl
r3800 r4481 493 493 } 494 494 set mode [$dataobj viewer] 495 switch -- $dimensions { 496 2D { 497 Rappture::Field2DResult $w -mode $mode 498 } 499 3D { 500 Rappture::Field3DResult $w -mode $mode 501 } 502 default { 503 error "don't know how to view sequences of $type\ 504 with \"$dimensions\" dimensions dim=[$dataobj components -dimensions]" 505 } 506 } 495 FieldResult $w -mode $mode 507 496 pack $w -expand yes -fill both 508 497 } -
branches/1.3/gui/scripts/vtkglyphviewer.tcl
r4455 r4481 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 3 2 # ---------------------------------------------------------------------- 4 3 # COMPONENT: vtkglyphviewer - Vtk 3D glyphs object viewer … … 8 7 # ====================================================================== 9 8 # AUTHOR: Michael McLennan, Purdue University 10 # Copyright (c) 2004-20 05 Purdue Research Foundation9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 11 10 # 12 11 # See the file "license.terms" for information on usage and … … 1478 1477 itcl::body Rappture::VtkGlyphViewer::RequestLegend {} { 1479 1478 set _legendPending 0 1480 if { ![info exists _fields($_curFldName)] } { 1481 return 1482 } 1479 set font "Arial 8" 1480 set w 12 1481 set lineht [font metrics $font -linespace] 1482 # color ramp height = (canvas height) - (min and max value lines) - 2 1483 set h [expr {$_height - 2 * ($lineht + 2)}] 1484 1483 1485 set fname $_curFldName 1484 set font "Arial 8"1485 set lineht [font metrics $font -linespace]1486 set w 121487 set h [expr {$_height - 2 * ($lineht + 2)}]1488 if { $h < 1 } {1489 return1490 }1491 1486 if { [string match "component*" $fname] } { 1492 1487 set title "" … … 1504 1499 if { $title != "" } { 1505 1500 incr h -$lineht 1501 } 1502 if { $h < 1 } { 1503 return 1506 1504 } 1507 1505 # Set the legend on the first heightmap dataset. … … 2299 2297 # If there's a legend title, create a text item for the title. 2300 2298 $c create text $x $y \ 2301 -anchor ne \ 2302 -fill $itk_option(-plotforeground) -tags "title legend" \ 2303 -font $font 2304 incr y $lineht 2299 -anchor ne \ 2300 -fill $itk_option(-plotforeground) -tags "title legend" \ 2301 -font $font 2302 if { $title != "" } { 2303 incr y $lineht 2304 } 2305 2305 $c create text $x $y \ 2306 2307 2308 2306 -anchor ne \ 2307 -fill $itk_option(-plotforeground) -tags "vmax legend" \ 2308 -font $font 2309 2309 incr y $lineht 2310 2310 $c create image $x $y \ 2311 2312 2311 -anchor ne \ 2312 -image $_image(legend) -tags "colormap legend" 2313 2313 $c create rectangle $x $y 1 1 \ 2314 2314 -fill "" -outline "" -tags "sensor legend" 2315 2315 $c create text $x [expr {$h-2}] \ 2316 2317 2318 2316 -anchor se \ 2317 -fill $itk_option(-plotforeground) -tags "vmin legend" \ 2318 -font $font 2319 2319 $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y] 2320 2320 $c bind sensor <Leave> [itcl::code $this LeaveLegend]
Note: See TracChangeset
for help on using the changeset viewer.