summaryrefslogtreecommitdiffstats
path: root/grapher/GraphWidget.hxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-01 12:26:59 +0100
committerTim Moore <timoore@redhat.com>2009-12-01 12:36:55 +0100
commitd293d53136fa7e6e7eda510847145edf4d3d7f55 (patch)
tree50d5969dec90938cc7efd42e9aea5bfcf5aa6bae /grapher/GraphWidget.hxx
parent572a176d481c329b370ce52e7bec1a49ed76c225 (diff)
downloadsystemtap-steved-d293d53136fa7e6e7eda510847145edf4d3d7f55.tar.gz
systemtap-steved-d293d53136fa7e6e7eda510847145edf4d3d7f55.tar.xz
systemtap-steved-d293d53136fa7e6e7eda510847145edf4d3d7f55.zip
Add hover text to the graph.
When the graph display is paused, leaving the mouse stationary over the graph will display the data point under the pointer. * grapher/CairoWidget.hxx (CairoTextBox): new class (CairoWidget, CairoPlayButton): refector some play button-specific things from CairoWidget to CairoPlayButton. * grapher/CairoWidget.cxx (CairoTextBox::draw): new function. * grapher/GraphWidget.hxx (GraphWidget): new members for supporting hover text. * grapher/GraphWidget.cxx (on_motion_notify_event): Set up hover text box. (establishHoverTimeout, onHoverTimeout, getGraphUnderPoint): new functions.
Diffstat (limited to 'grapher/GraphWidget.hxx')
-rw-r--r--grapher/GraphWidget.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx
index 876b6e09..61d50e70 100644
--- a/grapher/GraphWidget.hxx
+++ b/grapher/GraphWidget.hxx
@@ -65,8 +65,15 @@ namespace systemtap
void onDataAdd();
void onDataRemove();
void onDataDialogOpen();
+ bool onHoverTimeout();
DataModelColumns _dataColumns;
Glib::RefPtr<Gtk::ListStore> _listStore;
+ sigc::connection _hover_timeout_connection;
+ std::tr1::shared_ptr<CairoTextBox> _hoverText;
+ double _mouseX;
+ double _mouseY;
+ std::tr1::shared_ptr<Graph> getGraphUnderPoint(double x, double y);
+ void establishHoverTimeout();
};
}
#endif // SYSTEMTAP_GRAPHWIDGET_H