- Timestamp:
- Jun 12, 2012, 3:28:52 PM (12 years ago)
- Location:
- branches/blt4
- Files:
-
- 9 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/vtkcontourviewer.tcl
r3029 r3031 155 155 keep -background -foreground -cursor -font 156 156 } 157 itk::usual BltTkPushbutton { 158 #empty 159 } 157 160 158 161 # ---------------------------------------------------------------------- … … 225 228 contour-palette BCGYR 226 229 colormap 1 230 surface 0 227 231 }] 228 232 … … 301 305 pack $itk_component(zoomout) -side top -padx 2 -pady 2 302 306 Rappture::Tooltip::for $itk_component(zoomout) "Zoom out" 307 308 itk_component add surface { 309 blt::tk::pushbutton $f.surface \ 310 -onimage [Rappture::icon surface] \ 311 -offimage [Rappture::icon surface] \ 312 -command [itcl::code $this AdjustSetting surface] \ 313 -variable [itcl::scope _settings(surface)] 314 } 315 Rappture::Tooltip::for $itk_component(surface) \ 316 "Toggle the surface/contour on/off" 317 pack $itk_component(surface) -padx 2 -pady 2 318 303 319 304 320 if { [catch BuildViewTab errs] != 0 } { … … 1310 1326 } 1311 1327 } 1328 "surface" { 1329 if {[isconnected]} { 1330 set bool $_settings(surface) 1331 foreach dataset [CurrentDatasets -all] { 1332 set c itk_component(view) 1333 if { $bool } { 1334 # Bindings for rotation via mouse 1335 bind $itk_component(view) <ButtonPress-1> \ 1336 [itcl::code $this Rotate click %x %y] 1337 bind $itk_component(view) <B1-Motion> \ 1338 [itcl::code $this Rotate drag %x %y] 1339 bind $itk_component(view) <ButtonRelease-1> \ 1340 [itcl::code $this Rotate release %x %y] 1341 SendCmd "heightmap heightscale 100.0 $dataset" 1342 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1343 $_arcball quaternion $q 1344 SendCmd "camera mode persp" 1345 SendCmd "camera orient $q" 1346 } else { 1347 bind $c <ButtonPress-1> [itcl::code $this BeginSelectionRectangle %x %y] 1348 bind $c <B1-Motion> [itcl::code $this AdjustSelectionRectangle %x %y] 1349 bind $c <ButtonRelease-1> [itcl::code $this EndSelectionRectangle %x %y] 1350 SendCmd "heightmap heightscale 0 $dataset" 1351 SendCmd "camera mode image" 1352 } 1353 } 1354 } 1355 } 1312 1356 "lighting" { 1313 1357 if {[isconnected]} { … … 1459 1503 -variable [itcl::scope _settings(edges)] \ 1460 1504 -command [itcl::code $this AdjustSetting edges] \ 1505 -font "Arial 9" 1506 1507 checkbutton $inner.surface \ 1508 -text "Surface" \ 1509 -variable [itcl::scope _settings(surface)] \ 1510 -command [itcl::code $this AdjustSetting surface] \ 1461 1511 -font "Arial 9" 1462 1512 … … 1522 1572 5,0 $inner.legend -columnspan 4 -anchor w \ 1523 1573 6,0 $inner.edges -columnspan 4 -anchor w -pady 2 \ 1524 7,0 $inner.clear -anchor e -pady 2 \ 1525 7,1 $inner.opacity -columnspan 2 -pady 2 -fill x\ 1526 7,3 $inner.opaque -anchor w -pady 2 \ 1527 8,0 $inner.field_l -anchor e -pady 2 \ 1528 8,1 $inner.field -cspan 3 -anchor w -pady 2 -fill x \ 1529 9,0 $inner.palette_l -anchor e -pady 2 \ 1530 9,1 $inner.palette -cspan 3 -fill x -pady 2 1574 7,0 $inner.surface -columnspan 4 -anchor w -pady 2 \ 1575 8,0 $inner.clear -anchor e -pady 2 \ 1576 8,1 $inner.opacity -columnspan 2 -pady 2 -fill x\ 1577 8,3 $inner.opaque -anchor w -pady 2 \ 1578 9,0 $inner.field_l -anchor e -pady 2 \ 1579 9,1 $inner.field -cspan 3 -anchor w -pady 2 -fill x \ 1580 10,0 $inner.palette_l -anchor e -pady 2 \ 1581 10,1 $inner.palette -cspan 3 -fill x -pady 2 1531 1582 1532 1583 blt::table configure $inner r* -resize none 1533 blt::table configure $inner r1 0-resize expand1584 blt::table configure $inner r11 -resize expand 1534 1585 } 1535 1586 … … 2172 2223 -color \#808080 2173 2224 -edgecolor black 2225 -surface 0 2174 2226 -edges 0 2175 2227 -lighting 1
Note: See TracChangeset
for help on using the changeset viewer.