globally remove all trailing whitespace from ardour code base.
[ardour.git] / libs / surfaces / mackie / strip.h
index 684d3a210898b0671927f0962be861d8f4037f2f..4099dce8afa9bb1e0f9112642ee8ef0978d44567 100644 (file)
@@ -7,6 +7,7 @@
 #include "evoral/Parameter.hpp"
 
 #include "pbd/property_basics.h"
+#include "pbd/ringbuffer.h"
 #include "pbd/signals.h"
 
 #include "ardour/types.h"
@@ -23,6 +24,8 @@ namespace ARDOUR {
        class ChannelCount;
 }
 
+namespace ArdourSurface {
+
 namespace Mackie {
 
 class Control;
@@ -33,15 +36,9 @@ class Fader;
 class Meter;
 class SurfacePort;
 
-struct StripControlDefinition {
-    const char* name;
-    uint32_t base_id;
-    Control* (*factory)(Surface&, int index, const char* name, Group&);
-};
-
 struct GlobalControlDefinition {
     const char* name;
-    uint32_t id;
+    int id;
     Control* (*factory)(Surface&, int index, const char* name, Group&);
     const char* group_name;
 };
@@ -67,9 +64,11 @@ public:
 
        void handle_button (Button&, ButtonState bs);
        void handle_fader (Fader&, float position);
+       void handle_fader_touch (Fader&, bool touch_on);
        void handle_pot (Pot&, float delta);
 
        void periodic (uint64_t now_usecs);
+       void redisplay ();
 
        MidiByteArray display (uint32_t line_number, const std::string&);
        MidiByteArray blank_display (uint32_t line_number);
@@ -80,8 +79,11 @@ public:
 
        void lock_controls ();
        void unlock_controls ();
-       
-       void gui_selection_changed (ARDOUR::RouteNotificationListPtr);
+       bool locked() const { return _controls_locked; }
+
+       void gui_selection_changed (const ARDOUR::StrongRouteNotificationList&);
+
+       void notify_metering_state_changed();
 
 private:
        Button*  _solo;
@@ -96,6 +98,8 @@ private:
        int      _index;
        Surface* _surface;
        bool     _controls_locked;
+       bool     _transport_is_rolling;
+       bool     _metering_active;
        uint64_t _reset_display_at;
        boost::shared_ptr<ARDOUR::Route> _route;
        PBD::ScopedConnectionList route_connections;
@@ -122,7 +126,16 @@ private:
        void queue_display_reset (uint32_t msecs);
        void clear_display_reset ();
        void reset_display ();
+
+       struct RedisplayRequest {
+               ARDOUR::AutomationType type;
+               float val;
+       };
+
+       RingBuffer<RedisplayRequest> redisplay_requests;
+
        void do_parameter_display (ARDOUR::AutomationType, float val);
+       void queue_parameter_display (ARDOUR::AutomationType, float val);
        
        typedef std::map<std::string,boost::shared_ptr<ARDOUR::Bundle> > BundleMap;
        BundleMap input_bundles;
@@ -145,6 +158,7 @@ private:
        std::map<Evoral::Parameter,Control*> control_by_parameter;
 };
 
+}
 }
 
 #endif /* __ardour_mackie_control_protocol_strip_h__ */