fix merge conflict from master
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / fastmeter.h
index 3a806262f1c8d75f4d4880423d0042dd0f989767..80707489637ea65442d236e526cb4900abef54cb 100644 (file)
@@ -68,7 +68,6 @@ protected:
        bool on_expose_event (GdkEventExpose*);
        void on_size_request (GtkRequisition*);
        void on_size_allocate (Gtk::Allocation&);
-
 private:
 
        Cairo::RefPtr<Cairo::Pattern> fgpattern;
@@ -96,19 +95,30 @@ private:
        bool highlight;
 
        bool vertical_expose (GdkEventExpose*);
+       void vertical_size_request (GtkRequisition*);
+       void vertical_size_allocate (Gtk::Allocation&);
        void queue_vertical_redraw (const Glib::RefPtr<Gdk::Window>&, float);
 
+       bool horizontal_expose (GdkEventExpose*);
+       void horizontal_size_request (GtkRequisition*);
+       void horizontal_size_allocate (Gtk::Allocation&);
+       void queue_horizontal_redraw (const Glib::RefPtr<Gdk::Window>&, float);
+
        static bool no_rgba_overlay;
 
        static Cairo::RefPtr<Cairo::Pattern> generate_meter_pattern (
-               int, int, int *, float *, int);
+               int, int, int *, float *, int, bool);
        static Cairo::RefPtr<Cairo::Pattern> request_vertical_meter (
                int, int, int *, float *, int);
+       static Cairo::RefPtr<Cairo::Pattern> request_horizontal_meter (
+               int, int, int *, float *, int);
 
        static Cairo::RefPtr<Cairo::Pattern> generate_meter_background (
-               int, int, int *, bool);
+               int, int, int *, bool, bool);
        static Cairo::RefPtr<Cairo::Pattern> request_vertical_background (
                int, int, int *, bool);
+       static Cairo::RefPtr<Cairo::Pattern> request_horizontal_background (
+               int, int, int *, bool);
 
        struct Pattern10MapKey {
                Pattern10MapKey (
@@ -137,20 +147,24 @@ private:
        typedef std::map<Pattern10MapKey, Cairo::RefPtr<Cairo::Pattern> > Pattern10Map;
 
        struct PatternBgMapKey {
-               PatternBgMapKey (int w, int h, int c0, int c1)
+               PatternBgMapKey (int w, int h, int c0, int c1, bool shade)
                        : dim(w, h)
                        , cols(c0, c1)
+                       , sh(shade)
                {}
                inline bool operator<(const PatternBgMapKey& rhs) const {
-                       return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols);
+                       return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols) || (dim == rhs.dim && cols == rhs.cols && (sh && !rhs.sh));
                }
                boost::tuple<int, int> dim;
                boost::tuple<int, int> cols;
+               bool sh;
        };
        typedef std::map<PatternBgMapKey, Cairo::RefPtr<Cairo::Pattern> > PatternBgMap;
 
        static Pattern10Map vm_pattern_cache;
        static PatternBgMap vb_pattern_cache;
+       static Pattern10Map hm_pattern_cache;
+       static PatternBgMap hb_pattern_cache;
        static int min_pattern_metric_size; // min dimension for axis that displays the meter level
        static int max_pattern_metric_size; // max dimension for axis that displays the meter level
 };