- Timestamp:
- Dec 2, 2008, 5:24:57 PM (16 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xylegend.tcl
r1167 r1252 108 108 itcl::body Rappture::XyLegend::constructor { graph args } { 109 109 option add hull.width hull.height 110 pack propagate $itk_component(hull) no 110 111 itk_component add scrollbars { 111 112 Rappture::Scroller $itk_interior.scrl \ 112 -xscrollmode auto -yscrollmode auto 113 -xscrollmode auto -yscrollmode auto \ 114 -width 200 -height 100 113 115 } 114 116 set tree_ [blt::tree create] 115 117 itk_component add legend { 116 118 blt::treeview $itk_component(scrollbars).legend -linewidth 0 \ 117 -bg white -selectmode multiple -width 0\119 -bg white -selectmode multiple \ 118 120 -highlightthickness 0 \ 119 121 -tree $tree_ \ -
trunk/gui/scripts/xyresult.tcl
r1152 r1252 100 100 101 101 private variable _dispatcher "" ;# dispatcher for !events 102 103 102 private variable _clist "" ;# list of curve objects 104 103 private variable _curve2color ;# maps curve => plotting color … … 118 117 private variable _markers 119 118 private variable cur_ "" 119 private variable initialized_ 0 120 120 } 121 121 122 122 itk::usual XyResult { 123 123 keep -background -foreground -cursor -font 124 } 125 126 itk::usual Panedwindow { 127 keep -background -cursor 124 128 } 125 129 … … 159 163 pack $itk_component(reset) -padx 4 -pady 2 -anchor e 160 164 Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level" 161 165 itk_component add drawer { 166 panedwindow $itk_interior.drawer \ 167 -orient horizontal -opaqueresize 1 -handlepad 0 \ 168 -handlesize 1 -sashwidth 2 169 } 170 pack $itk_component(drawer) -expand yes -fill both 162 171 itk_component add plot { 163 blt::graph $itk_ interior.plot \172 blt::graph $itk_component(drawer).plot \ 164 173 -highlightthickness 0 -plotpadx 0 -plotpady 0 \ 165 174 -rightmargin 10 … … 167 176 keep -background -foreground -cursor -font 168 177 } 169 pack $itk_component(plot) -expand yes -fill both178 $itk_component(drawer) add $itk_component(plot) -sticky nsew 170 179 $itk_component(plot) pen configure activeLine \ 171 180 -symbol square -pixels 3 -linewidth 2 \ … … 251 260 252 261 itk_component add legend { 253 Rappture::XyLegend $itk_component( controls).legend $itk_component(plot)262 Rappture::XyLegend $itk_component(drawer).legend $itk_component(plot) 254 263 } 255 264 after idle [subst { … … 1577 1586 switch -- ${what} { 1578 1587 "activate" { 1579 pack $itk_component(legend) -expand yes -fill both1588 $itk_component(drawer) add $itk_component(legend) -sticky nsew 1580 1589 after idle [list focus $itk_component(legend)] 1590 if { !$initialized_ } { 1591 set w [winfo width $itk_component(drawer)] 1592 set x [expr $w - 100] 1593 $itk_component(drawer) sash place 0 $x 0 1594 set initialized_ 1 1595 } 1581 1596 } 1582 1597 "deactivate" { 1583 pack forget $itk_component(legend)1598 $itk_component(drawer) forget $itk_component(legend) 1584 1599 } 1585 1600 "toggle" { 1586 set slaves [ pack slave $itk_component(controls)]1601 set slaves [$itk_component(drawer) panes] 1587 1602 if { [lsearch $slaves $itk_component(legend)] >= 0 } { 1588 1603 legend deactivate
Note: See TracChangeset
for help on using the changeset viewer.