X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fgtkmm2ext%2Ffastmeter.h;h=dbb3296c4653fe30c0d0844d7f3bc980d3edc134;hb=4c2ea510e3e69197715ae3f7ca3bea7bc97084c0;hp=80707489637ea65442d236e526cb4900abef54cb;hpb=11c49ab8d12d0de6e21f7ca86d3d4a1bea7e74d5;p=ardour.git diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index 8070748963..dbb3296c46 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -24,12 +24,13 @@ #include #include #include -#include -#include +#include "gtkmm2ext/cairo_widget.h" + +#include "gtkmm2ext/visibility.h" namespace Gtkmm2ext { -class FastMeter : public Gtk::DrawingArea { +class LIBGTKMM2EXT_API FastMeter : public CairoWidget { public: enum Orientation { Horizontal, @@ -51,6 +52,7 @@ class FastMeter : public Gtk::DrawingArea { int styleflags = 3 ); virtual ~FastMeter (); + static void flush_pattern_cache(); void set (float level, float peak = -1); void clear (); @@ -65,7 +67,7 @@ class FastMeter : public Gtk::DrawingArea { bool get_highlight () { return highlight; } protected: - bool on_expose_event (GdkEventExpose*); + void render (cairo_t *, cairo_rectangle_t*); void on_size_request (GtkRequisition*); void on_size_allocate (Gtk::Allocation&); private: @@ -94,12 +96,12 @@ private: float current_user_level; bool highlight; - bool vertical_expose (GdkEventExpose*); + void vertical_expose (cairo_t*, cairo_rectangle_t*); void vertical_size_request (GtkRequisition*); void vertical_size_allocate (Gtk::Allocation&); void queue_vertical_redraw (const Glib::RefPtr&, float); - bool horizontal_expose (GdkEventExpose*); + void horizontal_expose (cairo_t*, cairo_rectangle_t*); void horizontal_size_request (GtkRequisition*); void horizontal_size_allocate (Gtk::Allocation&); void queue_horizontal_redraw (const Glib::RefPtr&, float);