diff options
Diffstat (limited to 'grapher/Graph.hxx')
-rw-r--r-- | grapher/Graph.hxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx index c928fec2..efabd22d 100644 --- a/grapher/Graph.hxx +++ b/grapher/Graph.hxx @@ -16,46 +16,46 @@ namespace systemtap { - class Graph : public CairoWidget - { - public: - friend class GraphWidget; - Graph(double x = 0.0, double y = 0.0); - 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(int64_t& left, int64_t& right, double& top, double& bottom) - const; - void setExtents(int64_t left, int64_t 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; - double _xOffset; - double _yOffset; - std::tr1::shared_ptr<CairoPlayButton> _playButton; - int64_t _timeBase; - GraphDataList& getDatasets() { return _datasets; } - int64_t getTimeAtPoint(double x); - void window2GraphCoords(double x, double y, double& xgraph, double& ygraph); - protected: - GraphDataList _datasets; - int64_t _left; - int64_t _right; - double _top; - double _bottom; - }; +class Graph : public CairoWidget +{ +public: + friend class GraphWidget; + Graph(double x = 0.0, double y = 0.0); + 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(int64_t& left, int64_t& right, double& top, double& bottom) + const; + void setExtents(int64_t left, int64_t 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; + double _xOffset; + double _yOffset; + std::tr1::shared_ptr<CairoPlayButton> _playButton; + int64_t _timeBase; + GraphDataList& getDatasets() { return _datasets; } + int64_t getTimeAtPoint(double x); + void window2GraphCoords(double x, double y, double& xgraph, double& ygraph); +protected: + GraphDataList _datasets; + int64_t _left; + int64_t _right; + double _top; + double _bottom; +}; } #endif |