major design changes: use glib event loop for MIDI thread/UI; rework design of BaseUI...
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / fastmeter.h
index 775cb201cd21a6957731b745638b6ce813fcf293..2bf4539d877393bb39562af028580c4ac308859a 100644 (file)
@@ -32,10 +32,10 @@ class FastMeter : public Gtk::DrawingArea {
                Vertical
        };
        
-       FastMeter (long hold_cnt, unsigned long width, Orientation);
+       FastMeter (long hold_cnt, unsigned long width, Orientation, int len=0, int clrb0=0x00ff00, int clr1=0xffff00, int clr2=0xffaa00, int clr3=0xff0000);
        virtual ~FastMeter ();
        
-       void set (float level, float user_level=0.0f);
+       void set (float level);
        void clear ();
 
        float get_level() { return current_level; }
@@ -55,9 +55,11 @@ class FastMeter : public Gtk::DrawingArea {
        Glib::RefPtr<Gdk::Pixbuf> pixbuf;
        gint pixheight;
        gint pixwidth;
+       static int _clr0, _clr1, _clr2, _clr3;
 
        Orientation orientation;
        GdkRectangle pixrect;
+       GdkRectangle last_peak_rect;
        gint request_width;
        gint request_height;
        unsigned long hold_cnt;
@@ -68,7 +70,9 @@ class FastMeter : public Gtk::DrawingArea {
        
        bool vertical_expose (GdkEventExpose*);
        bool horizontal_expose (GdkEventExpose*);
-       
+       void queue_vertical_redraw (const Glib::RefPtr<Gdk::Window>&, float);
+       void queue_horizontal_redraw (const Glib::RefPtr<Gdk::Window>&, float);
+
        static Glib::RefPtr<Gdk::Pixbuf> request_vertical_meter(int w, int h);
 
        static Glib::RefPtr<Gdk::Pixbuf> *v_pixbuf_cache;