13
0
livetrax/gtk2_ardour/cairo_widget.h

28 lines
489 B
C
Raw Normal View History

#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