Ignore:
Timestamp:
Aug 13, 2008 1:33:28 PM (16 years ago)
Author:
gah
Message:

nanovis/heightmap update

File:
1 edited

Legend:

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

    r1104 r1111  
    124124    Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level"
    125125
    126 
    127126    itk_component add plot {
    128127        blt::graph $itk_interior.plot \
     
    134133    pack $itk_component(plot) -expand yes -fill both
    135134    $itk_component(plot) pen configure activeLine \
    136         -symbol square -pixels 3 -linewidth 2 -color black
     135        -symbol square -pixels 3 -linewidth 2 \
     136        -outline black -fill red -color black
    137137
    138138    #
     
    200200   
    201201    #
    202     # Add support for editing hidden/elements:
     202    # Add legend for editing hidden/elements:
    203203    #
    204204    itk_component add legend {
     
    206206            -borderwidth 1 -padx 3 -pady 0 \
    207207            -text "L" -font "-*-times new roman-bold-i-*-*-11-*-*-*-*-*-*-*" \
    208        -command [list $itk_component(hull).legend activate \
     208            -command [list $itk_component(hull).legend activate \
    209209                          $itk_component(controls).legend left]
    210210    } {
     
    214214    }
    215215    pack $itk_component(legend) -padx 4 -pady 4
    216     Rappture::Tooltip::for $itk_component(legend) "Display legend to hide/show elements"
     216    Rappture::Tooltip::for $itk_component(legend) \
     217        "Display legend to hide/show elements"
    217218
    218219    Rappture::Balloon $itk_component(hull).legend -title "Legend"
     
    639640    }
    640641    $g legend bind all <ButtonRelease> [itcl::code $this _legend toggle]
     642    $g legend bind all <ButtonRelease-3> [itcl::code $this _legend showall]
     643    $g legend bind all <ButtonRelease-2> [itcl::code $this _legend showone]
    641644
    642645    #
     
    842845    set g $itk_component(plot)
    843846    set elem ""
     847 
     848    # Peek inside of Blt_ZoomStack package to see if we're currently in the
     849    # middle of a zoom selection.
     850    if {[info exists ::zoomInfo($g,corner)] && $::zoomInfo($g,corner) == "B" } {
     851        return;
     852    }
    844853    if {$state == "at"} {
    845854        if {[$g element closest $x $y info -interpolate yes]} {
     
    15411550            }
    15421551        }
    1543     }
    1544 }
     1552        "showall" {
     1553            set g $itk_component(plot)
     1554            set cur [$g legend get current]
     1555            foreach name [$g element show] {
     1556                $g legend deactivate $name
     1557                $g element configure $name -hide no
     1558                update
     1559            }
     1560            $g element configure $cur -hide yes
     1561            $g legend activate $cur
     1562        }
     1563        "showone" {
     1564            set g $itk_component(plot)
     1565            set cur [$g legend get current]
     1566            foreach name [$g element show] {
     1567                $g legend activate $name
     1568                $g element configure $name -hide yes
     1569            }
     1570            $g element configure $cur -hide no
     1571            $g legend deactivate $cur
     1572        }
     1573    }
     1574}
Note: See TracChangeset for help on using the changeset viewer.