Changeset 4550 for branches/1.3/gui/scripts
- Timestamp:
- Jul 17, 2014, 8:12:29 PM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 4121,4163
- Property svn:mergeinfo changed
-
branches/1.3/gui/scripts/flowvisviewer.tcl
r4548 r4550 1847 1847 itcl::configbody Rappture::FlowvisViewer::plotbackground { 1848 1848 if { [isconnected] } { 1849 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break 1850 #fix this! 1851 #SendCmd "color background $r $g $b" 1849 set color $itk_option(-plotbackground) 1850 set rgb [Color2RGB $color] 1851 SendCmd "screen bgcolor $rgb" 1852 $itk_component(legend) configure -background $color 1852 1853 } 1853 1854 } … … 1858 1859 itcl::configbody Rappture::FlowvisViewer::plotforeground { 1859 1860 if { [isconnected] } { 1860 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break 1861 #fix this! 1862 #SendCmd "color background $r $g $b" 1861 set color $itk_option(-plotforeground) 1862 set rgb [Color2RGB $color] 1863 SendCmd "volume outline color $rgb" 1864 SendCmd "grid axiscolor $rgb" 1865 SendCmd "grid linecolor $rgb" 1866 $itk_component(legend) itemconfigure labels -fill $color 1867 $itk_component(legend) itemconfigure limits -fill $color 1863 1868 } 1864 1869 } -
branches/1.3/gui/scripts/nanovisviewer.tcl
r4531 r4550 222 222 array set _settings { 223 223 -axesvisible 1 224 -background black 224 225 -colormap default 225 226 -cutplanesvisible 0 … … 1236 1237 } 1237 1238 } 1239 "-background" { 1240 set bgcolor [$itk_component(background) value] 1241 array set fgcolors { 1242 "black" "white" 1243 "white" "black" 1244 "grey" "black" 1245 } 1246 configure -plotbackground $bgcolor \ 1247 -plotforeground $fgcolors($bgcolor) 1248 DrawLegend $_current 1249 } 1238 1250 "-gridvisible" { 1239 1251 SendCmd "grid visible $_settings($what)" … … 1449 1461 itcl::configbody Rappture::NanovisViewer::plotbackground { 1450 1462 if { [isconnected] } { 1451 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break 1452 #fix this! 1453 #SendCmd "color background $r $g $b" 1463 set color $itk_option(-plotbackground) 1464 set rgb [Color2RGB $color] 1465 SendCmd "screen bgcolor $rgb" 1466 $itk_component(legend) configure -background $color 1454 1467 } 1455 1468 } … … 1460 1473 itcl::configbody Rappture::NanovisViewer::plotforeground { 1461 1474 if { [isconnected] } { 1462 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break 1463 #fix this! 1464 #SendCmd "color background $r $g $b" 1475 set color $itk_option(-plotforeground) 1476 set rgb [Color2RGB $color] 1477 SendCmd "volume outline color $rgb" 1478 SendCmd "grid axiscolor $rgb" 1479 SendCmd "grid linecolor $rgb" 1480 $itk_component(legend) itemconfigure labels -fill $color 1481 $itk_component(legend) itemconfigure limits -fill $color 1465 1482 } 1466 1483 } … … 1621 1638 -font "Arial 9" 1622 1639 1640 label $inner.background_l -text "Background" -font "Arial 9" 1641 itk_component add background { 1642 Rappture::Combobox $inner.background -width 10 -editable no 1643 } 1644 $inner.background choices insert end \ 1645 "black" "black" \ 1646 "white" "white" \ 1647 "grey" "grey" 1648 1649 $itk_component(background) value $_settings(background) 1650 bind $inner.background <<Value>> [itcl::code $this AdjustSetting background] 1651 1623 1652 blt::table $inner \ 1624 1653 0,0 $inner.axes -cspan 2 -anchor w \ … … 1626 1655 2,0 $inner.outline -cspan 2 -anchor w \ 1627 1656 3,0 $inner.volume -cspan 2 -anchor w \ 1628 4,0 $inner.legend -cspan 2 -anchor w 1657 4,0 $inner.legend -cspan 2 -anchor w \ 1658 5,0 $inner.background_l -anchor e -pady 2 \ 1659 5,1 $inner.background -fill x \ 1629 1660 1630 1661 if 0 { … … 1632 1663 } 1633 1664 blt::table configure $inner r* -resize none 1634 blt::table configure $inner r 5-resize expand1665 blt::table configure $inner r6 -resize expand 1635 1666 } 1636 1667 -
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r4474 r4550 84 84 private method BuildCutplaneTab {} 85 85 private method BuildDownloadPopup { widget command } 86 private method BuildViewTab {} 86 87 private method BuildVolumeTab {} 87 88 private method DrawLegend {} … … 212 213 axesVisible 1 213 214 axisLabels 1 215 background black 214 216 cutplaneEdges 0 215 217 cutplane-xvisible 1 … … 328 330 329 331 if { [catch { 332 BuildViewTab 330 333 BuildVolumeTab 331 334 BuildCutplaneTab … … 918 921 } 919 922 DoRotate 920 InitSettings axis-xgrid axis-ygrid axis-zgrid axisFlyMode \923 InitSettings background axis-xgrid axis-ygrid axis-zgrid axisFlyMode \ 921 924 axesVisible axisLabels 922 925 PanCamera … … 1259 1262 } 1260 1263 switch -- $what { 1264 "background" { 1265 set bgcolor [$itk_component(background) value] 1266 array set fgcolors { 1267 "black" "white" 1268 "white" "black" 1269 "grey" "black" 1270 } 1271 configure -plotbackground $bgcolor \ 1272 -plotforeground $fgcolors($bgcolor) 1273 $itk_component(view) delete "legend" 1274 DrawLegend 1275 } 1261 1276 "volumeVisible" { 1262 1277 set bool $_settings($what) … … 1513 1528 itcl::configbody Rappture::VtkVolumeViewer::plotbackground { 1514 1529 if { [isconnected] } { 1515 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break 1516 SendCmd "screen bgcolor $r $g $b" 1530 set color $itk_option(-plotbackground) 1531 set rgb [Color2RGB $color] 1532 SendCmd "screen bgcolor $rgb" 1533 $itk_component(legend) configure -background $color 1517 1534 } 1518 1535 } … … 1523 1540 itcl::configbody Rappture::VtkVolumeViewer::plotforeground { 1524 1541 if { [isconnected] } { 1525 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break 1526 #fix this! 1527 #SendCmd "color background $r $g $b" 1528 } 1542 set color $itk_option(-plotforeground) 1543 set rgb [Color2RGB $color] 1544 SendCmd "axis color all $rgb" 1545 SendCmd "outline color $rgb" 1546 SendCmd "cutplane color $rgb" 1547 $itk_component(legend) itemconfigure labels -fill $color 1548 $itk_component(legend) itemconfigure limits -fill $color 1549 } 1550 } 1551 1552 itcl::body Rappture::VtkVolumeViewer::BuildViewTab {} { 1553 foreach { key value } { 1554 grid 0 1555 axes 1 1556 outline 0 1557 volume 1 1558 legend 1 1559 particles 1 1560 lic 1 1561 } { 1562 set _settings($this-$key) $value 1563 } 1564 1565 set fg [option get $itk_component(hull) font Font] 1566 #set bfg [option get $itk_component(hull) boldFont Font] 1567 1568 set inner [$itk_component(main) insert end \ 1569 -title "View Settings" \ 1570 -icon [Rappture::icon wrench]] 1571 $inner configure -borderwidth 4 1572 1573 checkbutton $inner.axes \ 1574 -text "Axes" \ 1575 -variable [itcl::scope _settings(axesVisible)] \ 1576 -command [itcl::code $this AdjustSetting axesVisible] \ 1577 -font "Arial 9" 1578 1579 checkbutton $inner.outline \ 1580 -text "Outline" \ 1581 -variable [itcl::scope _settings(outline)] \ 1582 -command [itcl::code $this AdjustSetting outline] \ 1583 -font "Arial 9" 1584 1585 checkbutton $inner.legend \ 1586 -text "Legend" \ 1587 -variable [itcl::scope _settings(legendVisible)] \ 1588 -command [itcl::code $this AdjustSetting legendVisible] \ 1589 -font "Arial 9" 1590 1591 checkbutton $inner.volume \ 1592 -text "Volume" \ 1593 -variable [itcl::scope _settings(volumeVisible)] \ 1594 -command [itcl::code $this AdjustSetting volumeVisible] \ 1595 -font "Arial 9" 1596 1597 label $inner.background_l -text "Background" -font "Arial 9" 1598 itk_component add background { 1599 Rappture::Combobox $inner.background -width 10 -editable no 1600 } 1601 $inner.background choices insert end \ 1602 "black" "black" \ 1603 "white" "white" \ 1604 "grey" "grey" 1605 1606 $itk_component(background) value $_settings(background) 1607 bind $inner.background <<Value>> [itcl::code $this AdjustSetting background] 1608 1609 blt::table $inner \ 1610 0,0 $inner.axes -cspan 2 -anchor w \ 1611 1,0 $inner.outline -cspan 2 -anchor w \ 1612 2,0 $inner.volume -cspan 2 -anchor w \ 1613 3,0 $inner.legend -cspan 2 -anchor w \ 1614 4,0 $inner.background_l -anchor e -pady 2 \ 1615 4,1 $inner.background -fill x \ 1616 1617 blt::table configure $inner r* -resize none 1618 blt::table configure $inner r5 -resize expand 1529 1619 } 1530 1620
Note: See TracChangeset
for help on using the changeset viewer.