Changeset 1111 for trunk/gui/scripts/xyresult.tcl
- Timestamp:
- Aug 13, 2008 1:33:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xyresult.tcl
r1104 r1111 124 124 Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level" 125 125 126 127 126 itk_component add plot { 128 127 blt::graph $itk_interior.plot \ … … 134 133 pack $itk_component(plot) -expand yes -fill both 135 134 $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 137 137 138 138 # … … 200 200 201 201 # 202 # Add supportfor editing hidden/elements:202 # Add legend for editing hidden/elements: 203 203 # 204 204 itk_component add legend { … … 206 206 -borderwidth 1 -padx 3 -pady 0 \ 207 207 -text "L" -font "-*-times new roman-bold-i-*-*-11-*-*-*-*-*-*-*" \ 208 208 -command [list $itk_component(hull).legend activate \ 209 209 $itk_component(controls).legend left] 210 210 } { … … 214 214 } 215 215 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" 217 218 218 219 Rappture::Balloon $itk_component(hull).legend -title "Legend" … … 639 640 } 640 641 $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] 641 644 642 645 # … … 842 845 set g $itk_component(plot) 843 846 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 } 844 853 if {$state == "at"} { 845 854 if {[$g element closest $x $y info -interpolate yes]} { … … 1541 1550 } 1542 1551 } 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.