Changeset 935


Ignore:
Timestamp:
Mar 10, 2008, 5:26:38 PM (17 years ago)
Author:
gah
Message:

add addition settings for nanovis and heightmap viewers

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r924 r935  
    3131proc HeightmapViewer_init_resources {} {
    3232    Rappture::resources::register \
    33         nanovis_server Rappture::VisViewer::SetNanovisServerList
     33        nanovis_server Rappture::HeightmapViewer::SetServerList
    3434}
    3535
     
    5050    }
    5151
     52    public proc SetServerList { namelist } {
     53        Rappture::VisViewer::SetServerList "nanovis" $namelist
     54    }
    5255    public method isconnected {}
    5356    public method add {dataobj {settings ""}}
     
    209212    set ::Rappture::HeightmapViewer::_settings($this-grid) 1
    210213    ::checkbutton $inner.f.grid \
    211         -text "Show Grid" \
     214        -text "Grid" \
    212215        -variable ::Rappture::HeightmapViewer::_settings($this-grid) \
    213216        -command [itcl::code $this _fixSettings grid]
     
    216219    set ::Rappture::HeightmapViewer::_settings($this-axes) 1
    217220    ::checkbutton $inner.f.axes \
    218         -text "Show Axes" \
     221        -text "Axes" \
    219222        -variable ::Rappture::HeightmapViewer::_settings($this-axes) \
    220223        -command [itcl::code $this _fixSettings axes]
     
    223226    set ::Rappture::HeightmapViewer::_settings($this-contourlines) 1
    224227    ::checkbutton $inner.f.contour \
    225         -text "Show Contour Lines" \
     228        -text "Contour Lines" \
    226229        -variable ::Rappture::HeightmapViewer::_settings($this-contourlines) \
    227230        -command [itcl::code $this _fixSettings contourlines]
    228231    grid $inner.f.contour -row 2 -column 0 -sticky w
    229232
     233    set ::Rappture::HeightmapViewer::_settings($this-wireframe) "fill"
     234    ::checkbutton $inner.f.wireframe \
     235        -text "Wireframe" \
     236        -onvalue "wireframe" -offvalue "fill" \
     237        -variable ::Rappture::HeightmapViewer::_settings($this-wireframe) \
     238        -command [itcl::code $this _fixSettings wireframe]
     239    grid $inner.f.wireframe -row 3 -column 0 -sticky w
     240
     241    set ::Rappture::HeightmapViewer::_settings($this-shading) "smooth"
     242    ::checkbutton $inner.f.shading \
     243        -text "Flat Shading" \
     244        -onvalue "flat" -offvalue "smooth" \
     245        -variable ::Rappture::HeightmapViewer::_settings($this-shading) \
     246        -command [itcl::code $this _fixSettings shading]
     247    grid $inner.f.shading -row 4 -column 0 -sticky w
    230248
    231249    # Legend
     
    716734         _send "grid linecolor [Color2RGB $itk_option(-plotoutline)]"
    717735     }
     736    _fixSettings shading
     737    _fixSettings wireframe
    718738    _fixSettings grid
    719739    _fixSettings axes
     
    881901            }
    882902        }
     903        "shading" {
     904            if { [isconnected] } {
     905                _send "heightmap shading $_settings($this-shading)"
     906            }
     907        }
     908        "wireframe" {
     909            if { [isconnected] } {
     910                _send "heightmap polygon $_settings($this-wireframe)"
     911            }
     912        }
    883913        "contourlines" {
    884914            if {[isconnected]} {
  • trunk/gui/scripts/molvisviewer.tcl

    r924 r935  
    2727proc MolvisViewer_init_resources {} {
    2828    Rappture::resources::register \
    29         molvis_server Rappture::VisViewer::SetPymolServerList
     29        molvis_server Rappture::MolvisViewer::SetServerList
    3030}
    3131
     
    5050    destructor {
    5151        # defined below
     52    }
     53    public proc SetServerList { namelist } {
     54        Rappture::VisViewer::SetServerList "pymol" $namelist
    5255    }
    5356    public method Connect {}
  • trunk/gui/scripts/nanovisviewer.tcl

    r924 r935  
    3232proc NanovisViewer_init_resources {} {
    3333    Rappture::resources::register \
    34         nanovis_server Rappture::VisViewer::SetNanovisServerList
     34        nanovis_server Rappture::NanovisViewer::SetServerList
    3535}
    3636
     
    4949    destructor {
    5050        # defined below
     51    }
     52    public proc SetServerList { namelist } {
     53        Rappture::VisViewer::SetServerList "nanovis" $namelist
    5154    }
    5255    public method add {dataobj {settings ""}}
     
    419422    set ::Rappture::NanovisViewer::_settings($this-axes) 1
    420423    ::checkbutton $inner.scales.axes \
    421         -text "Show Axes" \
     424        -text "Axes" \
    422425        -variable ::Rappture::NanovisViewer::_settings($this-axes) \
    423426        -command [itcl::code $this _fixSettings axes]
     
    426429    set ::Rappture::NanovisViewer::_settings($this-grid) 0
    427430    ::checkbutton $inner.scales.grid \
    428         -text "Show Grid" \
     431        -text "Grid" \
    429432        -variable ::Rappture::NanovisViewer::_settings($this-grid) \
    430433        -command [itcl::code $this _fixSettings grid]
     
    433436    set ::Rappture::NanovisViewer::_settings($this-outline) 1
    434437    ::checkbutton $inner.scales.outline \
    435         -text "Show Outline" \
     438        -text "Outline" \
    436439        -variable ::Rappture::NanovisViewer::_settings($this-outline) \
    437440        -command [itcl::code $this _fixSettings outline]
Note: See TracChangeset for help on using the changeset viewer.