Changeset 4437


Ignore:
Timestamp:
Jun 25, 2014 7:10:58 PM (10 years ago)
Author:
ldelgass
Message:

Sync with 1.3 branch settings changes

File:
1 edited

Legend:

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

    r4381 r4437  
    216216
    217217    array set _settings {
    218         axisFlymode             "static"
    219         axisMinorTicks          1
    220         stretchToFit            0
    221         axisLabels              1
    222         axisVisible             1
    223         axisXGrid               0
    224         axisYGrid               0
    225         axisZGrid               0
    226         colormapVisible         1
    227         colormapDiscrete        0
    228         edges                   0
    229         field                   "Default"
    230         heightmapScale          50
    231         isHeightmap             0
    232         isolineColor            black
    233         isolinesVisible         1
    234         legendVisible           1
    235         lighting                1
    236         saveLighting            1
    237         numIsolines             10
    238         opacity                 100
    239         outline                 0
    240         wireframe               0
    241         saveOpacity             100
    242         saveOutline             0
     218        -axisflymode            "static"
     219        -axislabels             1
     220        -axisminorticks         1
     221        -axisvisible            1
     222        -colormap               BCGYR
     223        -colormapdiscrete       0
     224        -colormapvisible        1
     225        -edges                  0
     226        -field                  "Default"
     227        -heightmapscale         50
     228        -isheightmap            0
     229        -isolinecolor           black
     230        -isolinesvisible        1
     231        -legendvisible          1
     232        -lighting               1
     233        -numisolines            10
     234        -opacity                100
     235        -outline                0
     236        -savelighting           1
     237        -saveopacity            100
     238        -saveoutline            0
     239        -stretchtofit           0
     240        -wireframe              0
     241        -xgrid                  0
     242        -ygrid                  0
     243        -zgrid                  0
    243244    }
    244245    array set _changed {
    245         opacity                 0
    246         colormap                0
    247         numIsolines             0
     246        -colormap               0
     247        -numisolines            0
     248        -opacity                0
    248249    }
    249250    itk_component add view {
     
    324325            -onimage [Rappture::icon surface] \
    325326            -offimage [Rappture::icon surface] \
    326             -variable [itcl::scope _settings(isHeightmap)] \
    327             -command [itcl::code $this AdjustSetting isHeightmap] \
     327            -variable [itcl::scope _settings(-isheightmap)] \
     328            -command [itcl::code $this AdjustSetting -isheightmap] \
    328329    }
    329330    Rappture::Tooltip::for $itk_component(mode) \
     
    335336            -onimage [Rappture::icon stretchtofit] \
    336337            -offimage [Rappture::icon stretchtofit] \
    337             -variable [itcl::scope _settings(stretchToFit)] \
    338             -command [itcl::code $this AdjustSetting stretchToFit] \
     338            -variable [itcl::scope _settings(-stretchtofit)] \
     339            -command [itcl::code $this AdjustSetting -stretchtofit] \
    339340    }
    340341    Rappture::Tooltip::for $itk_component(stretchtofit) \
     
    665666    }
    666667    if { [array size found] > 1 } {
    667         set _settings(stretchToFit) 1
     668        set _settings(-stretchtofit) 1
    668669    } else {
    669670        # Check if the range of the x and y axes requires that we stretch
     
    674675        if { (($xmax - $xmin) > (($ymax -$ymin) * $_maxScale)) ||
    675676             ((($xmax - $xmin) * $_maxScale) < ($ymax -$ymin)) } {
    676             set _settings(stretchToFit) 1
     677            set _settings(-stretchtofit) 1
    677678        }
    678679    }
     
    923924        $_arcball resize $w $h
    924925        DoResize
    925         if { $_settings(stretchToFit) } {
    926             AdjustSetting stretchToFit
     926        if { $_settings(-stretchtofit) } {
     927            AdjustSetting -stretchtofit
    927928        }
    928929    }
     
    931932        # Reset the camera and other view parameters
    932933        #
    933         InitSettings isHeightmap background
     934        InitSettings -isheightmap -background
    934935
    935936        # Let's see how this goes.  I think it's preferable to overloading the
     
    940941        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    941942        $_arcball quaternion $q
    942         if {$_settings(isHeightmap) } {
     943        if {$_settings(-isheightmap) } {
    943944            if { $_view(ortho)} {
    944945                SendCmd "camera mode ortho"
     
    10321033        $itk_component(field) value $_curFldLabel
    10331034    }
    1034     InitSettings stretchToFit outline
     1035    InitSettings -stretchtofit -outline
    10351036
    10361037    if { $_reset } {
     
    10761077        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    10771078        $_arcball quaternion $q
    1078         if {$_settings(isHeightmap) } {
     1079        if {$_settings(-isheightmap) } {
    10791080            if { $_view(ortho)} {
    10801081                SendCmd "camera mode ortho"
     
    10861087        }
    10871088        PanCamera
    1088         InitSettings axisXGrid axisYGrid axisZGrid \
    1089             axisVisible axisLabels heightmapScale field isHeightmap \
    1090             numIsolines
     1089        InitSettings -xgrid -ygrid -zgrid \
     1090            -axisvisible -axislabels -heightmapscale -field -isheightmap \
     1091            -numisolines
    10911092        if { [array size _fields] < 2 } {
    10921093            blt::table forget $itk_component(field) $itk_component(field_l)
     
    11681169    set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    11691170    $_arcball quaternion $q
    1170     if {$_settings(isHeightmap) } {
     1171    if {$_settings(-isheightmap) } {
    11711172        DoRotate
    11721173    }
     
    13291330itcl::body Rappture::VtkHeightmapViewer::InitSettings { args } {
    13301331    foreach spec $args {
    1331         if { [info exists _settings($_first-$spec)] } {
     1332        if { [info exists _settings($_first${spec})] } {
    13321333            # Reset global setting with dataobj specific setting
    1333             set _settings($spec) $_settings($_first-$spec)
     1334            set _settings($spec) $_settings($_first${spec})
    13341335        }
    13351336        AdjustSetting $spec
     
    13491350    }
    13501351    switch -- $what {
    1351         "axisFlymode" {
     1352        "-axisflymode" {
    13521353            set mode [$itk_component(axisflymode) value]
    13531354            set mode [$itk_component(axisflymode) translate $mode]
     
    13551356            SendCmd "axis flymode $mode"
    13561357        }
    1357         "axisLabels" {
     1358        "-axislabels" {
    13581359            set bool $_settings($what)
    13591360            SendCmd "axis labels all $bool"
    13601361        }
    1361         "axisMinorTicks" {
     1362        "-axisminorticks" {
    13621363            set bool $_settings($what)
    13631364            foreach axis { x y z } {
     
    13651366            }
    13661367        }
    1367         "axisVisible" {
     1368        "-axisvisible" {
    13681369            set bool $_settings($what)
    13691370            SendCmd "axis visible all $bool"
    13701371        }
    1371         "axisXGrid" - "axisYGrid" - "axisZGrid" {
    1372             set axis [string tolower [string range $what 4 4]]
     1372        "-xgrid" - "-ygrid" - "-zgrid" {
     1373            set axis [string tolower [string range $what 1 1]]
    13731374            set bool $_settings($what)
    13741375            SendCmd "axis grid $axis $bool"
    13751376        }
    1376         "background" {
     1377        "-background" {
    13771378            set bg [$itk_component(background) value]
    13781379            array set fgcolors {
     
    13891390            DrawLegend
    13901391        }
    1391         "colormap" {
     1392        "-colormap" {
    13921393            set _changed($what) 1
    13931394            StartBufferingCommands
     
    13951396            set _settings($what) $color
    13961397            if { $color == "none" } {
    1397                 if { $_settings(colormapVisible) } {
     1398                if { $_settings(-colormapvisible) } {
    13981399                    SendCmd "heightmap surface 0"
    1399                     set _settings(colormapVisible) 0
     1400                    set _settings(-colormapvisible) 0
    14001401                }
    14011402            } else {
    1402                 if { !$_settings(colormapVisible) } {
     1403                if { !$_settings(-colormapvisible) } {
    14031404                    SendCmd "heightmap surface 1"
    1404                     set _settings(colormapVisible) 1
     1405                    set _settings(-colormapvisible) 1
    14051406                }
    14061407                SetCurrentColormap $color
    1407                 if {$_settings(colormapDiscrete)} {
    1408                     set numColors [expr $_settings(numIsolines) + 1]
     1408                if {$_settings(-colormapdiscrete)} {
     1409                    set numColors [expr $_settings(-numisolines) + 1]
    14091410                    SendCmd "colormap res $numColors $color"
    14101411                }
     
    14131414            EventuallyRequestLegend
    14141415        }
    1415         "colormapVisible" {
     1416        "-colormapvisible" {
    14161417            set bool $_settings($what)
    14171418            SendCmd "heightmap surface $bool"
    14181419        }
    1419         "colormapDiscrete" {
     1420        "-colormapdiscrete" {
    14201421            set bool $_settings($what)
    1421             set numColors [expr $_settings(numIsolines) + 1]
     1422            set numColors [expr $_settings(-numisolines) + 1]
    14221423            StartBufferingCommands
    14231424            if {$bool} {
     
    14331434            EventuallyRequestLegend
    14341435        }
    1435         "edges" {
     1436        "-edges" {
    14361437            set bool $_settings($what)
    14371438            SendCmd "heightmap edges $bool"
    14381439        }
    1439         "field" {
     1440        "-field" {
    14401441            set label [$itk_component(field) value]
    14411442            set fname [$itk_component(field) translate $label]
     
    14821483            DrawLegend
    14831484        }
    1484         "heightmapScale" {
    1485             if { $_settings(isHeightmap) } {
     1485        "-heightmapscale" {
     1486            if { $_settings(-isheightmap) } {
    14861487                set scale [GetHeightmapScale]
    14871488                # Have to set the datasets individually because we are
     
    14941495            }
    14951496        }
    1496         "isHeightmap" {
     1497        "-isheightmap" {
    14971498            set bool $_settings($what)
    14981499            set c $itk_component(view)
     
    15001501            # Fix heightmap scale: 0 for contours, 1 for heightmaps.
    15011502            if { $bool } {
    1502                 set _settings(heightmapScale) 50
    1503                 set _settings(opacity) $_settings(saveOpacity)
    1504                 set _settings(lighting) $_settings(saveLighting)
    1505                 set _settings(outline) 0
     1503                set _settings(-heightmapscale) 50
     1504                set _settings(-opacity) $_settings(-saveopacity)
     1505                set _settings(-lighting) $_settings(-savelighting)
     1506                set _settings(-outline) 0
    15061507            } else {
    1507                 set _settings(heightmapScale) 0
    1508                 set _settings(lighting) 0
    1509                 set _settings(opacity) 100
    1510                 set _settings(outline)  $_settings(saveOutline)
    1511             }
    1512             AdjustSetting lighting
    1513             AdjustSetting opacity
    1514             AdjustSetting outline
     1508                set _settings(-heightmapscale) 0
     1509                set _settings(-lighting) 0
     1510                set _settings(-opacity) 100
     1511                set _settings(-outline)  $_settings(-saveoutline)
     1512            }
     1513            InitSettings -lighting -opacity -outline
    15151514            set scale [GetHeightmapScale]
    15161515            # Have to set the datasets individually because we are
     
    15411540                SendCmd "camera mode image"
    15421541            }
    1543             if {$_settings(stretchToFit)} {
     1542            if {$_settings(-stretchtofit)} {
    15441543                if {$scale == 0} {
    15451544                    SendCmd "camera aspect window"
     
    15721571            StopBufferingCommands
    15731572        }
    1574         "isolineColor" {
     1573        "-isolinecolor" {
    15751574            set color [$itk_component(isolinecolor) value]
    15761575            if { $color == "none" } {
    1577                 if { $_settings(isolinesVisible) } {
     1576                if { $_settings(-isolinesvisible) } {
    15781577                    SendCmd "heightmap isolines 0"
    1579                     set _settings(isolinesVisible) 0
     1578                    set _settings(-isolinesvisible) 0
    15801579                }
    15811580            } else {
    1582                 if { !$_settings(isolinesVisible) } {
     1581                if { !$_settings(-isolinesvisible) } {
    15831582                    SendCmd "heightmap isolines 1"
    1584                     set _settings(isolinesVisible) 1
     1583                    set _settings(-isolinesvisible) 1
    15851584                }
    15861585                SendCmd "heightmap isolinecolor [Color2RGB $color]"
     
    15881587            DrawLegend
    15891588        }
    1590         "isolinesVisible" {
     1589        "-isolinesvisible" {
    15911590            set bool $_settings($what)
    15921591            SendCmd "heightmap isolines $bool"
    15931592            DrawLegend
    15941593        }
    1595         "legendVisible" {
     1594        "-legendvisible" {
    15961595            if { !$_settings($what) } {
    15971596                $itk_component(view) delete legend
     
    15991598            DrawLegend
    16001599        }
    1601         "lighting" {
    1602             if { $_settings(isHeightmap) } {
    1603                 set _settings(saveLighting) $_settings($what)
     1600        "-lighting" {
     1601            if { $_settings(-isheightmap) } {
     1602                set _settings(-savelighting) $_settings($what)
    16041603                set bool $_settings($what)
    16051604                SendCmd "heightmap lighting $bool"
     
    16081607            }
    16091608        }
    1610         "numIsolines" {
     1609        "-numisolines" {
    16111610            set _settings($what) [$itk_component(numisolines) value]
    16121611            set _currentNumIsolines $_settings($what)
     
    16141613            set _changed($what) 1
    16151614            SendCmd "heightmap contourlist [list $_contourList]"
    1616             if {$_settings(colormapDiscrete)} {
     1615            if {$_settings(-colormapdiscrete)} {
    16171616                set numColors [expr $_settings($what) + 1]
    16181617                SendCmd "colormap res $numColors"
     
    16221621            }
    16231622        }
    1624         "opacity" {
     1623        "-opacity" {
    16251624            set _changed($what) 1
    1626             if { $_settings(isHeightmap) } {
    1627                 set _settings(saveOpacity) $_settings($what)
    1628                 set val $_settings($what)
    1629                 set sval [expr { 0.01 * double($val) }]
    1630                 SendCmd "heightmap opacity $sval"
     1625            set val [expr $_settings($what) * 0.01]
     1626            if { $_settings(-isheightmap) } {
     1627                set _settings(-saveopacity) $_settings($what)
     1628                SendCmd "heightmap opacity $val"
    16311629            } else {
    1632                 SendCmd "heightmap opacity 1"
    1633             }
    1634         }
    1635         "outline" {
    1636             if { $_settings(isHeightmap) } {
     1630                SendCmd "heightmap opacity 1.0"
     1631            }
     1632        }
     1633        "-outline" {
     1634            if { $_settings(-isheightmap) } {
    16371635                SendCmd "outline visible 0"
    16381636            } else {
    1639                 set _settings(saveOutline) $_settings($what)
     1637                set _settings(-saveoutline) $_settings($what)
    16401638                set bool $_settings($what)
    16411639                SendCmd "outline visible $bool"
    16421640            }
    16431641        }
    1644         "stretchToFit" {
     1642        "-stretchtofit" {
    16451643            set bool $_settings($what)
    16461644            if { $bool } {
     
    16561654            Zoom reset
    16571655        }
    1658         "wireframe" {
     1656        "-wireframe" {
    16591657            set bool $_settings($what)
    16601658            SendCmd "heightmap wireframe $bool"
     
    17921790    switch -- $itk_option(-mode) {
    17931791        "heightmap" {
    1794             set _settings(isHeightmap) 1
     1792            set _settings(-isheightmap) 1
    17951793        }
    17961794        "contour" {
    1797             set _settings(isHeightmap) 0
     1795            set _settings(-isheightmap) 0
    17981796        }
    17991797        default {
     
    18021800    }
    18031801    if { !$_reset } {
    1804         AdjustSetting isHeightmap
     1802        AdjustSetting -isheightmap
    18051803    }
    18061804}
     
    18541852    checkbutton $inner.legend \
    18551853        -text "Legend" \
    1856         -variable [itcl::scope _settings(legendVisible)] \
    1857         -command [itcl::code $this AdjustSetting legendVisible] \
     1854        -variable [itcl::scope _settings(-legendvisible)] \
     1855        -command [itcl::code $this AdjustSetting -legendvisible] \
    18581856        -font "Arial 9"
    18591857
    18601858    checkbutton $inner.wireframe \
    18611859        -text "Wireframe" \
    1862         -variable [itcl::scope _settings(wireframe)] \
    1863         -command [itcl::code $this AdjustSetting wireframe] \
     1860        -variable [itcl::scope _settings(-wireframe)] \
     1861        -command [itcl::code $this AdjustSetting -wireframe] \
    18641862        -font "Arial 9"
    18651863
     
    18671865        checkbutton $inner.lighting \
    18681866            -text "Enable Lighting" \
    1869             -variable [itcl::scope _settings(lighting)] \
    1870             -command [itcl::code $this AdjustSetting lighting] \
     1867            -variable [itcl::scope _settings(-lighting)] \
     1868            -command [itcl::code $this AdjustSetting -lighting] \
    18711869            -font "Arial 9"
    18721870    } {
     
    18751873    checkbutton $inner.edges \
    18761874        -text "Edges" \
    1877         -variable [itcl::scope _settings(edges)] \
    1878         -command [itcl::code $this AdjustSetting edges] \
     1875        -variable [itcl::scope _settings(-edges)] \
     1876        -command [itcl::code $this AdjustSetting -edges] \
    18791877        -font "Arial 9"
    18801878
     
    18821880        checkbutton $inner.outline \
    18831881            -text "Outline" \
    1884             -variable [itcl::scope _settings(outline)] \
    1885             -command [itcl::code $this AdjustSetting outline] \
     1882            -variable [itcl::scope _settings(-outline)] \
     1883            -command [itcl::code $this AdjustSetting -outline] \
    18861884            -font "Arial 9"
    18871885    } {
     
    18901888    checkbutton $inner.stretch \
    18911889        -text "Stretch to fit" \
    1892         -variable [itcl::scope _settings(stretchToFit)] \
    1893         -command [itcl::code $this AdjustSetting stretchToFit] \
     1890        -variable [itcl::scope _settings(-stretchtofit)] \
     1891        -command [itcl::code $this AdjustSetting -stretchtofit] \
    18941892        -font "Arial 9"
    18951893
    18961894    checkbutton $inner.isolines \
    18971895        -text "Isolines" \
    1898         -variable [itcl::scope _settings(isolinesVisible)] \
    1899         -command [itcl::code $this AdjustSetting isolinesVisible] \
     1896        -variable [itcl::scope _settings(-isolinesvisible)] \
     1897        -command [itcl::code $this AdjustSetting -isolinesvisible] \
    19001898        -font "Arial 9"
    19011899
    19021900    checkbutton $inner.colormapDiscrete \
    19031901        -text "Discrete Colormap" \
    1904         -variable [itcl::scope _settings(colormapDiscrete)] \
    1905         -command [itcl::code $this AdjustSetting colormapDiscrete] \
     1902        -variable [itcl::scope _settings(-colormapdiscrete)] \
     1903        -command [itcl::code $this AdjustSetting -colormapdiscrete] \
    19061904        -font "Arial 9"
    19071905
     
    19151913    }
    19161914    bind $inner.field <<Value>> \
    1917         [itcl::code $this AdjustSetting field]
     1915        [itcl::code $this AdjustSetting -field]
    19181916
    19191917    label $inner.colormap_l -text "Colormap" -font "Arial 9"
     
    19221920    }
    19231921    $inner.colormap choices insert end [GetColormapList -includeNone]
    1924     $itk_component(colormap) value "BCGYR"
     1922    $itk_component(colormap) value $_settings(-colormap)
    19251923    bind $inner.colormap <<Value>> \
    1926         [itcl::code $this AdjustSetting colormap]
     1924        [itcl::code $this AdjustSetting -colormap]
    19271925
    19281926    label $inner.isolinecolor_l -text "Isolines Color" -font "Arial 9"
     
    19421940        "none"               "none"
    19431941
    1944     $itk_component(isolinecolor) value "black"
     1942    $itk_component(isolinecolor) value $_settings(-isolinecolor)
    19451943    bind $inner.isolinecolor <<Value>> \
    1946         [itcl::code $this AdjustSetting isolineColor]
     1944        [itcl::code $this AdjustSetting -isolinecolor]
    19471945
    19481946    label $inner.background_l -text "Background Color" -font "Arial 9"
     
    19561954
    19571955    $itk_component(background) value "white"
    1958     bind $inner.background <<Value>> [itcl::code $this AdjustSetting background]
     1956    bind $inner.background <<Value>> \
     1957        [itcl::code $this AdjustSetting -background]
    19591958
    19601959    itk_component add opacity_l {
     
    19651964    itk_component add opacity {
    19661965        ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1967             -variable [itcl::scope _settings(opacity)] \
     1966            -variable [itcl::scope _settings(-opacity)] \
    19681967            -showvalue off \
    1969             -command [itcl::code $this AdjustSetting opacity]
     1968            -command [itcl::code $this AdjustSetting -opacity]
    19701969    }
    19711970    itk_component add scale_l {
     
    19761975    itk_component add scale {
    19771976        ::scale $inner.scale -from 0 -to 100 -orient horizontal \
    1978             -variable [itcl::scope _settings(heightmapScale)] \
     1977            -variable [itcl::scope _settings(-heightmapscale)] \
    19791978            -showvalue off \
    1980             -command [itcl::code $this AdjustSetting heightmapScale]
     1979            -command [itcl::code $this AdjustSetting -heightmapscale]
    19811980    }
    19821981    label $inner.numisolines_l -text "Number of Isolines" -font "Arial 9"
     
    19851984            -min 0 -max 50 -font "arial 9"
    19861985    }
    1987     $itk_component(numisolines) value $_settings(numIsolines)
     1986    $itk_component(numisolines) value $_settings(-numisolines)
    19881987    bind $itk_component(numisolines) <<Value>> \
    1989         [itcl::code $this AdjustSetting numIsolines]
     1988        [itcl::code $this AdjustSetting -numisolines]
    19901989
    19911990    frame $inner.separator1 -height 2 -relief sunken -bd 1
     
    20342033    checkbutton $inner.visible \
    20352034        -text "Axes" \
    2036         -variable [itcl::scope _settings(axisVisible)] \
    2037         -command [itcl::code $this AdjustSetting axisVisible] \
     2035        -variable [itcl::scope _settings(-axisvisible)] \
     2036        -command [itcl::code $this AdjustSetting -axisvisible] \
    20382037        -font "Arial 9"
    20392038    checkbutton $inner.labels \
    20402039        -text "Axis Labels" \
    2041         -variable [itcl::scope _settings(axisLabels)] \
    2042         -command [itcl::code $this AdjustSetting axisLabels] \
     2040        -variable [itcl::scope _settings(-axislabels)] \
     2041        -command [itcl::code $this AdjustSetting -axislabels] \
    20432042        -font "Arial 9"
    20442043    label $inner.grid_l -text "Grid" -font "Arial 9"
    20452044    checkbutton $inner.xgrid \
    20462045        -text "X" \
    2047         -variable [itcl::scope _settings(axisXGrid)] \
    2048         -command [itcl::code $this AdjustSetting axisXGrid] \
     2046        -variable [itcl::scope _settings(-xgrid)] \
     2047        -command [itcl::code $this AdjustSetting -xgrid] \
    20492048        -font "Arial 9"
    20502049    checkbutton $inner.ygrid \
    20512050        -text "Y" \
    2052         -variable [itcl::scope _settings(axisYGrid)] \
    2053         -command [itcl::code $this AdjustSetting axisYGrid] \
     2051        -variable [itcl::scope _settings(-ygrid)] \
     2052        -command [itcl::code $this AdjustSetting -ygrid] \
    20542053        -font "Arial 9"
    20552054    checkbutton $inner.zgrid \
    20562055        -text "Z" \
    2057         -variable [itcl::scope _settings(axisZGrid)] \
    2058         -command [itcl::code $this AdjustSetting axisZGrid] \
     2056        -variable [itcl::scope _settings(-zgrid)] \
     2057        -command [itcl::code $this AdjustSetting -zgrid] \
    20592058        -font "Arial 9"
    20602059    checkbutton $inner.minorticks \
    20612060        -text "Minor Ticks" \
    2062         -variable [itcl::scope _settings(axisMinorTicks)] \
    2063         -command [itcl::code $this AdjustSetting axisMinorTicks] \
     2061        -variable [itcl::scope _settings(-axisminorticks)] \
     2062        -command [itcl::code $this AdjustSetting -axisminorticks] \
    20642063        -font "Arial 9"
    20652064
     
    20752074        "furthest_triad"  "farthest" \
    20762075        "outer_edges"     "outer"         
    2077     $itk_component(axisflymode) value "static"
    2078     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axisFlymode]
     2076    $itk_component(axisflymode) value $_settings(-axisflymode)
     2077    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axisflymode]
    20792078
    20802079    blt::table $inner \
     
    22772276    # the code to handle aberrant cases.
    22782277
    2279     if { $_changed(opacity) } {
    2280         set style(-opacity) [expr $_settings(opacity) * 0.01]
    2281     }
    2282     if { $_changed(numIsolines) } {
    2283         set style(-levels) $_settings(numIsolines)
    2284     }
    2285     if { $_changed(colormap) } {
    2286         set style(-color) $_settings(colormap)
     2278    if { $_changed(-opacity) } {
     2279        set style(-opacity) [expr $_settings(-opacity) * 0.01]
     2280    }
     2281    if { $_changed(-numisolines) } {
     2282        set style(-levels) $_settings(-numisolines)
     2283    }
     2284    if { $_changed(-colormap) } {
     2285        set style(-color) $_settings(-colormap)
    22872286    }
    22882287    if { $_currentColormap == "" } {
     
    22902289    }
    22912290    if { [info exists style(-stretchtofit)] } {
    2292         set _settings(stretchToFit) $style(-stretchtofit)
    2293         AdjustSetting stretchToFit
     2291        set _settings(-stretchtofit) $style(-stretchtofit)
     2292        AdjustSetting -stretchtofit
    22942293    }
    22952294    if { $_currentNumIsolines != $style(-levels) } {
    22962295        set _currentNumIsolines $style(-levels)
    2297         set _settings(numIsolines) $_currentNumIsolines
     2296        set _settings(-numisolines) $_currentNumIsolines
    22982297        $itk_component(numisolines) value $_currentNumIsolines
    22992298        UpdateContourList
     
    23022301    SendCmd "outline add $tag"
    23032302    SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
    2304     SendCmd "outline visible $_settings(outline) $tag"
     2303    SendCmd "outline visible $_settings(-outline) $tag"
    23052304    set scale [GetHeightmapScale]
    23062305    SendCmd "[list heightmap add contourlist $_contourList $scale $tag]"
    2307     set _comp2scale($tag) $_settings(heightmapScale)
    2308     SendCmd "heightmap edges $_settings(edges) $tag"
    2309     SendCmd "heightmap wireframe $_settings(wireframe) $tag"
    2310     SetCurrentColormap $style(-color) 
     2306    set _comp2scale($tag) $_settings(-heightmapscale)
     2307    SendCmd "heightmap edges $_settings(-edges) $tag"
     2308    SendCmd "heightmap wireframe $_settings(-wireframe) $tag"
     2309    SetCurrentColormap $style(-color)
    23112310    set color [$itk_component(isolinecolor) value]
    23122311    SendCmd "heightmap isolinecolor [Color2RGB $color] $tag"
    2313     SendCmd "heightmap lighting $_settings(isHeightmap) $tag"
    2314     SendCmd "heightmap isolines $_settings(isolinesVisible) $tag"
    2315     SendCmd "heightmap surface $_settings(colormapVisible) $tag"
     2312    SendCmd "heightmap lighting $_settings(-isheightmap) $tag"
     2313    SendCmd "heightmap isolines $_settings(-isolinesvisible) $tag"
     2314    SendCmd "heightmap surface $_settings(-colormapvisible) $tag"
    23162315    SendCmd "heightmap opacity $style(-opacity) $tag"
    2317     set _settings(opacity) [expr $style(-opacity) * 100.0]
     2316    set _settings(-opacity) [expr $style(-opacity) * 100.0]
    23182317}
    23192318
     
    23742373    }
    23752374    set x [expr $w - 2]
    2376     if { !$_settings(legendVisible) } {
     2375    if { !$_settings(-legendvisible) } {
    23772376        $c delete legend
    23782377        return
     
    23822381        # If there's a legend title, create a text item for the title.
    23832382        $c create text $x $y \
    2384             -anchor ne \
    2385             -fill $itk_option(-plotforeground) -tags "title legend" \
    2386             -font $font
     2383            -anchor ne \
     2384            -fill $itk_option(-plotforeground) -tags "title legend" \
     2385            -font $font
    23872386        if { $title != "" } {
    23882387            incr y $lineht
    23892388        }
    23902389        $c create text $x $y \
    2391             -anchor ne \
    2392             -fill $itk_option(-plotforeground) -tags "vmax legend" \
    2393             -font $font
    2394         incr y $lineht
     2390            -anchor ne \
     2391            -fill $itk_option(-plotforeground) -tags "vmax legend" \
     2392            -font $font
     2393        incr y $lineht
    23952394        $c create image $x $y \
    23962395            -anchor ne \
     
    24162415    array unset _isolines
    24172416    if { $color != "none"  && [info exists _limits($_curFldName)] &&
    2418          $_settings(isolinesVisible) && $_currentNumIsolines > 0 } {
     2417         $_settings(-isolinesvisible) && $_currentNumIsolines > 0 } {
    24192418
    24202419        foreach { vmin vmax } $_limits($_curFldName) break
     
    25832582        invoke {
    25842583            $itk_component(field) value $_curFldLabel
    2585             AdjustSetting field
     2584            AdjustSetting -field
    25862585        }
    25872586        default {
     
    25922591
    25932592itcl::body Rappture::VtkHeightmapViewer::GetHeightmapScale {} {
    2594     if {  $_settings(isHeightmap) } {
    2595         set val $_settings(heightmapScale)
     2593    if {  $_settings(-isheightmap) } {
     2594        set val $_settings(-heightmapscale)
    25962595        set sval [expr { $val >= 50 ? double($val)/50.0 : 1.0/(2.0-(double($val)/50.0)) }]
    25972596        return $sval
Note: See TracChangeset for help on using the changeset viewer.