diff options
Diffstat (limited to 'gtk2_ardour/cairo_widget.h')
-rw-r--r-- | gtk2_ardour/cairo_widget.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk2_ardour/cairo_widget.h b/gtk2_ardour/cairo_widget.h new file mode 100644 index 0000000000..99f0d5d8c3 --- /dev/null +++ b/gtk2_ardour/cairo_widget.h @@ -0,0 +1,27 @@ +#ifndef __gtk2_ardour_cairo_widget_h__ +#define __gtk2_ardour_cairo_widget_h__ + +#include <gtkmm/eventbox.h> + +class CairoWidget : public Gtk::EventBox +{ +public: + CairoWidget (); + virtual ~CairoWidget (); + + void set_dirty (); + +protected: + virtual void render (cairo_t *) = 0; + virtual bool on_expose_event (GdkEventExpose *); + void on_size_allocate (Gtk::Allocation &); + + int _width; ///< pixmap width + int _height; ///< pixmap height + +private: + bool _dirty; + GdkPixmap* _pixmap; +}; + +#endif |