GENERATE_SET_CTRL_FUNCTION (solo)
GENERATE_SET_CTRL_FUNCTION (rec)
GENERATE_SET_CTRL_FUNCTION (pan)
+GENERATE_SET_CTRL_FUNCTION (x_select)
#undef GENERATE_SET_CTRL_FUNCTION
+// special case -- w/_select_plugin_functor
+void
+FP8Strip::set_select_controllable (boost::shared_ptr<AutomationControl> ac)
+{
+ _select_plugin_functor.clear ();
+ set_x_select_controllable (ac);
+}
+
+void
+FP8Strip::set_select_cb (boost::function<void ()>& functor)
+{
+ set_select_controllable (boost::shared_ptr<AutomationControl>());
+ _select_plugin_functor = functor;
+}
+
void
FP8Strip::unset_controllables (int which)
{
set_pan_controllable (boost::shared_ptr<AutomationControl>());
}
if (which & CTRL_SELECT) {
- _select_plugin_functor.clear ();
+ set_select_controllable (boost::shared_ptr<AutomationControl>());
select_button ().set_color (0xffffffff);
select_button ().set_active (false);
select_button ().set_blinking (false);
_peak_meter = s->peak_meter ();
_redux_ctrl = s->comp_redux_controllable ();
- _select_plugin_functor.clear ();
+ set_select_controllable (boost::shared_ptr<AutomationControl>());
select_button ().set_active (s->is_selected ());
select_button ().set_color (s->presentation_info ().color());
//select_button ().set_blinking (false);
set_text_line (0x03, "");
}
-void
-FP8Strip::set_select_cb (boost::function<void ()>& functor)
-{
- _select_plugin_functor.clear ();
- _select_plugin_functor = functor;
-}
-
/* *****************************************************************************
* Parse Strip Specifig MIDI Events
*/
FP8Strip::set_recarm ()
{
if (_rec_ctrl) {
- const bool on = !recarm_button().is_active();
+ const bool on = !recarm_button ().is_active();
_rec_ctrl->set_value (on ? 1.0 : 0.0, group_mode ());
}
}
-
void
FP8Strip::set_select ()
{
if (!_select_plugin_functor.empty ()) {
+ assert (!_x_select_ctrl);
_select_plugin_functor ();
+ } else if (_x_select_ctrl) {
+ if (!_x_select_ctrl->touching ()) {
+ _x_select_ctrl->start_touch (_x_select_ctrl->session().transport_frame());
+ }
+ const bool on = !select_button ().is_active();
+ _x_select_ctrl->set_value (on ? 1.0 : 0.0, group_mode ());
}
}
void
FP8Strip::notify_pan_changed ()
{
+ // display only
+}
+
+void
+FP8Strip::notify_x_select_changed ()
+{
+ if (!_select_plugin_functor.empty ()) {
+ assert (!_x_select_ctrl);
+ return;
+ }
+
+ if (_x_select_ctrl) {
+ assert (_select_plugin_functor.empty ());
+ select_button ().set_active (_x_select_ctrl->get_value() > 0.);
+ select_button ().set_color (0xffff00ff);
+ select_button ().set_blinking (false);
+ } else {
+ ; // leave alone.
+ }
}
/* *****************************************************************************
void unset_controllables (int which = CTRL_ALL);
- void set_fader_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
- void set_mute_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
- void set_solo_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
- void set_rec_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
- void set_pan_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_fader_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_mute_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_solo_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_rec_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_pan_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
+ void set_select_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
private:
FP8Base& _base;
boost::shared_ptr<ARDOUR::AutomationControl> _solo_ctrl;
boost::shared_ptr<ARDOUR::AutomationControl> _rec_ctrl;
boost::shared_ptr<ARDOUR::AutomationControl> _pan_ctrl;
+ boost::shared_ptr<ARDOUR::AutomationControl> _x_select_ctrl;
PBD::ScopedConnection _fader_connection;
PBD::ScopedConnection _mute_connection;
PBD::ScopedConnection _solo_connection;
PBD::ScopedConnection _rec_connection;
PBD::ScopedConnection _pan_connection;
+ PBD::ScopedConnection _x_select_connection;
boost::shared_ptr<ARDOUR::PeakMeter> _peak_meter;
boost::shared_ptr<ARDOUR::ReadOnlyControl> _redux_ctrl;
+
+ void set_x_select_controllable (boost::shared_ptr<ARDOUR::AutomationControl>);
boost::function<void ()> _select_plugin_functor;
PBD::Controllable::GroupControlDisposition group_mode () const;
void notify_mute_changed ();
void notify_rec_changed ();
void notify_pan_changed ();
+ void notify_x_select_changed ();
/* actions, update model */
void set_mute (bool);