diff options
author | Dave Brolley <brolley@redhat.com> | 2009-08-04 12:35:41 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-08-04 12:35:41 -0400 |
commit | bc9077d171b8250a93a1b5a481e34913e5585dd5 (patch) | |
tree | 1fa945c76a66e297e783354ccd7a860aa65d304b /grapher/Graph.hxx | |
parent | 3174c3ca37371d738b86d630dc4d8b15104e57d0 (diff) | |
parent | 8b095b454b34e88c04592be6c651153f802eced6 (diff) | |
download | systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.gz systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.xz systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts:
cache.cxx
Diffstat (limited to 'grapher/Graph.hxx')
-rw-r--r-- | grapher/Graph.hxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx new file mode 100644 index 00000000..1cc1892d --- /dev/null +++ b/grapher/Graph.hxx @@ -0,0 +1,48 @@ +#ifndef SYSTEMTAP_GRAPH_HXX +#define SYSTEMTAP_GRAPH_HXX 1 + +#include <cairomm/context.h> + +#include "GraphData.hxx" +#include "CairoWidget.hxx" + +namespace systemtap +{ + class Graph : public CairoWidget + { + public: + friend class GraphWidget; + Graph(); + virtual void draw(Cairo::RefPtr<Cairo::Context> cr); + virtual bool containsPoint(double x, double y); + double getLineWidth() { return _lineWidth; } + void setLineWidth(double lineWidth) { _lineWidth = lineWidth; } + bool getAutoScaling() const { return _autoScaling; } + void setAutoScaling(bool val) { _autoScaling = val; } + void addGraphData(std::tr1::shared_ptr<GraphDataBase> data); + void getExtents(double& left, double& right, double& top, double& bottom) + const; + void setExtents(double left, double right, double top, double bottom); + // extents of the whole graph area + double _width; + double _height; + // Position, extents of the graph + double _graphX; + double _graphY; + double _graphWidth; + double _graphHeight; + double _lineWidth; + bool _autoScaling; + bool _autoScrolling; + double _zoomFactor; + std::tr1::shared_ptr<CairoPlayButton> _playButton; + protected: + typedef std::vector<std::tr1::shared_ptr<GraphDataBase> > DatasetList; + DatasetList _datasets; + double _left; + double _right; + double _top; + double _bottom; + }; +} +#endif |