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_group.h"
12 #include "midi_byte_array.h"
28 struct StripControlDefinition {
31 Control* (*factory)(Surface&, int index, const char* name, Group&);
34 struct GlobalControlDefinition {
37 Control* (*factory)(Surface&, int index, const char* name, Group&);
38 const char* group_name;
42 This is the set of controls that make up a strip.
44 class Strip : public Group
47 Strip (Surface&, const std::string & name, int index, StripControlDefinition* ctls);
50 boost::shared_ptr<ARDOUR::Route> route() const { return _route; }
52 void add (Control & control);
53 int index() const { return _index; } // zero based
55 void set_route (boost::shared_ptr<ARDOUR::Route>);
57 // call all signal handlers manually
60 void handle_button (Button&, ButtonState bs);
61 void handle_fader (Fader&, float position);
62 void handle_pot (Pot&, float delta);
66 MidiByteArray display (uint32_t line_number, const std::string&);
67 MidiByteArray blank_display (uint32_t line_number);
68 MidiByteArray zero ();
87 boost::shared_ptr<ARDOUR::Route> _route;
88 PBD::ScopedConnectionList route_connections;
90 float _last_fader_position_written;
91 float _last_vpot_position_written;
93 void notify_solo_changed ();
94 void notify_mute_changed ();
95 void notify_record_enable_changed ();
96 void notify_gain_changed (bool force_update = true);
97 void notify_property_changed (const PBD::PropertyChange&);
98 void notify_panner_changed (bool force_update = true);
99 void notify_active_changed ();
100 void notify_route_deleted ();
102 void update_automation ();
103 void update_meter ();
109 #endif /* __ardour_mackie_control_protocol_strip_h__ */