Changeset 844 for trunk/gui/scripts
- Timestamp:
- Jan 4, 2008 9:19:46 AM (16 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/historesult.tcl
r843 r844 1 1 2 2 # ---------------------------------------------------------------------- 3 # COMPONENT: Histo Result - X/Y plot in a ResultSet3 # COMPONENT: HistogramResult - X/Y plot in a ResultSet 4 4 # 5 5 # This widget is an X/Y plot, meant to view histograms produced … … 17 17 package require BLT 18 18 19 option add *Histo Result*Element.borderWidth 1 widgetDefault20 option add *Histo Result*Element.relief solid widgetDefault21 option add *Histo Result*x.loose 1 widgetDefault22 option add *Histo Result*y.loose 1 widgetDefault23 option add *Histo Result*Element.relief solid widgetDefault24 25 option add *Histo Result.width 3i widgetDefault26 option add *Histo Result.height 3i widgetDefault27 option add *Histo Result.gridColor #d9d9d9 widgetDefault28 option add *Histo Result.activeColor blue widgetDefault29 option add *Histo Result.dimColor gray widgetDefault30 option add *Histo Result.controlBackground gray widgetDefault31 option add *Histo Result.font \19 option add *HistogramResult*Element.borderWidth 1 widgetDefault 20 option add *HistogramResult*Element.relief solid widgetDefault 21 option add *HistogramResult*x.loose 1 widgetDefault 22 option add *HistogramResult*y.loose 1 widgetDefault 23 option add *HistogramResult*Element.relief solid widgetDefault 24 25 option add *HistogramResult.width 3i widgetDefault 26 option add *HistogramResult.height 3i widgetDefault 27 option add *HistogramResult.gridColor #d9d9d9 widgetDefault 28 option add *HistogramResult.activeColor blue widgetDefault 29 option add *HistogramResult.dimColor gray widgetDefault 30 option add *HistogramResult.controlBackground gray widgetDefault 31 option add *HistogramResult.font \ 32 32 -*-helvetica-medium-r-normal-*-12-* widgetDefault 33 33 34 option add *Histo Result.autoColors {34 option add *HistogramResult.autoColors { 35 35 #0000ff #ff0000 #00cc00 36 36 #cc00cc #ff9900 #cccc00 … … 39 39 } widgetDefault 40 40 41 option add *Histo Result*Balloon*Entry.background white widgetDefault42 43 itcl::class Rappture::Histo Result {41 option add *HistogramResult*Balloon*Entry.background white widgetDefault 42 43 itcl::class Rappture::HistogramResult { 44 44 inherit itk::Widget 45 45 … … 88 88 } 89 89 90 itk::usual Histo Result {90 itk::usual HistogramResult { 91 91 keep -background -foreground -cursor -font 92 92 } … … 95 95 # CONSTRUCTOR 96 96 # ---------------------------------------------------------------------- 97 itcl::body Rappture::Histo Result::constructor {args} {97 itcl::body Rappture::HistogramResult::constructor {args} { 98 98 Rappture::dispatcher _dispatcher 99 99 $_dispatcher register !rebuild … … 207 207 # DESTRUCTOR 208 208 # ---------------------------------------------------------------------- 209 itcl::body Rappture::Histo Result::destructor {} {209 itcl::body Rappture::HistogramResult::destructor {} { 210 210 } 211 211 … … 217 217 # -brightness, -width, -linestyle and -raise. 218 218 # ---------------------------------------------------------------------- 219 itcl::body Rappture::Histo Result::add {histogram {settings ""}} {219 itcl::body Rappture::HistogramResult::add {histogram {settings ""}} { 220 220 array set params { 221 221 -color auto … … 293 293 # order from bottom to top of this result. 294 294 # ---------------------------------------------------------------------- 295 itcl::body Rappture::Histo Result::get {} {295 itcl::body Rappture::HistogramResult::get {} { 296 296 # put the dataobj list in order according to -raise options 297 297 set clist $_hlist … … 314 314 # are specified, then all histograms are deleted. 315 315 # ---------------------------------------------------------------------- 316 itcl::body Rappture::Histo Result::delete {args} {316 itcl::body Rappture::HistogramResult::delete {args} { 317 317 if {[llength $args] == 0} { 318 318 set args $_hlist … … 358 358 # the user scans through data in the ResultSet viewer. 359 359 # ---------------------------------------------------------------------- 360 itcl::body Rappture::Histo Result::scale {args} {360 itcl::body Rappture::HistogramResult::scale {args} { 361 361 set allx [$itk_component(plot) x2axis use] 362 362 lappend allx x ;# fix main x-axis too … … 415 415 # "string" is the data itself. 416 416 # ---------------------------------------------------------------------- 417 itcl::body Rappture::Histo Result::download {option args} {417 itcl::body Rappture::HistogramResult::download {option args} { 418 418 switch $option { 419 419 coming { … … 429 429 pack $inner.summary -side top 430 430 radiobutton $inner.csv -text "Data as Comma-Separated Values" \ 431 -variable Rappture::Histo Result::_downloadPopup(format) \431 -variable Rappture::HistogramResult::_downloadPopup(format) \ 432 432 -value csv 433 433 pack $inner.csv -anchor w 434 434 radiobutton $inner.pdf -text "Image as PDF/PostScript" \ 435 -variable Rappture::Histo Result::_downloadPopup(format) \435 -variable Rappture::HistogramResult::_downloadPopup(format) \ 436 436 -value pdf 437 437 pack $inner.pdf -anchor w … … 531 531 # widget to display new data. 532 532 # ---------------------------------------------------------------------- 533 itcl::body Rappture::Histo Result::_rebuild {} {533 itcl::body Rappture::HistogramResult::_rebuild {} { 534 534 set g $itk_component(plot) 535 535 … … 729 729 # current plot. 730 730 # ---------------------------------------------------------------------- 731 itcl::body Rappture::Histo Result::_resetLimits {} {731 itcl::body Rappture::HistogramResult::_resetLimits {} { 732 732 set g $itk_component(plot) 733 733 … … 805 805 # controls for this widget. Changes the zoom for the current view. 806 806 # ---------------------------------------------------------------------- 807 itcl::body Rappture::Histo Result::_zoom {option args} {807 itcl::body Rappture::HistogramResult::_zoom {option args} { 808 808 switch -- $option { 809 809 reset { … … 820 820 # pop up with element info. 821 821 # ---------------------------------------------------------------------- 822 itcl::body Rappture::Histo Result::_hilite {state x y} {822 itcl::body Rappture::HistogramResult::_hilite {state x y} { 823 823 set g $itk_component(plot) 824 824 set elem "" … … 1030 1030 # changes from the panel. 1031 1031 # ---------------------------------------------------------------------- 1032 itcl::body Rappture::Histo Result::_axis {option args} {1032 itcl::body Rappture::HistogramResult::_axis {option args} { 1033 1033 set inner [$itk_component(hull).axes component inner] 1034 1034 … … 1379 1379 # are not recognized are ignored. 1380 1380 # ---------------------------------------------------------------------- 1381 itcl::body Rappture::Histo Result::_getLineMarkerOptions {style} {1381 itcl::body Rappture::HistogramResult::_getLineMarkerOptions {style} { 1382 1382 array set lineOptions { 1383 1383 "-color" "-outline" … … 1402 1402 # are not recognized are ignored. 1403 1403 # ---------------------------------------------------------------------- 1404 itcl::body Rappture::Histo Result::_getTextMarkerOptions {style} {1404 itcl::body Rappture::HistogramResult::_getTextMarkerOptions {style} { 1405 1405 array set textOptions { 1406 1406 "-color" "-outline" … … 1427 1427 # x-axis name (x, x2, x3, etc.), and y is the y-axis name. 1428 1428 # ---------------------------------------------------------------------- 1429 itcl::body Rappture::Histo Result::_getAxes {xydata} {1429 itcl::body Rappture::HistogramResult::_getAxes {xydata} { 1430 1430 # rebuild if needed, so we know about the axes 1431 1431 if {[$_dispatcher ispending !rebuild]} { … … 1456 1456 # CONFIGURATION OPTION: -gridcolor 1457 1457 # ---------------------------------------------------------------------- 1458 itcl::configbody Rappture::Histo Result::gridcolor {1458 itcl::configbody Rappture::HistogramResult::gridcolor { 1459 1459 if {"" == $itk_option(-gridcolor)} { 1460 1460 $itk_component(plot) grid off … … 1468 1468 # CONFIGURATION OPTION: -autocolors 1469 1469 # ---------------------------------------------------------------------- 1470 itcl::configbody Rappture::Histo Result::autocolors {1470 itcl::configbody Rappture::HistogramResult::autocolors { 1471 1471 foreach c $itk_option(-autocolors) { 1472 1472 if {[catch {winfo rgb $itk_component(hull) $c}]} { -
trunk/gui/scripts/resultviewer.tcl
r839 r844 213 213 if {![info exists _mode2widget($mode)]} { 214 214 set w $itk_interior.xy 215 Rappture::Histo Result $w215 Rappture::HistogramResult $w 216 216 set _mode2widget($mode) $w 217 217 }
Note: See TracChangeset
for help on using the changeset viewer.