Changeset 14 for trunk/gui


Ignore:
Timestamp:
Jun 8, 2005, 9:40:18 PM (19 years ago)
Author:
mmc
Message:

Added a new <mesh> type and a viewer for mesh geometries.
Needed this for Prophet, and it's a little hard-coded to
their test case. Hack job, but it works. Also fixed the
tooltips so they don't hang around in strange cases.

Location:
trunk/gui/scripts
Files:
3 added
6 edited

Legend:

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

    r11 r14  
    114114        # make sure we have x,y,z
    115115        while {[llength $line] < 3} {
    116             append line "0"
     116            lappend line "0"
    117117        }
    118118
  • trunk/gui/scripts/field.tcl

    r13 r14  
    270270        }
    271271    }
     272
     273    # to be compatible with curve objects
     274    set hints(xlabel) "Position"
    272275
    273276    if {[info exists hints(group)] && [info exists hints(label)]} {
  • trunk/gui/scripts/loader.tcl

    r13 r14  
    8686    foreach ftail $flist {
    8787        set fpath [file join $fdir examples $ftail]
    88         foreach fname [glob -nocomplain $fpath] {
     88        foreach fname [lsort [glob -nocomplain $fpath]] {
    8989            if {[file exists $fname]} {
    9090                if {[catch {set obj [Rappture::library $fname]} result]} {
  • trunk/gui/scripts/resultviewer.tcl

    r13 r14  
    209209            }
    210210        }
     211        ::Rappture::Mesh {
     212            switch -- [$dataobj dimensions] {
     213                2 {
     214                    set mode "mesh"
     215                    if {![info exists _mode2widget($mode)]} {
     216                        set w $itk_interior.mesh
     217                        Rappture::MeshResult $w
     218                        set _mode2widget($mode) $w
     219                    }
     220                }
     221                default {
     222                    error "can't handle [$dataobj dimensions]D field"
     223                }
     224            }
     225        }
    211226        ::Rappture::Table {
    212227            set cols [Rappture::EnergyLevels::columns $dataobj]
     
    293308            return [Rappture::Field ::#auto $xmlobj $path]
    294309        }
     310        mesh {
     311            return [Rappture::Mesh ::#auto $xmlobj $path]
     312        }
    295313        table {
    296314            return [Rappture::Table ::#auto $xmlobj $path]
  • trunk/gui/scripts/tooltip.tcl

    r11 r14  
    351351Rappture::Tooltip .rappturetooltip
    352352
     353# any click on any widget takes down the tooltip
     354bind all <Leave> [list ::Rappture::Tooltip::tooltip cancel]
     355bind all <ButtonPress> [list ::Rappture::Tooltip::tooltip cancel]
     356
    353357# create a tooltip widget to show error cues
    354358Rappture::Tooltip .rappturetoolcue \
  • trunk/gui/scripts/xyresult.tcl

    r13 r14  
    108108    $itk_component(plot) element bind all <Leave> \
    109109        [itcl::code $this _hilite off %x %y]
     110
     111    bind $itk_component(plot) <Leave> \
     112        [list Rappture::Tooltip::tooltip cancel]
    110113
    111114    Blt_ZoomStack $itk_component(plot)
Note: See TracChangeset for help on using the changeset viewer.