Changeset 1342 for trunk/gui/scripts/unirect2d.tcl
- Timestamp:
- Mar 18, 2009, 2:59:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/unirect2d.tcl
r1111 r1342 42 42 itcl::body Rappture::UniRect2d::constructor {xmlobj field cname} { 43 43 if {![Rappture::library isvalid $xmlobj]} { 44 44 error "bad value \"$xmlobj\": should be Rappture::library" 45 45 } 46 46 set path [$field get $cname.mesh] … … 179 179 itcl::body Rappture::UniRect2d::hints {{keyword ""}} { 180 180 if {![info exists _hints]} { 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 181 foreach {key path} { 182 group about.group 183 label about.label 184 color about.color 185 style about.style 186 type about.type 187 xlabel xaxis.label 188 xdesc xaxis.description 189 xunits xaxis.units 190 xscale xaxis.scale 191 xmin xaxis.min 192 xmax xaxis.max 193 ylabel yaxis.label 194 ydesc yaxis.description 195 yunits yaxis.units 196 yscale yaxis.scale 197 ymin yaxis.min 198 ymax yaxis.max 199 } { 200 set str [$_curve get $path] 201 if {"" != $str} { 202 set _hints($key) $str 203 } 204 } 205 206 if {[info exists _hints(xlabel)] && "" != $_hints(xlabel) 207 && [info exists _hints(xunits)] && "" != $_hints(xunits)} { 208 set _hints(xlabel) "$_hints(xlabel) ($_hints(xunits))" 209 } 210 if {[info exists _hints(ylabel)] && "" != $_hints(ylabel) 211 && [info exists _hints(yunits)] && "" != $_hints(yunits)} { 212 set _hints(ylabel) "$_hints(ylabel) ($_hints(yunits))" 213 } 214 215 if {[info exists _hints(group)] && [info exists _hints(label)]} { 216 # pop-up help for each curve 217 set _hints(tooltip) $_hints(label) 218 } 219 219 } 220 220 221 221 if {$keyword != ""} { 222 223 224 225 222 if {[info exists _hints($keyword)]} { 223 return $_hints($keyword) 224 } 225 return "" 226 226 } 227 227 return [array get _hints]
Note: See TracChangeset
for help on using the changeset viewer.