diff options
author | Tim Moore <timoore@redhat.com> | 2009-07-29 13:11:10 +0200 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-09-30 20:25:36 +0200 |
commit | bb91631807ad833a92d011895ad7ca1872e02745 (patch) | |
tree | cf3c8f2611a27ade0f0b792c40a0533dc030145e /grapher/GraphWidget.hxx | |
parent | 27993a166c3ff2c33f778da4d96726666aadfab9 (diff) | |
download | systemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.tar.gz systemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.tar.xz systemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.zip |
Draw multiple graphs
* grapher/Graph.cxx (Graph constructor): Initialize graph dimensions.
(draw): Don't clear the drawing area.
* grapher/GraphWidget.hxx (GraphWidget): Add dimensions and
on_size_request() method.
* grapher/GraphWidget.cxx (GraphWidget constructor): Initialize
dimensions.
(addGraph): New method.
(on_size_request): New method to pass widget's size to parent widgets
* grapher/grapher.cxx (GrapherWindow constructor): add "add graph"
action.
(addGraph): New method.
Diffstat (limited to 'grapher/GraphWidget.hxx')
-rw-r--r-- | grapher/GraphWidget.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index c15f8fcd..25476f5f 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -18,6 +18,7 @@ namespace systemtap GraphWidget(); virtual ~GraphWidget(); void addGraphData(std::tr1::shared_ptr<GraphDataBase> data); + void addGraph(); protected: typedef std::vector<std::tr1::shared_ptr<Graph> > GraphList; @@ -34,11 +35,14 @@ namespace systemtap virtual bool on_button_release_event(GdkEventButton* event); virtual bool on_scroll_event(GdkEventScroll* event); bool on_timeout(); + virtual void on_size_request(Gtk::Requisition* req); bool _trackingDrag; double _dragOriginX; double _dragOriginY; double _dragOrigLeft; double _dragOrigRight; + double _width; + double _height; }; } #endif // SYSTEMTAP_GRAPHWIDGET_H |