mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Add API to define related controls
This is intended to show connected controls that share automaton state, notably pannables
This commit is contained in:
parent
276adf292e
commit
32eb9b0520
3 changed files with 25 additions and 0 deletions
|
|
@ -124,6 +124,14 @@ public:
|
||||||
|
|
||||||
AutomationControlList grouped_controls () const;
|
AutomationControlList grouped_controls () const;
|
||||||
|
|
||||||
|
void add_visually_linked_control (std::shared_ptr<AutomationControl> ctrl) {
|
||||||
|
_visually_linked_ctrls.push_back (ctrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
WeakAutomationControlList visually_linked_controls () const {
|
||||||
|
return _visually_linked_ctrls;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ControlGroup> _group;
|
std::shared_ptr<ControlGroup> _group;
|
||||||
std::shared_ptr<ControlGroup> _pushed_group;
|
std::shared_ptr<ControlGroup> _pushed_group;
|
||||||
|
|
@ -150,6 +158,8 @@ protected:
|
||||||
|
|
||||||
void session_going_away ();
|
void session_going_away ();
|
||||||
|
|
||||||
|
WeakAutomationControlList _visually_linked_ctrls;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* I am unclear on why we have to make ControlGroup a friend in order
|
/* I am unclear on why we have to make ControlGroup a friend in order
|
||||||
to get access to the ::set_group() method when it is already
|
to get access to the ::set_group() method when it is already
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,13 @@ Pannable::Pannable (Session& s, Temporal::TimeDomainProvider const & tdp)
|
||||||
pan_width_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
pan_width_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
||||||
pan_frontback_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
pan_frontback_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
||||||
pan_lfe_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
pan_lfe_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
|
||||||
|
|
||||||
|
pan_azimuth_control->add_visually_linked_control (pan_width_control);
|
||||||
|
pan_azimuth_control->add_visually_linked_control (pan_elevation_control);
|
||||||
|
pan_width_control->add_visually_linked_control (pan_azimuth_control);
|
||||||
|
pan_width_control->add_visually_linked_control (pan_elevation_control);
|
||||||
|
pan_elevation_control->add_visually_linked_control (pan_azimuth_control);
|
||||||
|
pan_elevation_control->add_visually_linked_control (pan_width_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pannable::~Pannable ()
|
Pannable::~Pannable ()
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,14 @@ SurroundPannable::SurroundPannable (Session& s, uint32_t chn, Temporal::TimeDoma
|
||||||
pan_pos_z->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
pan_pos_z->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
||||||
pan_size->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
pan_size->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
||||||
pan_snap->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
pan_snap->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this));
|
||||||
|
|
||||||
|
/* all controls are visible together */
|
||||||
|
pan_pos_x->add_visually_linked_control (pan_pos_y);
|
||||||
|
pan_pos_x->add_visually_linked_control (pan_pos_z);
|
||||||
|
pan_pos_y->add_visually_linked_control (pan_pos_x);
|
||||||
|
pan_pos_y->add_visually_linked_control (pan_pos_z);
|
||||||
|
pan_pos_z->add_visually_linked_control (pan_pos_x);
|
||||||
|
pan_pos_z->add_visually_linked_control (pan_pos_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
SurroundPannable::~SurroundPannable ()
|
SurroundPannable::~SurroundPannable ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue