From 03ebf81c360e429ef1e4f8bae48fe524f712589a Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Thu, 3 Dec 2009 19:31:08 +0100 Subject: Hover text for event-style graphs Don't draw the data value for an event; only display it in hover text. * grapher/Graph.hxx (window2GraphCoords): new function * grapher/Graph.cxx (window2GraphCoords): ditto * grapher/GraphStyle.cxx (GraphStyleEvent::dataIndexAtPoint): new function implementation. --- grapher/GraphStyle.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'grapher/GraphStyle.hxx') diff --git a/grapher/GraphStyle.hxx b/grapher/GraphStyle.hxx index 9625f451..ce75d698 100644 --- a/grapher/GraphStyle.hxx +++ b/grapher/GraphStyle.hxx @@ -48,6 +48,10 @@ namespace systemtap public: void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr); + virtual ssize_t dataIndexAtPoint(double x, double y, + std::tr1::shared_ptr + graphData, + std::tr1::shared_ptr graph); static GraphStyleEvent instance; }; } -- cgit