source: trunk/lang/tcl/scripts/objects/curve/curveoutput.tcl @ 3177

Last change on this file since 3177 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

File size: 1.9 KB
Line 
1# ----------------------------------------------------------------------
2#  COMPONENT: CurveOutput - output viewer for curves (x/y plots)
3#
4#  This widget is able to visualize Rappture ObjVal objects of type
5#  CurveValue.  It produces X/Y plots showing the curve.  Use the "add"
6#  and "delete" methods to control the data objects shown on the plot.
7# ======================================================================
8#  AUTHOR:  Michael McLennan, Purdue University
9#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
10#
11#  See the file "license.terms" for information on usage and
12#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13# ======================================================================
14package require Itk
15
16itcl::class Rappture::objects::CurveOutput {
17    inherit itk::Widget
18
19    constructor {args} { # defined below }
20
21    public method add {dataobj {settings ""}} {
22        return [$itk_component(xy) add $dataobj $settings]
23    }
24    public method get {} {
25        return [$itk_component(xy) get]
26    }
27    public method delete {args} {
28        return [eval $itk_component(xy) delete $args]
29    }
30    public method scale {args} {
31        return [eval $itk_component(xy) scale $args]
32    }
33    public method parameters {title args} {
34        return [eval $itk_component(xy) parameters [list $title] $args]
35    }
36    public method download {option args} {
37        return [eval $itk_component(xy) download $option $args]
38    }
39}
40
41# ----------------------------------------------------------------------
42# CONSTRUCTOR
43# ----------------------------------------------------------------------
44itcl::body Rappture::objects::CurveOutput::constructor {args} {
45    itk_component add xy {
46        ::Rappture::XyResult $itk_interior.xy
47    } {
48        keep -background -foreground -cursor -font
49        keep -autocolors -gridcolor -activecolor -dimcolor
50    }
51    pack $itk_component(xy) -expand yes -fill both
52
53    eval itk_initialize $args
54}
Note: See TracBrowser for help on using the repository browser.