diff options
author | Dave Brolley <brolley@redhat.com> | 2009-04-21 11:11:02 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-04-21 11:11:02 -0400 |
commit | 09fd19d66b9e3318e9e33f604eb2dbe623955123 (patch) | |
tree | 073dc18e4ca3ca4bac674c7225a9a54e5fafc7f7 /grapher/CairoWidget.hxx | |
parent | d4935c2f80122827a02d9f66c020d7e8ef6d6ade (diff) | |
parent | 9a6d143c6e2c79cee1082d0455da92cfa78b03c7 (diff) | |
download | systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.gz systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.xz systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts:
aclocal.m4
configure
Diffstat (limited to 'grapher/CairoWidget.hxx')
-rw-r--r-- | grapher/CairoWidget.hxx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/grapher/CairoWidget.hxx b/grapher/CairoWidget.hxx new file mode 100644 index 00000000..077a4c7a --- /dev/null +++ b/grapher/CairoWidget.hxx @@ -0,0 +1,42 @@ +#ifndef SYSTEMTAP_CAIROWIDGET_H +#define SYSTEMTAP_CAIROWIDGET_H 1 + +#include <cairomm/context.h> +namespace systemtap +{ + class CairoWidget + { + public: + CairoWidget(bool visible = false) + : _visible(visible), _size(50.0), _radius(5) + {} + bool isVisible() const { return _visible; } + void setVisible(bool visible) { _visible = visible; } + void getOrigin(double &x, double &y) const + { + x = _x0; + y = _y0; + } + void setOrigin(double x, double y) + { + _x0 = x; + _y0 = y; + } + virtual void draw(Cairo::RefPtr<Cairo::Context> cr) = 0; + virtual bool containsPoint(double x, double y) { return false; } + protected: + bool _visible; + double _x0; + double _y0; + double _size; + double _radius; + }; + + class CairoPlayButton : public CairoWidget + { + public: + virtual void draw(Cairo::RefPtr<Cairo::Context> cr); + virtual bool containsPoint(double x, double y); + }; +} +#endif |