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/GraphWidget.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/GraphWidget.hxx')
-rw-r--r-- | grapher/GraphWidget.hxx | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 46075b78..c15f8fcd 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -6,7 +6,7 @@ #include <tr1/memory> #include <gtkmm/drawingarea.h> -#include "GraphData.hxx" +#include <Graph.hxx> namespace systemtap { @@ -17,20 +17,16 @@ namespace systemtap public: GraphWidget(); virtual ~GraphWidget(); - void addGraphData(std::tr1::shared_ptr<GraphData> data); - void getExtents(double& left, double& right, double& top, double& bottom) const; - void setExtents(double left, double right, double top, double bottom); - double getLineWidth() { return _lineWidth; } - void setLineWidth(double lineWidth) { _lineWidth = lineWidth; } - bool getAutoScaling() const { return _autoScaling; } - void setAutoScaling(bool val) { _autoScaling = val; } - std::string getTitle() const { return _title; } - void setTitle(const std::string& title) { _title = title; } - std::string getXAxisText() const { return _xAxisText; } - void setXAxisText(const std::string& text) { _xAxisText = text; } - std::string getYAxisText() const { return _yAxisText; } - void setYAxisText(const std::string& text) { _yAxisText = text; } + void addGraphData(std::tr1::shared_ptr<GraphDataBase> data); + protected: + typedef std::vector<std::tr1::shared_ptr<Graph> > GraphList; + GraphList _graphs; + // For click and drag + std::tr1::shared_ptr<Graph> _activeGraph; + // Dragging all graphs simultaneously, or perhaps seperately + typedef std::vector<std::pair<double, double> > DragList; + DragList dragCoords; //Override default signal handler: virtual bool on_expose_event(GdkEventExpose* event); virtual bool on_motion_notify_event(GdkEventMotion* event); @@ -38,25 +34,11 @@ namespace systemtap virtual bool on_button_release_event(GdkEventButton* event); virtual bool on_scroll_event(GdkEventScroll* event); bool on_timeout(); - typedef std::vector<std::tr1::shared_ptr<GraphData> > DatasetList; - DatasetList _datasets; - double _left; - double _right; - double _top; - double _bottom; - double _lineWidth; - bool _autoScaling; - bool _autoScrolling; - double _zoomFactor; bool _trackingDrag; double _dragOriginX; double _dragOriginY; double _dragOrigLeft; double _dragOrigRight; - std::string _title; - std::string _xAxisText; - std::string _yAxisText; - std::tr1::shared_ptr<CairoPlayButton> _playButton; }; } #endif // SYSTEMTAP_GRAPHWIDGET_H |