#ifndef SYSTEMTAP_GRAPHSTYLE_HXX #define SYSTEMTAP_GRAPHSTYLE_HXX 1 #include #include namespace systemtap { class GraphDataBase; class Graph; class GraphStyle { public: virtual void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr) = 0; virtual ssize_t dataIndexAtPoint(double x, double y, std::tr1::shared_ptr graphData, std::tr1::shared_ptr graph) { return -1; } }; class GraphStyleBar : public GraphStyle { public: void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr); static GraphStyleBar instance; ssize_t dataIndexAtPoint(double x, double y, std::tr1::shared_ptr graphData, std::tr1::shared_ptr graph); }; class GraphStyleDot : public GraphStyle { public: void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr); static GraphStyleDot instance; }; class GraphStyleEvent : public GraphStyle { public: void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr); static GraphStyleEvent instance; }; } #endif