diff options
author | Sampo Savolainen <v2@iki.fi> | 2006-06-07 21:21:21 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2006-06-07 21:21:21 +0000 |
commit | 9d01165d3d9a163a9a70a8fe3fae4c66987bb86d (patch) | |
tree | 3412405e567d26f77d1f452fad7f5df63362f4e9 /libs/gtkmm2ext/gtkmm2ext/fastmeter.h | |
parent | d6cf62e911afb45c28873718972744ded3efc533 (diff) |
Dynamically generated meter gradients
git-svn-id: svn://localhost/ardour2/trunk@570 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext/fastmeter.h')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/fastmeter.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index c59e85b674..d624f29afb 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -46,23 +46,16 @@ class FastMeter : public Gtk::DrawingArea { long hold_count() { return hold_cnt; } void set_hold_count (long); - static void set_horizontal_xpm (std::string); - static void set_vertical_xpm (std::string); - protected: bool on_expose_event (GdkEventExpose*); void on_size_request (GtkRequisition*); + void on_size_allocate (Gtk::Allocation&); private: - static std::string h_image_path; - static std::string v_image_path; - static Glib::RefPtr<Gdk::Pixbuf> h_pixbuf; - static gint h_pixheight; - static gint h_pixwidth; - static Glib::RefPtr<Gdk::Pixbuf> v_pixbuf; - static gint v_pixheight; - static gint v_pixwidth; + Glib::RefPtr<Gdk::Pixbuf> pixbuf; + gint pixheight; + gint pixwidth; Orientation orientation; GdkRectangle pixrect; @@ -76,6 +69,18 @@ class FastMeter : public Gtk::DrawingArea { bool vertical_expose (GdkEventExpose*); bool horizontal_expose (GdkEventExpose*); + + static Glib::RefPtr<Gdk::Pixbuf> request_vertical_meter(int); + + static Glib::RefPtr<Gdk::Pixbuf> *v_pixbuf_cache; + static int min_v_pixbuf_size; + static int max_v_pixbuf_size; + + static Glib::RefPtr<Gdk::Pixbuf> request_horizontal_meter(int); + + static Glib::RefPtr<Gdk::Pixbuf> *h_pixbuf_cache; + static int min_h_pixbuf_size; + static int max_h_pixbuf_size; }; |