00001 #ifndef _GRAPHWIDGET_H
00002 #define _GRAPHWIDGET_H
00003
00004 #include <gtkmm/drawingarea.h>
00005 #include <list>
00006 #include "../util/Vector.h"
00007
00010 class GraphWidget : public Gtk::DrawingArea
00011 {
00012 public:
00018 GraphWidget(size_t maxVectors, double intBorder, int height = 100);
00019
00021 virtual ~GraphWidget();
00022
00024 void addData(const Vector3d &v);
00025
00031 void resize(size_t width, int height);
00032
00033
00034 private:
00035 virtual bool on_expose_event(GdkEventExpose* event);
00036 virtual bool on_timeout();
00037
00038 typedef std::list<Vector3d> VectorList;
00039 VectorList m_vectors;
00040 size_t m_maxVectors;
00041 double m_step;
00042 double m_intervalBorder;
00043 };
00044
00045 #endif