Properly revert FormatSpec changes on "cancel"
[ardour.git] / gtk2_ardour / meter_strip.h
index dfeb406976232548f1aa1fe988a3d20f04cf2cf3..a877ab998c31a25619f1d8ef626d79d99ae7be6c 100644 (file)
 #define __ardour_meter_strip__
 
 #include <vector>
-
 #include <cmath>
 
+#include <gtkmm/alignment.h>
+#include <gtkmm/box.h>
+#include <gtkmm/drawingarea.h>
+#include <gtkmm/eventbox.h>
+#include <gtkmm/separator.h>
+
 #include "pbd/stateful.h"
 
 #include "ardour/types.h"
 #include "ardour/ardour.h"
-#include "route_ui.h"
-#include "ardour_button.h"
+
+#include "widgets/ardour_button.h"
 
 #include "level_meter.h"
+#include "route_ui.h"
 
 namespace ARDOUR {
        class Route;
        class RouteGroup;
        class Session;
 }
-namespace Gtk {
-       class Window;
-       class Style;
-}
 
-class MeterStrip : public Gtk::VBox, public RouteUI
+class MeterStrip : public Gtk::VBox, public AxisView, public RouteUI
 {
-  public:
+public:
        MeterStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>);
        MeterStrip (int, ARDOUR::MeterType);
        ~MeterStrip ();
 
+       std::string name() const;
+       Gdk::Color color () const;
+
+       boost::shared_ptr<ARDOUR::Stripable> stripable() const { return RouteUI::stripable(); }
+
        void set_session (ARDOUR::Session* s);
        void fast_update ();
        boost::shared_ptr<ARDOUR::Route> route() { return _route; }
@@ -72,7 +79,9 @@ class MeterStrip : public Gtk::VBox, public RouteUI
        bool is_metric_display() { return _strip_type == 0; }
        ARDOUR::MeterType meter_type();
 
-  protected:
+       bool selected() const { return false; }
+
+protected:
        boost::shared_ptr<ARDOUR::Route> _route;
        PBD::ScopedConnectionList meter_route_connections;
        PBD::ScopedConnectionList level_meter_connection;
@@ -92,7 +101,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
        std::string state_id() const;
        void set_button_names ();
 
-  private:
+private:
        Gtk::VBox mtr_vbox;
        Gtk::VBox nfo_vbox;
        Gtk::EventBox mtr_container;
@@ -101,8 +110,8 @@ class MeterStrip : public Gtk::VBox, public RouteUI
        Gtk::HBox spacer;
        Gtk::HBox namebx;
        Gtk::VBox namenumberbx;
-       ArdourButton name_label;
-       ArdourButton number_label;
+       ArdourWidgets::ArdourButton name_label;
+       ArdourWidgets::ArdourButton number_label;
        Gtk::DrawingArea meter_metric_area;
        Gtk::DrawingArea meter_ticks1_area;
        Gtk::DrawingArea meter_ticks2_area;
@@ -117,7 +126,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
        Gtk::Alignment peak_align;
        Gtk::HBox peakbx;
        Gtk::VBox btnbox;
-       ArdourButton peak_display;
+       ArdourWidgets::ArdourButton peak_display;
 
        std::vector<ARDOUR::DataType> _types;
        ARDOUR::MeterType metric_type;
@@ -130,7 +139,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
 
        LevelMeterHBox *level_meter;
 
-       void strip_property_changed (const PBD::PropertyChange&);
+       void route_property_changed (const PBD::PropertyChange&);
        void meter_configuration_changed (ARDOUR::ChanCount);
        void meter_type_changed (ARDOUR::MeterType);
        void update_background (ARDOUR::MeterType);