1 #ifndef __ardour_mackie_control_protocol_strip_h__
2 #define __ardour_mackie_control_protocol_strip_h__
7 #include "pbd/property_basics.h"
8 #include "pbd/signals.h"
10 #include "control_protocol/types.h"
12 #include "control_group.h"
14 #include "midi_byte_array.h"
30 struct StripControlDefinition {
33 Control* (*factory)(Surface&, int index, const char* name, Group&);
36 struct GlobalControlDefinition {
39 Control* (*factory)(Surface&, int index, const char* name, Group&);
40 const char* group_name;
44 This is the set of controls that make up a strip.
46 class Strip : public Group
49 Strip (Surface&, const std::string & name, int index, StripControlDefinition* ctls);
52 boost::shared_ptr<ARDOUR::Route> route() const { return _route; }
54 void add (Control & control);
55 int index() const { return _index; } // zero based
57 void set_route (boost::shared_ptr<ARDOUR::Route>);
59 // call all signal handlers manually
62 void handle_button (Button&, ButtonState bs);
63 void handle_fader (Fader&, float position);
64 void handle_pot (Pot&, float delta);
68 MidiByteArray display (uint32_t line_number, const std::string&);
69 MidiByteArray blank_display (uint32_t line_number);
70 MidiByteArray zero ();
72 void flip_mode_changed (bool notify=false);
74 void lock_controls ();
75 void unlock_controls ();
77 MidiByteArray gui_selection_changed (ARDOUR::RouteNotificationListPtr);
91 bool _controls_locked;
93 boost::shared_ptr<ARDOUR::Route> _route;
94 PBD::ScopedConnectionList route_connections;
96 float _last_gain_position_written;
97 float _last_pan_position_written;
99 void notify_solo_changed ();
100 void notify_mute_changed ();
101 void notify_record_enable_changed ();
102 void notify_gain_changed (bool force_update = true);
103 void notify_property_changed (const PBD::PropertyChange&);
104 void notify_panner_changed (bool force_update = true);
105 void notify_active_changed ();
106 void notify_route_deleted ();
108 void update_automation ();
109 void update_meter ();
111 std::string static_display_string () const;
116 #endif /* __ardour_mackie_control_protocol_strip_h__ */