Changeset 4708 for branches/1.3


Ignore:
Timestamp:
Nov 12, 2014, 7:23:44 PM (10 years ago)
Author:
ldelgass
Message:

Merge some cleanups and refactoring of glyph viewer from trunk to minimize
differences. Doesn't include glyph settings UI changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkglyphviewer.tcl

    r4706 r4708  
    143143    private variable _legendPending 0
    144144    private variable _field      ""
    145     private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
     145    private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
    146146    private variable _fieldNames {}
    147147    private variable _fields
     
    181181    $_dispatcher register !xcutplane
    182182    $_dispatcher dispatch $this !xcutplane \
    183         "[itcl::code $this AdjustSetting cutplaneXPosition]; list"
     183        "[itcl::code $this AdjustSetting -cutplanexposition]; list"
    184184
    185185    # Y-Cutplane event
    186186    $_dispatcher register !ycutplane
    187187    $_dispatcher dispatch $this !ycutplane \
    188         "[itcl::code $this AdjustSetting cutplaneYPosition]; list"
     188        "[itcl::code $this AdjustSetting -cutplaneyposition]; list"
    189189
    190190    # Z-Cutplane event
    191191    $_dispatcher register !zcutplane
    192192    $_dispatcher dispatch $this !zcutplane \
    193         "[itcl::code $this AdjustSetting cutplaneZPosition]; list"
     193        "[itcl::code $this AdjustSetting -cutplanezposition]; list"
    194194
    195195    #
     
    216216
    217217    array set _settings [subst {
    218         background              black
    219         colormap                BCGYR
    220         colormapVisible         1
    221         field                   "Default"
    222         axesVisible             1
    223         axisLabelsVisible       1
    224         axisXGrid               0
    225         axisYGrid               0
    226         axisZGrid               0
    227         cutplaneEdges           0
    228         cutplaneLighting        1
    229         cutplanePreinterp       1
    230         cutplaneOpacity         100
    231         cutplaneVisible         0
    232         cutplaneWireframe       0
    233         cutplaneXPosition       50
    234         cutplaneXVisible        1
    235         cutplaneYPosition       50
    236         cutplaneYVisible        1
    237         cutplaneZPosition       50
    238         cutplaneZVisible        1
    239         glyphEdges              0
    240         glyphLighting           1
    241         glyphOpacity            100
    242         saveGlyphOpacity        100
    243         glyphOutline            0
    244         glyphVisible            1
    245         glyphWireframe          0
    246         legendVisible           1
     218        -axesvisible            1
     219        -axislabels             1
     220        -axisminorticks         1
     221        -axismode               "static"
     222        -background             black
     223        -colormap               BCGYR
     224        -colormapvisible        1
     225        -cutplaneedges          0
     226        -cutplanelighting       1
     227        -cutplanepreinterp      1
     228        -cutplaneopacity        100
     229        -cutplanevisible        0
     230        -cutplanewireframe      0
     231        -cutplanexposition      50
     232        -cutplanexvisible       1
     233        -cutplaneyposition      50
     234        -cutplaneyvisible       1
     235        -cutplanezposition      50
     236        -cutplanezvisible       1
     237        -field                  "Default"
     238        -glyphedges             0
     239        -glyphlighting          1
     240        -glyphopacity           100
     241        -glyphoutline           0
     242        -glyphscale             1
     243        -glyphvisible           1
     244        -glyphwireframe         0
     245        -legendvisible          1
     246        -saveglyphopacity       100
     247        -xgrid                  0
     248        -ygrid                  0
     249        -zgrid                  0
    247250    }]
    248251    array set _changed {
    249         glyphOpacity            0
    250         colormap                0
     252        -colormap               0
     253        -glyphopacity           0
    251254    }
    252255
     
    328331            -onimage [Rappture::icon volume-on] \
    329332            -offimage [Rappture::icon volume-off] \
    330             -variable [itcl::scope _settings(glyphVisible)] \
    331             -command [itcl::code $this AdjustSetting glyphVisible]
     333            -variable [itcl::scope _settings(-glyphvisible)] \
     334            -command [itcl::code $this AdjustSetting -glyphvisible]
    332335    }
    333336    $itk_component(glyphs) select
     
    341344            -onimage [Rappture::icon cutbutton] \
    342345            -offimage [Rappture::icon cutbutton] \
    343             -variable [itcl::scope _settings(cutplaneVisible)] \
    344             -command [itcl::code $this AdjustSetting cutplaneVisible]
     346            -variable [itcl::scope _settings(-cutplanevisible)] \
     347            -command [itcl::code $this AdjustSetting -cutplanevisible]
    345348    }
    346349    Rappture::Tooltip::for $itk_component(cutplane) \
     
    539542}
    540543
    541 
    542544# ----------------------------------------------------------------------
    543545# USAGE: delete ?<dataobj1> <dataobj2> ...?
    544546#
    545 #       Clients use this to delete a dataobj from the plot.  If no dataobjs
    546 #       are specified, then all dataobjs are deleted.  No data objects are
    547 #       deleted.  They are only removed from the display list.
     547#    Clients use this to delete a dataobj from the plot.  If no dataobjs
     548#    are specified, then all dataobjs are deleted.  No data objects are
     549#    deleted.  They are only removed from the display list.
    548550#
    549551# ----------------------------------------------------------------------
     
    795797# isconnected --
    796798#
    797 #       Indicates if we are currently connected to the visualization server.
     799#    Indicates if we are currently connected to the visualization server.
    798800#
    799801itcl::body Rappture::VtkGlyphViewer::isconnected {} {
     
    812814# Disconnect --
    813815#
    814 #       Clients use this method to disconnect from the current rendering
    815 #       server.
     816#    Clients use this method to disconnect from the current rendering
     817#    server.
    816818#
    817819itcl::body Rappture::VtkGlyphViewer::Disconnect {} {
     
    951953        PanCamera
    952954        set _first ""
    953         InitSettings axisXGrid axisYGrid axisZGrid axisMode \
    954             axesVisible axisLabelsVisible
    955         foreach axis { x y z } {
    956             SendCmd "axis lformat $axis %g"
    957         }
     955        InitSettings -xgrid -ygrid -zgrid -axismode \
     956            -axesvisible -axislabels -axisminorticks
     957        #SendCmd "axis lformat all %g"
    958958        StopBufferingCommands
    959959        SendCmd "imgflush"
     
    971971            if { ![info exists _datasets($tag)] } {
    972972                set bytes [$dataobj vtkdata $comp]
    973                 if 0 {
    974                     set f [open "/tmp/glyph.vtk" "w"]
    975                     puts $f $bytes
    976                     close $f
     973                if 0 {
     974                    set f [open "/tmp/glyph.vtk" "w"]
     975                    puts $f $bytes
     976                    close $f
    977977                }
    978978                set length [string length $bytes]
     
    988988                    SendCmd "clientinfo [list $info]"
    989989                }
    990                 append _outbuf "dataset add $tag data follows $length\n"
     990                SendCmd "dataset add $tag data follows $length"
    991991                append _outbuf $bytes
    992992                set _datasets($tag) 1
     
    997997                # Setting dataset visible enables outline
    998998                # and glyphs
    999                 SendCmd "dataset visible 1 $tag"
     999                SendCmd "dataset visible 1 $tag"
    10001000            }
    10011001        }
     
    10031003
    10041004    if { $_first != "" } {
    1005         $itk_component(field) choices delete 0 end
    1006         $itk_component(fieldmenu) delete 0 end
    1007         array unset _fields
     1005        $itk_component(field) choices delete 0 end
     1006        $itk_component(fieldmenu) delete 0 end
     1007        array unset _fields
    10081008        set _curFldName ""
    10091009        foreach cname [$_first components] {
     
    10311031        $itk_component(field) value $_curFldLabel
    10321032    }
    1033     InitSettings glyphOutline
    1034         #cutplaneVisible
     1033    InitSettings -glyphoutline
     1034        #-cutplanevisible
    10351035    if { $_reset } {
    1036         # These are settings that rely on a dataset being loaded.
     1036        # These are settings that rely on a dataset being loaded.
    10371037        InitSettings \
    1038             glyphLighting \
    1039             field \
    1040             glyphEdges glyphLighting glyphOpacity \
    1041             glyphWireframe
    1042 
    1043         #cutplaneXPosition cutplaneYPosition cutplaneZPosition \
    1044             cutplaneXVisible cutplaneYVisible cutplaneZVisible \
    1045             cutplanePreinterp
     1038            -glyphlighting \
     1039            -field \
     1040            -glyphedges -glyphlighting -glyphopacity \
     1041            -glyphwireframe
     1042
     1043        #-cutplanexposition -cutplaneyposition -cutplanezposition \
     1044            -cutplanexvisible -cutplaneyvisible -cutplanezvisible \
     1045            -cutplanepreinterp
    10461046
    10471047        Zoom reset
    1048         foreach axis { x y z } {
     1048        foreach axis { x y z } {
    10491049            # Another problem fixed by a <view>. We looking into a data
    10501050            # object for the name of the axes. This should be global to
    10511051            # the viewer itself.
    1052             set label [$_first hints ${axis}label]
    1053             if { $label == "" } {
     1052            set label [$_first hints ${axis}label]
     1053            if { $label == "" } {
    10541054                set label [string toupper $axis]
    1055             }
    1056             # May be a space in the axis label.
    1057             SendCmd [list axis name $axis $label]
     1055            }
     1056            # May be a space in the axis label.
     1057            SendCmd [list axis name $axis $label]
    10581058        }
    10591059        if { [array size _fields] < 2 } {
     
    11621162    SendCmd "camera pan $x $y"
    11631163}
    1164 
    11651164
    11661165# ----------------------------------------------------------------------
     
    12831282itcl::body Rappture::VtkGlyphViewer::InitSettings { args } {
    12841283    foreach spec $args {
    1285         if { [info exists _settings($_first-$spec)] } {
     1284        if { [info exists _settings($_first${spec})] } {
    12861285            # Reset global setting with dataobj specific setting
    1287             set _settings($spec) $_settings($_first-$spec)
     1286            set _settings($spec) $_settings($_first${spec})
    12881287        }
    12891288        AdjustSetting $spec
     
    12941293# AdjustSetting --
    12951294#
    1296 #       Changes/updates a specific setting in the widget.  There are
    1297 #       usually user-setable option.  Commands are sent to the render
    1298 #       server.
     1295#    Changes/updates a specific setting in the widget.  There are
     1296#    usually user-setable option.  Commands are sent to the render
     1297#    server.
    12991298#
    13001299itcl::body Rappture::VtkGlyphViewer::AdjustSetting {what {value ""}} {
     
    13031302    }
    13041303    switch -- $what {
    1305         "background" {
     1304        "-background" {
    13061305            set bgcolor [$itk_component(background) value]
    1307             array set fgcolors {
    1308                 "black" "white"
    1309                 "white" "black"
    1310                 "grey"  "black"
    1311             }
     1306            array set fgcolors {
     1307                "black" "white"
     1308                "white" "black"
     1309                "grey"  "black"
     1310            }
    13121311            configure -plotbackground $bgcolor \
    1313                 -plotforeground $fgcolors($bgcolor)
    1314             $itk_component(view) delete "legend"
    1315             DrawLegend
    1316         }
    1317         "axesVisible" {
    1318             set bool $_settings(axesVisible)
     1312                -plotforeground $fgcolors($bgcolor)
     1313            $itk_component(view) delete "legend"
     1314            DrawLegend
     1315        }
     1316        "-axesvisible" {
     1317            set bool $_settings($what)
    13191318            SendCmd "axis visible all $bool"
    13201319        }
    1321         "axisLabelsVisible" {
    1322             set bool $_settings(axisLabelsVisible)
     1320        "-axislabels" {
     1321            set bool $_settings($what)
    13231322            SendCmd "axis labels all $bool"
    13241323        }
    1325         "axisXGrid" - "axisYGrid" - "axisZGrid" {
    1326             set axis [string tolower [string range $what 4 4]]
     1324        "-axisminorticks" {
     1325            set bool $_settings($what)
     1326            SendCmd "axis minticks all $bool"
     1327        }
     1328        "-xgrid" - "-ygrid" - "-zgrid" {
     1329            set axis [string tolower [string range $what 1 1]]
    13271330            set bool $_settings($what)
    13281331            SendCmd "axis grid $axis $bool"
    13291332        }
    1330         "axisMode" {
     1333        "-axismode" {
    13311334            set mode [$itk_component(axisMode) value]
    13321335            set mode [$itk_component(axisMode) translate $mode]
     
    13341337            SendCmd "axis flymode $mode"
    13351338        }
    1336         "cutplaneEdges" {
     1339        "-cutplaneedges" {
    13371340            set bool $_settings($what)
    13381341            SendCmd "cutplane edges $bool"
    13391342        }
    1340         "cutplaneVisible" {
     1343        "-cutplanevisible" {
    13411344            set bool $_settings($what)
    13421345            SendCmd "cutplane visible $bool"
    13431346        }
    1344         "cutplaneWireframe" {
     1347        "-cutplanewireframe" {
    13451348            set bool $_settings($what)
    13461349            SendCmd "cutplane wireframe $bool"
    13471350        }
    1348         "cutplaneLighting" {
     1351        "-cutplanelighting" {
    13491352            set bool $_settings($what)
    13501353            SendCmd "cutplane lighting $bool"
    13511354        }
    1352         "cutplaneOpacity" {
     1355        "-cutplaneopacity" {
    13531356            set val $_settings($what)
    13541357            set sval [expr { 0.01 * double($val) }]
    13551358            SendCmd "cutplane opacity $sval"
    13561359        }
    1357         "cutplanePreinterp" {
     1360        "-cutplanepreinterp" {
    13581361            set bool $_settings($what)
    13591362            SendCmd "cutplane preinterp $bool"
    13601363        }
    1361         "cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {
    1362             set axis [string tolower [string range $what 8 8]]
     1364        "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" {
     1365            set axis [string tolower [string range $what 9 9]]
    13631366            set bool $_settings($what)
    13641367            if { $bool } {
     
    13691372                    -troughcolor grey82
    13701373            }
    1371             SendCmd "cutplane axis $axis $bool"
    1372         }
    1373         "cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {
    1374             set axis [string tolower [string range $what 8 8]]
     1374            SendCmd "cutplane axis $axis $bool"
     1375        }
     1376        "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" {
     1377            set axis [string tolower [string range $what 9 9]]
    13751378            set pos [expr $_settings($what) * 0.01]
    13761379            SendCmd "cutplane slice ${axis} ${pos}"
    13771380            set _cutplanePending 0
    13781381        }
    1379         "colormap" {
    1380             set _changed(colormap) 1
     1382        "-colormap" {
     1383            set _changed($what) 1
    13811384            StartBufferingCommands
    13821385            set color [$itk_component(colormap) value]
    1383             set _settings(colormap) $color
    1384             if { $color == "none" } {
    1385                 if { $_settings(colormapVisible) } {
    1386                     SendCmd "glyphs colormode constant {}"
    1387                     set _settings(colormapVisible) 0
    1388                 }
    1389             } else {
    1390                 if { !$_settings(colormapVisible) } {
    1391                     SendCmd "glyphs colormode $_colorMode $_curFldName"
    1392                     set _settings(colormapVisible) 1
    1393                 }
    1394                 SetCurrentColormap $color
    1395             }
     1386            set _settings($what) $color
     1387            if { $color == "none" } {
     1388                if { $_settings(-colormapvisible) } {
     1389                    SendCmd "glyphs colormode constant {}"
     1390                    set _settings(-colormapvisible) 0
     1391                }
     1392            } else {
     1393                if { !$_settings(-colormapvisible) } {
     1394                    SendCmd "glyphs colormode $_colorMode $_curFldName"
     1395                    set _settings(-colormapvisible) 1
     1396                }
     1397                SetCurrentColormap $color
     1398            }
    13961399            StopBufferingCommands
    1397             EventuallyRequestLegend
    1398         }
    1399         "glyphWireframe" {
    1400             set bool $_settings(glyphWireframe)
    1401             SendCmd "glyphs wireframe $bool"
    1402         }
    1403         "glyphVisible" {
    1404             set bool $_settings(glyphVisible)
    1405             SendCmd "glyphs visible $bool"
     1400            EventuallyRequestLegend
     1401        }
     1402        "-glyphwireframe" {
     1403            set bool $_settings($what)
     1404            SendCmd "glyphs wireframe $bool"
     1405        }
     1406        "-glyphvisible" {
     1407            set bool $_settings($what)
     1408            SendCmd "glyphs visible $bool"
    14061409            if { $bool } {
    14071410                Rappture::Tooltip::for $itk_component(glyphs) \
     
    14111414                    "Show the glyph"
    14121415            }
    1413             DrawLegend
    1414         }
    1415         "glyphLighting" {
    1416             set bool $_settings(glyphLighting)
    1417             SendCmd "glyphs lighting $bool"
    1418         }
    1419         "glyphEdges" {
    1420             set bool $_settings(glyphEdges)
    1421             SendCmd "glyphs edges $bool"
    1422         }
    1423         "glyphOutline" {
    1424             set bool $_settings(glyphOutline)
    1425             SendCmd "outline visible $bool"
    1426         }
    1427         "glyphOpacity" {
    1428             set val $_settings(glyphOpacity)
     1416            DrawLegend
     1417        }
     1418        "-glyphlighting" {
     1419            set bool $_settings($what)
     1420            SendCmd "glyphs lighting $bool"
     1421        }
     1422        "-glyphedges" {
     1423            set bool $_settings($what)
     1424            SendCmd "glyphs edges $bool"
     1425        }
     1426        "-glyphoutline" {
     1427            set bool $_settings($what)
     1428            SendCmd "outline visible $bool"
     1429        }
     1430        "-glyphopacity" {
     1431            set val $_settings($what)
    14291432            set sval [expr { 0.01 * double($val) }]
    1430             SendCmd "glyphs opacity $sval"
    1431         }
    1432         "field" {
     1433            SendCmd "glyphs opacity $sval"
     1434        }
     1435        "-field" {
    14331436            set label [$itk_component(field) value]
    14341437            set fname [$itk_component(field) translate $label]
    1435             set _settings(field) $fname
     1438            set _settings($what) $fname
    14361439            if { [info exists _fields($fname)] } {
    14371440                foreach { label units components } $_fields($fname) break
     
    14471450                return
    14481451            }
    1449             #SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1452            #if { ![info exists _limits($_curFldName)] } {
     1453            #    SendCmd "dataset maprange all"
     1454            #} else {
     1455            #    SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1456            #}
    14501457            #SendCmd "cutplane colormode $_colorMode $_curFldName"
    14511458            SendCmd "glyphs colormode $_colorMode $_curFldName"
    14521459            DrawLegend
    14531460        }
    1454         "legendVisible" {
    1455             if { !$_settings(legendVisible) } {
     1461        "-legendvisible" {
     1462            if { !$_settings($what) } {
    14561463                $itk_component(view) delete legend
    1457             }
    1458             DrawLegend
     1464            }
     1465            DrawLegend
    14591466        }
    14601467        default {
     
    14641471}
    14651472
    1466 
    14671473#
    14681474# RequestLegend --
    14691475#
    1470 #       Request a new legend from the server.  The size of the legend
    1471 #       is determined from the height of the canvas. 
     1476#    Request a new legend from the server.  The size of the legend
     1477#    is determined from the height of the canvas. 
    14721478#
    14731479# This should be called when
    1474 #       1.  A new current colormap is set.
    1475 #       2.  Window is resized.
    1476 #       3.  The limits of the data have changed.  (Just need a redraw).
    1477 #       4.  Number of glyph have changed. (Just need a redraw).
    1478 #       5.  Legend becomes visible (Just need a redraw).
     1480#    1.  A new current colormap is set.
     1481#    2.  Window is resized.
     1482#    3.  The limits of the data have changed.  (Just need a redraw).
     1483#    4.  Number of glyph have changed. (Just need a redraw).
     1484#    5.  Legend becomes visible (Just need a redraw).
    14791485#
    14801486itcl::body Rappture::VtkGlyphViewer::RequestLegend {} {
     
    14881494    set fname $_curFldName
    14891495    if { [string match "component*" $fname] } {
    1490         set title ""
     1496        set title ""
    14911497    } else {
    1492         if { [info exists _fields($fname)] } {
    1493             foreach { title units } $_fields($fname) break
    1494             if { $units != "" } {
    1495                 set title [format "%s (%s)" $title $units]
    1496             }
    1497         } else {
    1498             set title $fname
    1499         }
     1498        if { [info exists _fields($fname)] } {
     1499            foreach { title units } $_fields($fname) break
     1500            if { $units != "" } {
     1501                set title [format "%s (%s)" $title $units]
     1502            }
     1503        } else {
     1504            set title $fname
     1505        }
    15001506    }
    15011507    # If there's a title too, substract one more line
     
    15081514    # Set the legend on the first heightmap dataset.
    15091515    if { $_currentColormap != ""  } {
    1510         set cmap $_currentColormap
    1511         SendCmdNoWait "legend $cmap $_colorMode $_curFldName {} $w $h 0"
     1516        set cmap $_currentColormap
     1517        SendCmdNoWait "legend $cmap $_colorMode $_curFldName {} $w $h 0"
    15121518    }
    15131519}
     
    15291535    if { [isconnected] } {
    15301536        set rgb [Color2RGB $itk_option(-plotforeground)]
    1531         SendCmd "axis color all $rgb"
     1537        SendCmd "axis color all $rgb"
    15321538        SendCmd "outline color $rgb"
    15331539        #SendCmd "cutplane color $rgb"
     
    15471553    checkbutton $inner.glyphs \
    15481554        -text "Glyphs" \
    1549         -variable [itcl::scope _settings(glyphVisible)] \
    1550         -command [itcl::code $this AdjustSetting glyphVisible] \
     1555        -variable [itcl::scope _settings(-glyphvisible)] \
     1556        -command [itcl::code $this AdjustSetting -glyphvisible] \
    15511557        -font "Arial 9"
    15521558
    15531559    checkbutton $inner.wireframe \
    15541560        -text "Wireframe" \
    1555         -variable [itcl::scope _settings(glyphWireframe)] \
    1556         -command [itcl::code $this AdjustSetting glyphWireframe] \
     1561        -variable [itcl::scope _settings(-glyphwireframe)] \
     1562        -command [itcl::code $this AdjustSetting -glyphwireframe] \
    15571563        -font "Arial 9"
    15581564
    15591565    checkbutton $inner.lighting \
    15601566        -text "Enable Lighting" \
    1561         -variable [itcl::scope _settings(glyphLighting)] \
    1562         -command [itcl::code $this AdjustSetting glyphLighting] \
     1567        -variable [itcl::scope _settings(-glyphlighting)] \
     1568        -command [itcl::code $this AdjustSetting -glyphlighting] \
    15631569        -font "Arial 9"
    15641570
    15651571    checkbutton $inner.edges \
    15661572        -text "Edges" \
    1567         -variable [itcl::scope _settings(glyphEdges)] \
    1568         -command [itcl::code $this AdjustSetting glyphEdges] \
     1573        -variable [itcl::scope _settings(-glyphedges)] \
     1574        -command [itcl::code $this AdjustSetting -glyphedges] \
    15691575        -font "Arial 9"
    15701576
    15711577    checkbutton $inner.outline \
    15721578        -text "Outline" \
    1573         -variable [itcl::scope _settings(glyphOutline)] \
    1574         -command [itcl::code $this AdjustSetting glyphOutline] \
     1579        -variable [itcl::scope _settings(-glyphoutline)] \
     1580        -command [itcl::code $this AdjustSetting -glyphoutline] \
    15751581        -font "Arial 9"
    15761582
    15771583    checkbutton $inner.legend \
    15781584        -text "Legend" \
    1579         -variable [itcl::scope _settings(legendVisible)] \
    1580         -command [itcl::code $this AdjustSetting legendVisible] \
     1585        -variable [itcl::scope _settings(-legendvisible)] \
     1586        -command [itcl::code $this AdjustSetting -legendvisible] \
    15811587        -font "Arial 9"
    15821588
     
    15901596        "grey"               "grey"             
    15911597
    1592     $itk_component(background) value $_settings(background)
    1593     bind $inner.background <<Value>> [itcl::code $this AdjustSetting background]
     1598    $itk_component(background) value $_settings(-background)
     1599    bind $inner.background <<Value>> [itcl::code $this AdjustSetting -background]
    15941600
    15951601    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    15961602    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1597         -variable [itcl::scope _settings(glyphOpacity)] \
     1603        -variable [itcl::scope _settings(-glyphopacity)] \
    15981604        -width 10 \
    15991605        -showvalue off \
    1600         -command [itcl::code $this AdjustSetting glyphOpacity]
    1601 
    1602     label $inner.scale_l -text "Scale" -font "Arial 9"
    1603     ::scale $inner.scale -from 1 -to 100 -orient horizontal \
    1604         -variable [itcl::scope _settings(glyphs-scale)] \
     1606        -command [itcl::code $this AdjustSetting -glyphopacity]
     1607
     1608    label $inner.gscale_l -text "Scale factor" -font "Arial 9"
     1609    ::scale $inner.gscale -from 1 -to 100 -orient horizontal \
     1610        -variable [itcl::scope _settings(-glyphscale)] \
    16051611        -width 10 \
    16061612        -showvalue off \
    1607         -command [itcl::code $this AdjustSetting glyphs-scale]
     1613        -command [itcl::code $this AdjustSetting -glyphscale]
     1614    Rappture::Tooltip::for $inner.gscale "Set scaling multiplier (or constant size)"
    16081615
    16091616    itk_component add field_l {
     
    16161623    }
    16171624    bind $inner.field <<Value>> \
    1618         [itcl::code $this AdjustSetting field]
     1625        [itcl::code $this AdjustSetting -field]
    16191626
    16201627    label $inner.colormap_l -text "Colormap" -font "Arial 9"
     
    16261633    $itk_component(colormap) value "BCGYR"
    16271634    bind $inner.colormap <<Value>> \
    1628         [itcl::code $this AdjustSetting colormap]
     1635        [itcl::code $this AdjustSetting -colormap]
    16291636
    16301637    blt::table $inner \
    1631         0,0 $inner.field_l   -anchor w -pady 2  \
    1632         0,1 $inner.field     -anchor w -pady 2  -fill x \
    1633         1,0 $inner.colormap_l -anchor w -pady 2  \
    1634         1,1 $inner.colormap   -anchor w -pady 2  -fill x \
    1635         3,0 $inner.background_l -anchor w -pady 2 \
    1636         3,1 $inner.background -anchor w -pady 2  -fill x \
    1637         5,0 $inner.wireframe -anchor w -pady 2 -cspan 2 \
    1638         6,0 $inner.lighting  -anchor w -pady 2 -cspan 2 \
    1639         7,0 $inner.edges     -anchor w -pady 2 -cspan 2 \
    1640         8,0 $inner.outline   -anchor w -pady 2 -cspan 2 \
    1641         9,0 $inner.legend    -anchor w -pady 2 \
    1642         10,0 $inner.opacity_l -anchor w -pady 2 \
    1643         10,1 $inner.opacity   -fill x   -pady 2 -fill x \
     1638        0,0 $inner.field_l      -anchor w -pady 2  \
     1639        0,1 $inner.field        -anchor w -pady 2  -fill x \
     1640        1,0 $inner.colormap_l   -anchor w -pady 2  \
     1641        1,1 $inner.colormap     -anchor w -pady 2  -fill x \
     1642        3,0 $inner.background_l -anchor w -pady 2 \
     1643        3,1 $inner.background  -anchor w -pady 2  -fill x \
     1644        5,0 $inner.wireframe    -anchor w -pady 2 -cspan 2 \
     1645        6,0 $inner.lighting     -anchor w -pady 2 -cspan 2 \
     1646        7,0 $inner.edges        -anchor w -pady 2 -cspan 2 \
     1647        8,0 $inner.outline      -anchor w -pady 2 -cspan 2 \
     1648        9,0 $inner.legend       -anchor w -pady 2 \
     1649        10,0 $inner.opacity_l   -anchor w -pady 2 \
     1650        10,1 $inner.opacity     -fill x   -pady 2 -fill x \
    16441651
    16451652    blt::table configure $inner r* c* -resize none
     
    16581665
    16591666    checkbutton $inner.visible \
    1660         -text "Show Axes" \
    1661         -variable [itcl::scope _settings(axesVisible)] \
    1662         -command [itcl::code $this AdjustSetting axesVisible] \
     1667        -text "Axes" \
     1668        -variable [itcl::scope _settings(-axesvisible)] \
     1669        -command [itcl::code $this AdjustSetting -axesvisible] \
    16631670        -font "Arial 9"
    16641671
    16651672    checkbutton $inner.labels \
    1666         -text "Show Axis Labels" \
    1667         -variable [itcl::scope _settings(axisLabelsVisible)] \
    1668         -command [itcl::code $this AdjustSetting axisLabelsVisible] \
     1673        -text "Axis Labels" \
     1674        -variable [itcl::scope _settings(-axislabels)] \
     1675        -command [itcl::code $this AdjustSetting -axislabels] \
    16691676        -font "Arial 9"
    1670 
    1671     checkbutton $inner.gridx \
    1672         -text "Show X Grid" \
    1673         -variable [itcl::scope _settings(axisXGrid)] \
    1674         -command [itcl::code $this AdjustSetting axisXGrid] \
     1677    label $inner.grid_l -text "Grid" -font "Arial 9"
     1678    checkbutton $inner.xgrid \
     1679        -text "X" \
     1680        -variable [itcl::scope _settings(-xgrid)] \
     1681        -command [itcl::code $this AdjustSetting -xgrid] \
    16751682        -font "Arial 9"
    1676     checkbutton $inner.gridy \
    1677         -text "Show Y Grid" \
    1678         -variable [itcl::scope _settings(axisYGrid)] \
    1679         -command [itcl::code $this AdjustSetting axisYGrid] \
     1683    checkbutton $inner.ygrid \
     1684        -text "Y" \
     1685        -variable [itcl::scope _settings(-ygrid)] \
     1686        -command [itcl::code $this AdjustSetting -ygrid] \
    16801687        -font "Arial 9"
    1681     checkbutton $inner.gridz \
    1682         -text "Show Z Grid" \
    1683         -variable [itcl::scope _settings(axisZGrid)] \
    1684         -command [itcl::code $this AdjustSetting axisZGrid] \
     1688    checkbutton $inner.zgrid \
     1689        -text "Z" \
     1690        -variable [itcl::scope _settings(-zgrid)] \
     1691        -command [itcl::code $this AdjustSetting -zgrid] \
     1692        -font "Arial 9"
     1693    checkbutton $inner.minorticks \
     1694        -text "Minor Ticks" \
     1695        -variable [itcl::scope _settings(-axisminorticks)] \
     1696        -command [itcl::code $this AdjustSetting -axisminorticks] \
    16851697        -font "Arial 9"
    16861698
     
    16951707        "furthest_triad"  "farthest" \
    16961708        "outer_edges"     "outer"         
    1697     $itk_component(axisMode) value "static"
    1698     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axisMode]
     1709    $itk_component(axisMode) value $_settings(-axismode)
     1710    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
    16991711
    17001712    blt::table $inner \
    1701         0,0 $inner.visible -anchor w -cspan 2 \
    1702         1,0 $inner.labels  -anchor w -cspan 2 \
    1703         2,0 $inner.gridx   -anchor w -cspan 2 \
    1704         3,0 $inner.gridy   -anchor w -cspan 2 \
    1705         4,0 $inner.gridz   -anchor w -cspan 2 \
    1706         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1707         6,0 $inner.mode    -fill x   -cspan 2
     1713        0,0 $inner.visible    -anchor w -cspan 4 \
     1714        1,0 $inner.labels     -anchor w -cspan 4 \
     1715        2,0 $inner.minorticks -anchor w -cspan 4 \
     1716        4,0 $inner.grid_l     -anchor w \
     1717        4,1 $inner.xgrid      -anchor w \
     1718        4,2 $inner.ygrid      -anchor w \
     1719        4,3 $inner.zgrid      -anchor w \
     1720        5,0 $inner.mode_l     -anchor w -padx { 2 0 } \
     1721        5,1 $inner.mode       -fill x   -cspan 3
    17081722
    17091723    blt::table configure $inner r* c* -resize none
    1710     blt::table configure $inner r7 c1 -resize expand
    1711 }
    1712 
     1724    blt::table configure $inner r7 c6 -resize expand
     1725    blt::table configure $inner r3 -height 0.125i
     1726}
    17131727
    17141728itcl::body Rappture::VtkGlyphViewer::BuildCameraTab {} {
     
    17721786    checkbutton $inner.visible \
    17731787        -text "Cutplanes" \
    1774         -variable [itcl::scope _settings(cutplaneVisible)] \
    1775         -command [itcl::code $this AdjustSetting cutplaneVisible] \
     1788        -variable [itcl::scope _settings(-cutplanevisible)] \
     1789        -command [itcl::code $this AdjustSetting -cutplanevisible] \
    17761790        -font "Arial 9"
    17771791
    17781792    checkbutton $inner.wireframe \
    17791793        -text "Wireframe" \
    1780         -variable [itcl::scope _settings(cutplaneWireframe)] \
    1781         -command [itcl::code $this AdjustSetting cutplaneWireframe] \
     1794        -variable [itcl::scope _settings(-cutplanewireframe)] \
     1795        -command [itcl::code $this AdjustSetting -cutplanewireframe] \
    17821796        -font "Arial 9"
    17831797
    17841798    checkbutton $inner.lighting \
    17851799        -text "Enable Lighting" \
    1786         -variable [itcl::scope _settings(cutplaneLighting)] \
    1787         -command [itcl::code $this AdjustSetting cutplaneLighting] \
     1800        -variable [itcl::scope _settings(-cutplanelighting)] \
     1801        -command [itcl::code $this AdjustSetting -cutplanelighting] \
    17881802        -font "Arial 9"
    17891803
    17901804    checkbutton $inner.edges \
    17911805        -text "Edges" \
    1792         -variable [itcl::scope _settings(cutplaneEdges)] \
    1793         -command [itcl::code $this AdjustSetting cutplaneEdges] \
     1806        -variable [itcl::scope _settings(-cutplaneedges)] \
     1807        -command [itcl::code $this AdjustSetting -cutplaneedges] \
    17941808        -font "Arial 9"
    17951809
    17961810    checkbutton $inner.preinterp \
    17971811        -text "Interpolate Scalars" \
    1798         -variable [itcl::scope _settings(cutplanePreinterp)] \
    1799         -command [itcl::code $this AdjustSetting cutplanePreinterp] \
     1812        -variable [itcl::scope _settings(-cutplanepreinterp)] \
     1813        -command [itcl::code $this AdjustSetting -cutplanepreinterp] \
    18001814        -font "Arial 9"
    18011815
    18021816    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    18031817    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1804         -variable [itcl::scope _settings(cutplaneOpacity)] \
     1818        -variable [itcl::scope _settings(-cutplaneopacity)] \
    18051819        -width 10 \
    18061820        -showvalue off \
    1807         -command [itcl::code $this AdjustSetting cutplaneOpacity]
    1808     $inner.opacity set $_settings(cutplaneOpacity)
     1821        -command [itcl::code $this AdjustSetting -cutplaneopacity]
     1822    $inner.opacity set $_settings(-cutplaneopacity)
    18091823
    18101824    # X-value slicer...
     
    18131827            -onimage [Rappture::icon x-cutplane-red] \
    18141828            -offimage [Rappture::icon x-cutplane-red] \
    1815             -command [itcl::code $this AdjustSetting cutplaneXVisible] \
    1816             -variable [itcl::scope _settings(cutplaneXVisible)] \
     1829            -command [itcl::code $this AdjustSetting -cutplanexvisible] \
     1830            -variable [itcl::scope _settings(-cutplanexvisible)] \
    18171831    }
    18181832    Rappture::Tooltip::for $itk_component(xbutton) \
     
    18241838            -borderwidth 1 -highlightthickness 0 \
    18251839            -command [itcl::code $this EventuallySetCutplane x] \
    1826             -variable [itcl::scope _settings(cutplaneXPosition)] \
    1827             -foreground red2 -font "Arial 9 bold"
     1840            -variable [itcl::scope _settings(-cutplanexposition)] \
     1841            -foreground red2 -font "Arial 9 bold"
    18281842    } {
    18291843        usual
     
    18411855            -onimage [Rappture::icon y-cutplane-green] \
    18421856            -offimage [Rappture::icon y-cutplane-green] \
    1843             -command [itcl::code $this AdjustSetting cutplaneYVisible] \
    1844             -variable [itcl::scope _settings(cutplaneYVisible)] \
     1857            -command [itcl::code $this AdjustSetting -cutplaneyvisible] \
     1858            -variable [itcl::scope _settings(-cutplaneyvisible)] \
    18451859    }
    18461860    Rappture::Tooltip::for $itk_component(ybutton) \
     
    18531867            -borderwidth 1 -highlightthickness 0 \
    18541868            -command [itcl::code $this EventuallySetCutplane y] \
    1855             -variable [itcl::scope _settings(cutplaneYPosition)] \
    1856             -foreground green3 -font "Arial 9 bold"
     1869            -variable [itcl::scope _settings(-cutplaneyposition)] \
     1870            -foreground green3 -font "Arial 9 bold"
    18571871    } {
    18581872        usual
     
    18701884            -onimage [Rappture::icon z-cutplane-blue] \
    18711885            -offimage [Rappture::icon z-cutplane-blue] \
    1872             -command [itcl::code $this AdjustSetting cutplaneZVisible] \
    1873             -variable [itcl::scope _settings(cutplaneZVisible)] \
     1886            -command [itcl::code $this AdjustSetting -cutplanezvisible] \
     1887            -variable [itcl::scope _settings(-cutplanezvisible)] \
    18741888    } {
    1875         usual
    1876         ignore -foreground
     1889        usual
     1890        ignore -foreground
    18771891    }
    18781892    Rappture::Tooltip::for $itk_component(zbutton) \
     
    18851899            -borderwidth 1 -highlightthickness 0 \
    18861900            -command [itcl::code $this EventuallySetCutplane z] \
    1887             -variable [itcl::scope _settings(cutplaneZPosition)] \
    1888             -foreground blue3 -font "Arial 9 bold"
     1901            -variable [itcl::scope _settings(-cutplanezposition)] \
     1902            -foreground blue3 -font "Arial 9 bold"
    18891903    } {
    18901904        usual
     
    18971911
    18981912    blt::table $inner \
    1899         0,0 $inner.visible              -anchor w -pady 2 -cspan 3 \
    1900         1,0 $inner.lighting             -anchor w -pady 2 -cspan 3 \
    1901         2,0 $inner.wireframe            -anchor w -pady 2 -cspan 3 \
    1902         3,0 $inner.edges                -anchor w -pady 2 -cspan 3 \
    1903         4,0 $inner.preinterp            -anchor w -pady 2 -cspan 3 \
    1904         5,0 $inner.opacity_l            -anchor w -pady 2 -cspan 1 \
    1905         5,1 $inner.opacity              -fill x   -pady 2 -cspan 3 \
    1906         6,0 $inner.xbutton              -anchor w -padx 2 -pady 2 \
    1907         7,0 $inner.ybutton              -anchor w -padx 2 -pady 2 \
    1908         8,0 $inner.zbutton              -anchor w -padx 2 -pady 2 \
    1909         6,1 $inner.xval                 -fill y -rspan 4 \
    1910         6,2 $inner.yval                 -fill y -rspan 4 \
    1911         6,3 $inner.zval                 -fill y -rspan 4 \
    1912 
     1913        0,0 $inner.visible   -anchor w -pady 2 -cspan 3 \
     1914        1,0 $inner.lighting  -anchor w -pady 2 -cspan 3 \
     1915        2,0 $inner.wireframe -anchor w -pady 2 -cspan 3 \
     1916        3,0 $inner.edges     -anchor w -pady 2 -cspan 3 \
     1917        4,0 $inner.preinterp -anchor w -pady 2 -cspan 3 \
     1918        5,0 $inner.opacity_l -anchor w -pady 2 -cspan 1 \
     1919        5,1 $inner.opacity   -fill x   -pady 2 -cspan 3 \
     1920        6,0 $inner.xbutton   -anchor w -padx 2 -pady 2 \
     1921        7,0 $inner.ybutton   -anchor w -padx 2 -pady 2 \
     1922        8,0 $inner.zbutton   -anchor w -padx 2 -pady 2 \
     1923        6,1 $inner.xval      -fill y -rspan 4 \
     1924        6,2 $inner.yval      -fill y -rspan 4 \
     1925        6,3 $inner.zval      -fill y -rspan 4 \
    19131926
    19141927    blt::table configure $inner r* c* -resize none
    19151928    blt::table configure $inner r9 c4 -resize expand
    19161929}
    1917 
    1918 
    19191930
    19201931#
     
    20682079    # the code to handle aberrant cases.
    20692080
    2070     if { $_changed(glyphOpacity) } {
    2071         set style(-opacity) [expr $_settings(glyphOpacity) * 0.01]
    2072     }
    2073     if { $_changed(colormap) } {
    2074         set style(-color) $_settings(colormap)
     2081    if { $_changed(-glyphopacity) } {
     2082        set style(-opacity) [expr $_settings(-glyphopacity) * 0.01]
     2083    }
     2084    if { $_changed(-colormap) } {
     2085        set style(-color) $_settings(-colormap)
    20752086    }
    20762087    if { $_currentColormap == "" } {
    20772088        $itk_component(colormap) value $style(-color)
    20782089    }
     2090
     2091    SendCmd "outline add $tag"
     2092    SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
     2093    SendCmd "outline visible $style(-outline) $tag"
     2094    set _settings(-glyphoutline) $style(-outline)
     2095
    20792096    SendCmd "glyphs add $style(-shape) $tag"
    20802097    SendCmd "glyphs edges $style(-edges) $tag"
     2098    set _settings(-glyphedges) $style(-edges)
     2099
    20812100    # normscale=1 and gscale=1 are defaults
    20822101    if {$style(-normscale) != 1} {
     
    20862105        SendCmd "glyphs gscale $style(-gscale) $tag"
    20872106    }
    2088     SendCmd "outline add $tag"
    2089     SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
    2090     SendCmd "outline visible $style(-outline) $tag"
    2091     set _settings(glyphOutline) $style(-outline)
    2092     set _settings(glyphEdges) $style(-edges)
     2107
    20932108    # constant color only used if colormode set to constant
    20942109    SendCmd "glyphs color [Color2RGB $itk_option(-plotforeground)] $tag"
     
    20992114    SendCmd "glyphs quality $style(-quality) $tag"
    21002115    SendCmd "glyphs lighting $style(-lighting) $tag"
    2101     set _settings(glyphLighting) $style(-lighting)
     2116    set _settings(-glyphlighting) $style(-lighting)
    21022117    SendCmd "glyphs linecolor [Color2RGB $style(-edgecolor)] $tag"
    21032118    SendCmd "glyphs linewidth $style(-linewidth) $tag"
    21042119    SendCmd "glyphs ptsize $style(-ptsize) $tag"
    21052120    SendCmd "glyphs opacity $style(-opacity) $tag"
    2106     set _settings(glyphOpacity) [expr $style(-opacity) * 100.0]
     2121    set _settings(-glyphopacity) [expr $style(-opacity) * 100.0]
    21072122    SetCurrentColormap $style(-color)
    21082123    SendCmd "glyphs wireframe $style(-wireframe) $tag"
    2109     set _settings(glyphWireframe) $style(-wireframe)
     2124    set _settings(-glyphwireframe) $style(-wireframe)
    21102125}
    21112126
     
    21612176
    21622177    if { [string match "component*" $fname] } {
    2163         set title ""
     2178        set title ""
    21642179    } else {
    2165         if { [info exists _fields($fname)] } {
    2166             foreach { title units } $_fields($fname) break
    2167             if { $units != "" } {
    2168                 set title [format "%s (%s)" $title $units]
    2169             }
    2170         } else {
    2171             set title $fname
    2172         }
     2180        if { [info exists _fields($fname)] } {
     2181            foreach { title units } $_fields($fname) break
     2182            if { $units != "" } {
     2183                set title [format "%s (%s)" $title $units]
     2184            }
     2185        } else {
     2186            set title $fname
     2187        }
    21732188    }
    21742189    # If there's a legend title, increase the offset by the line height.
     
    22022217}
    22032218
    2204 
    22052219# ----------------------------------------------------------------------
    22062220# USAGE: Slice move x|y|z <newval>
     
    22362250# ReceiveLegend --
    22372251#
    2238 #       Invoked automatically whenever the "legend" command comes in from
    2239 #       the rendering server.  Indicates that binary image data with the
    2240 #       specified <size> will follow.
     2252#    Invoked automatically whenever the "legend" command comes in from
     2253#    the rendering server.  Indicates that binary image data with the
     2254#    specified <size> will follow.
    22412255#
    22422256itcl::body Rappture::VtkGlyphViewer::ReceiveLegend { colormap title min max size } {
     
    22522266        #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    22532267        if { [catch {DrawLegend} errs] != 0 } {
    2254             global errorInfo
    2255             puts stderr "errs=$errs errorInfo=$errorInfo"
     2268            global errorInfo
     2269            puts stderr "errs=$errs errorInfo=$errorInfo"
    22562270        }
    22572271    }
     
    22612275# DrawLegend --
    22622276#
    2263 #       Draws the legend in the own canvas on the right side of the plot area.
     2277#    Draws the legend in the own canvas on the right side of the plot area.
    22642278#
    22652279itcl::body Rappture::VtkGlyphViewer::DrawLegend {} {
     
    22722286   
    22732287    if { [string match "component*" $fname] } {
    2274         set title ""
     2288        set title ""
    22752289    } else {
    2276         if { [info exists _fields($fname)] } {
    2277             foreach { title units } $_fields($fname) break
    2278             if { $units != "" } {
    2279                 set title [format "%s (%s)" $title $units]
    2280             }
    2281         } else {
    2282             set title $fname
    2283         }
     2290        if { [info exists _fields($fname)] } {
     2291            foreach { title units } $_fields($fname) break
     2292            if { $units != "" } {
     2293                set title [format "%s (%s)" $title $units]
     2294            }
     2295        } else {
     2296            set title $fname
     2297        }
    22842298    }
    22852299    set x [expr $w - 2]
    2286     if { !$_settings(legendVisible) } {
    2287         $c delete legend
    2288         return
     2300    if { !$_settings(-legendvisible) } {
     2301        $c delete legend
     2302        return
    22892303    }
    22902304    if { [$c find withtag "legend"] == "" } {
    2291         set y 2
    2292         # If there's a legend title, create a text item for the title.
     2305        set y 2
     2306        # If there's a legend title, create a text item for the title.
    22932307        $c create text $x $y \
    2294             -anchor ne \
    2295             -fill $itk_option(-plotforeground) -tags "title legend" \
    2296             -font $font
     2308            -anchor ne \
     2309            -fill $itk_option(-plotforeground) -tags "title legend" \
     2310            -font $font
    22972311        if { $title != "" } {
    22982312            incr y $lineht
    22992313        }
    2300         $c create text $x $y \
     2314        $c create text $x $y \
    23012315            -anchor ne \
    23022316            -fill $itk_option(-plotforeground) -tags "vmax legend" \
    23032317            -font $font
    2304         incr y $lineht
    2305         $c create image $x $y \
     2318        incr y $lineht
     2319        $c create image $x $y \
    23062320            -anchor ne \
    23072321            -image $_image(legend) -tags "colormap legend"
    2308         $c create rectangle $x $y 1 1 \
     2322        $c create rectangle $x $y 1 1 \
    23092323            -fill "" -outline "" -tags "sensor legend"
    2310         $c create text $x [expr {$h-2}] \
     2324        $c create text $x [expr {$h-2}] \
    23112325            -anchor se \
    23122326            -fill $itk_option(-plotforeground) -tags "vmin legend" \
    23132327            -font $font
    2314         $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y]
    2315         $c bind sensor <Leave> [itcl::code $this LeaveLegend]
    2316         $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y]
     2328        $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y]
     2329        $c bind sensor <Leave> [itcl::code $this LeaveLegend]
     2330        $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y]
    23172331    }
    23182332    set x2 $x
     
    23282342    if { [info exists _limits($_curFldName)] } {
    23292343        foreach { vmin vmax } $_limits($_curFldName) break
    2330         $c itemconfigure vmin -text [format %g $vmin]
    2331         $c itemconfigure vmax -text [format %g $vmax]
     2344        $c itemconfigure vmin -text [format %g $vmin]
     2345        $c itemconfigure vmax -text [format %g $vmax]
    23322346    }
    23332347    set y 2
     
    23352349    if { $title != "" } {
    23362350        $c itemconfigure title -text $title
    2337         $c coords title $x $y
    2338         incr y $lineht
     2351        $c coords title $x $y
     2352        incr y $lineht
    23392353        $c raise title
    23402354    }
     
    23782392        invoke {
    23792393            $itk_component(field) value $_curFldLabel
    2380             AdjustSetting field
     2394            AdjustSetting -field
    23812395        }
    23822396        default {
     
    24022416# BuildColormap --
    24032417#
    2404 #       Build the designated colormap on the server.
     2418#    Build the designated colormap on the server.
    24052419#
    24062420itcl::body Rappture::VtkGlyphViewer::BuildColormap { name } {
     
    24332447    set _view(zoom) 1.0
    24342448}
    2435 
Note: See TracChangeset for help on using the changeset viewer.