Pan: remove/consolidate parameter-descriptor

This commit is contained in:
Robin Gareus 2020-03-21 02:42:34 +01:00
parent efb63e1bf2
commit 60bcefd03d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
14 changed files with 9 additions and 65 deletions

View File

@ -928,7 +928,7 @@ Panner2dWindow::Panner2dWindow (boost::shared_ptr<PannerShell> p, int32_t h, uin
left_side.pack_start (button_box, false, false);
Gtk::Label* l = manage (new Label (
p->panner()->describe_parameter(PanWidthAutomation),
p->pannable()->describe_parameter(PanWidthAutomation),
Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
spinner_box.pack_start (*l, false, false);
spinner_box.pack_start (width_spinner, false, false);

View File

@ -1829,7 +1829,7 @@ RouteTimeAxisView::ensure_pan_views (bool show)
/* we don't already have an AutomationTimeAxisView for this parameter */
std::string const name = _route->panner()->describe_parameter (pan_control->parameter ());
std::string const name = _route->pannable()->describe_parameter (pan_control->parameter ());
boost::shared_ptr<AutomationTimeAxisView> t (
new AutomationTimeAxisView (_session,

View File

@ -64,7 +64,6 @@ public:
return ((_auto_state & Write) || ((_auto_state & (Touch | Latch)) && touching()));
}
void start_touch (double when);
void stop_touch (double when);
bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }

View File

@ -111,7 +111,6 @@ public:
AutoState automation_state() const;
virtual std::set<Evoral::Parameter> what_can_be_automated() const;
virtual std::string describe_parameter (Evoral::Parameter);
bool touching() const;

View File

@ -198,6 +198,12 @@ Automatable::describe_parameter (Evoral::Parameter param)
return _("Trim");
} else if (param.type() == MuteAutomation) {
return _("Mute");
} else if (param.type() == PanAzimuthAutomation) {
return _("Azimuth");
} else if (param.type() == PanWidthAutomation) {
return _("Width");
} else if (param.type() == PanElevationAutomation) {
return _("Elevation");
} else if (param.type() == MidiCCAutomation) {
return string_compose("Controller %1 [%2]", param.id(), int(param.channel()) + 1);
} else if (param.type() == MidiPgmChangeAutomation) {
@ -553,7 +559,7 @@ Automatable::control_factory(const Evoral::Parameter& param)
} else if (param.type() == PanAzimuthAutomation || param.type() == PanWidthAutomation || param.type() == PanElevationAutomation) {
Pannable* pannable = dynamic_cast<Pannable*>(this);
if (pannable) {
control = new PanControllable (_a_session, pannable->describe_parameter (param), pannable, param);
control = new PanControllable (_a_session, describe_parameter (param), pannable, param);
} else {
warning << "PanAutomation for non-Pannable" << endl;
}

View File

@ -92,12 +92,6 @@ Panner::what_can_be_automated() const
return _pannable->what_can_be_automated ();
}
string
Panner::describe_parameter (Evoral::Parameter p)
{
return _pannable->describe_parameter (p);
}
int
Panner::set_state (XMLNode const &, int)
{

View File

@ -351,17 +351,6 @@ Panner1in2out::what_can_be_automated() const
return s;
}
string
Panner1in2out::describe_parameter (Evoral::Parameter p)
{
switch (p.type()) {
case PanAzimuthAutomation:
return _("L/R");
default:
return _pannable->describe_parameter (p);
}
}
string
Panner1in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
{

View File

@ -56,7 +56,6 @@ class Panner1in2out : public Panner
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
std::string describe_parameter (Evoral::Parameter);
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
XMLNode& get_state ();

View File

@ -495,19 +495,6 @@ Panner2in2out::what_can_be_automated() const
return s;
}
string
Panner2in2out::describe_parameter (Evoral::Parameter p)
{
switch (p.type()) {
case PanAzimuthAutomation:
return _("L/R");
case PanWidthAutomation:
return _("Width");
default:
return _pannable->describe_parameter (p);
}
}
string
Panner2in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
{

View File

@ -62,7 +62,6 @@ class Panner2in2out : public Panner
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
std::string describe_parameter (Evoral::Parameter);
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
XMLNode& get_state ();

View File

@ -283,17 +283,6 @@ Pannerbalance::what_can_be_automated() const
return s;
}
string
Pannerbalance::describe_parameter (Evoral::Parameter p)
{
switch (p.type()) {
case PanAzimuthAutomation:
return _("L/R");
default:
return _pannable->describe_parameter (p);
}
}
string
Pannerbalance::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
{

View File

@ -54,7 +54,6 @@ class Pannerbalance : public Panner
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
std::string describe_parameter (Evoral::Parameter);
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
XMLNode& get_state ();

View File

@ -406,21 +406,6 @@ VBAPanner::what_can_be_automated() const
return s;
}
string
VBAPanner::describe_parameter (Evoral::Parameter p)
{
switch (p.type()) {
case PanAzimuthAutomation:
return _("Azimuth");
case PanWidthAutomation:
return _("Width");
case PanElevationAutomation:
return _("Elevation");
default:
return _pannable->describe_parameter (p);
}
}
string
VBAPanner::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
{

View File

@ -57,7 +57,6 @@ public:
void set_azimuth_elevation (double azimuth, double elevation);
std::string describe_parameter (Evoral::Parameter);
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
XMLNode& get_state ();