Changeset 5292


Ignore:
Timestamp:
Apr 23, 2015, 4:45:49 PM (5 years ago)
Author:
ldelgass
Message:

remove unused methods in nanovis viewer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/nanovisviewer.tcl

    r5290 r5292  
    100100    private method GetColormap { cname color }
    101101    private method GetDatasetsWithComponent { cname }
    102     private method GetVolumeInfo { w }
    103102    private method HideAllMarkers {}
    104103    private method InitComponentSettings { cname }
     
    125124    private method SlicerTip {axis}
    126125    private method SwitchComponent { cname }
    127     private method ToggleVolume { tag name }
    128126    private method ViewToQuaternion {} {
    129127        return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)]
     
    132130
    133131    private variable _arcball ""
    134 
    135132    private variable _dlist ""         ;# list of data objects
    136133    private variable _obj2ovride       ;# maps dataobj => style override
     
    148145    private variable _first ""         ;# This is the topmost volume.
    149146    private variable _current ""       ;# Currently selected component
    150     private variable _volcomponents    ;# Array of components found
    151     private variable _componentsList   ;# Array of components found
     147    private variable _volcomponents    ;# Maps component name to list of
     148                                       ;# dataobj-component tags
     149    private variable _componentsList   ;# List of components found
    152150    private variable _cname2transferFunction
    153151    private variable _cname2defaultcolormap
    154 
    155     common _downloadPopup              ;# download options from popup
    156     private common _hardcopy
    157152    private variable _width 0
    158153    private variable _height 0
    159154    private variable _resizePending 0
    160155    private variable _resizeLegendPending 0
     156
     157    common _downloadPopup              ;# download options from popup
     158    private common _hardcopy
    161159}
    162160
     
    480478            # put the dataobj list in order according to -raise options
    481479            set dlist $_dlist
    482             foreach obj $dlist {
    483                 if {[info exists _obj2ovride($obj-raise)] &&
    484                     $_obj2ovride($obj-raise)} {
    485                     set i [lsearch -exact $dlist $obj]
     480            foreach dataobj $dlist {
     481                if {[info exists _obj2ovride($dataobj-raise)] &&
     482                    $_obj2ovride($dataobj-raise)} {
     483                    set i [lsearch -exact $dlist $dataobj]
    486484                    if {$i >= 0} {
    487485                        set dlist [lreplace $dlist $i $i]
    488                         lappend dlist $obj
     486                        lappend dlist $dataobj
    489487                    }
    490488                }
     
    811809
    812810#
    813 #
    814811# ReceiveLegend --
    815812#
     
    819816#       representing the legend in the canvas.  In addition, the
    820817#       active transfer function is displayed.
    821 #
    822818#
    823819itcl::body Rappture::NanovisViewer::ReceiveLegend { cname vmin vmax size } {
     
    10981094}
    10991095
    1100 
    11011096# ----------------------------------------------------------------------
    11021097# USAGE: Rotate click <x> <y>
     
    16601655
    16611656    blt::table $inner \
    1662         0,0 $inner.axes  -cspan 2 -anchor w \
    1663         1,0 $inner.grid  -cspan 2 -anchor w \
    1664         2,0 $inner.outline  -cspan 2 -anchor w \
    1665         3,0 $inner.volume  -cspan 2 -anchor w \
    1666         4,0 $inner.legend  -cspan 2 -anchor w \
    1667         5,0 $inner.background_l       -anchor e -pady 2 \
    1668         5,1 $inner.background                   -fill x \
    1669 
    1670     if 0 {
    1671     bind $inner <Map> [itcl::code $this GetVolumeInfo $inner]
    1672     }
     1657        0,0 $inner.axes -cspan 2 -anchor w \
     1658        1,0 $inner.grid -cspan 2 -anchor w \
     1659        2,0 $inner.outline -cspan 2 -anchor w \
     1660        3,0 $inner.volume -cspan 2 -anchor w \
     1661        4,0 $inner.legend -cspan 2 -anchor w \
     1662        5,0 $inner.background_l -anchor e -pady 2 \
     1663        5,1 $inner.background -fill x
     1664
    16731665    blt::table configure $inner r* -resize none
    16741666    blt::table configure $inner r6 -resize expand
     
    19801972}
    19811973
    1982 
    19831974itcl::body Rappture::NanovisViewer::DoResize {} {
    19841975    $_arcball resize $_width $_height
     
    20392030}
    20402031
    2041 itcl::body Rappture::NanovisViewer::GetVolumeInfo { w } {
    2042     set flowobj ""
    2043     foreach key [array names _obj2flow] {
    2044         set flowobj $_obj2flow($key)
    2045         break
    2046     }
    2047     if { $flowobj == "" } {
    2048         return
    2049     }
    2050     if { [winfo exists $w.frame] } {
    2051         destroy $w.frame
    2052     }
    2053     set inner [frame $w.frame]
    2054     blt::table $w \
    2055         5,0 $inner -fill both -cspan 2 -anchor nw
    2056     array set hints [$dataobj hints]
    2057 
    2058     label $inner.volumes -text "Volumes" -font "Arial 9 bold"
    2059     blt::table $inner \
    2060         1,0 $inner.volumes  -anchor w \
    2061     blt::table configure $inner c0 c1 -resize none
    2062     blt::table configure $inner c2 -resize expand
    2063 
    2064     set row 3
    2065     set volumes [get]
    2066     if { [llength $volumes] > 0 } {
    2067         blt::table $inner $row,0 $inner.volumes  -anchor w
    2068         incr row
    2069     }
    2070     foreach vol $volumes {
    2071         array unset info
    2072         array set info $vol
    2073         set name $info(name)
    2074         if { ![info exists _settings(-volumevisible-$name)] } {
    2075             set _settings(-volumevisible-$name) $info(hide)
    2076         }
    2077         checkbutton $inner.vol$row -text $info(label) \
    2078             -variable [itcl::scope _settings(-volumevisible-$name)] \
    2079             -onvalue 0 -offvalue 1 \
    2080             -command [itcl::code $this ToggleVolume $key $name] \
    2081             -font "Arial 9"
    2082         Rappture::Tooltip::for $inner.vol$row $info(description)
    2083         blt::table $inner $row,0 $inner.vol$row -anchor w
    2084         if { !$_settings(-volume-$name) } {
    2085             $inner.vol$row select
    2086         }
    2087         incr row
    2088     }
    2089     blt::table configure $inner r* -resize none
    2090     blt::table configure $inner r$row -resize expand
    2091     blt::table configure $inner c3 -resize expand
    2092     event generate [winfo parent [winfo parent $w]] <Configure>
    2093 }
    2094 
    2095 itcl::body Rappture::NanovisViewer::ToggleVolume { tag name } {
    2096     set bool $_settings(-volumevisible-$name)
    2097     SendCmd "volume state $bool $name"
    2098 }
    2099 
    21002032itcl::body Rappture::NanovisViewer::SetOrientation { side } {
    21012033    array set positions {
     
    21212053    set _settings(-zoom) $_view(-zoom)
    21222054}
    2123 
    21242055
    21252056#
Note: See TracChangeset for help on using the changeset viewer.