summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/automatable.h1
-rw-r--r--libs/ardour/ardour/debug.h1
-rw-r--r--libs/ardour/ardour/presentation_info.h14
-rw-r--r--libs/ardour/ardour/route.h5
-rw-r--r--libs/ardour/ardour/session.h7
-rw-r--r--libs/ardour/ardour/session_handle.h1
-rw-r--r--libs/ardour/ardour/stripable.h13
-rw-r--r--libs/ardour/ardour/vca.h6
8 files changed, 25 insertions, 23 deletions
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h
index ae2c8dd41f..cde527bed6 100644
--- a/libs/ardour/ardour/automatable.h
+++ b/libs/ardour/ardour/automatable.h
@@ -54,6 +54,7 @@ public:
boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id);
+ boost::shared_ptr<AutomationControl> automation_control (PBD::ID const & id) const;
boost::shared_ptr<AutomationControl> automation_control (const Evoral::Parameter& id) {
return automation_control (id, false);
}
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index eff8305bf1..61903cd724 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -72,6 +72,7 @@ namespace PBD {
LIBARDOUR_API extern DebugBits AudioEngine;
LIBARDOUR_API extern DebugBits Soundcloud;
LIBARDOUR_API extern DebugBits Butler;
+ LIBARDOUR_API extern DebugBits Selection;
LIBARDOUR_API extern DebugBits GenericMidi;
LIBARDOUR_API extern DebugBits BackendMIDI;
LIBARDOUR_API extern DebugBits BackendAudio;
diff --git a/libs/ardour/ardour/presentation_info.h b/libs/ardour/ardour/presentation_info.h
index 7c847e9fce..c508f8401a 100644
--- a/libs/ardour/ardour/presentation_info.h
+++ b/libs/ardour/ardour/presentation_info.h
@@ -93,11 +93,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
* change after construction (not strictly the constructor itself, but
* a more generalized notion of construction, as in "ready to use").
*
- * SELECTION
- *
- * When an object is selected, its _flags member will have the Selected
- * bit set.
- *
* VISIBILITY
*
* When an object is hidden, its _flags member will have the Hidden
@@ -119,13 +114,12 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
/* These are for sharing Stripable states between the GUI and other
* user interfaces/control surfaces
*/
- Selected = 0x100,
- Hidden = 0x200,
+ Hidden = 0x100,
/* single bit indicates that the group order is set */
OrderSet = 0x400,
/* special mask to delect out "state" bits */
- StatusMask = (Selected|Hidden),
+ StatusMask = (Hidden),
/* special mask to delect select type bits */
TypeMask = (AudioBus|AudioTrack|MidiTrack|MidiBus|VCA|MasterOut|MonitorOut|Auditioner)
};
@@ -152,7 +146,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
bool color_set() const;
void set_color (color_t);
- void set_selected (bool yn);
void set_hidden (bool yn);
void set_flags (Flag f) { _flags = f; }
@@ -161,7 +154,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
int selection_cnt() const { return _selection_cnt; }
bool hidden() const { return _flags & Hidden; }
- bool selected() const { return _flags & Selected; }
bool special() const { return _flags & (MasterOut|MonitorOut|Auditioner); }
bool flag_match (Flag f) const {
@@ -238,6 +230,7 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
*/
static PBD::Signal1<void,PBD::PropertyChange const &> Change;
+ static void send_static_change (const PBD::PropertyChange&);
static void make_property_quarks ();
@@ -270,7 +263,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
static PBD::PropertyChange _pending_static_changes;
static Glib::Threads::Mutex static_signal_lock;
static int _change_signal_suspended;
- static void send_static_change (const PBD::PropertyChange&);
static int selection_counter;
};
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 9313df2f0c..794f87d607 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -28,7 +28,6 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <glibmm/threads.h>
#include "pbd/fastlog.h"
@@ -89,9 +88,7 @@ class LIBARDOUR_API Route : public Stripable,
public Soloable,
public Muteable,
public Monitorable,
- public Automatable,
- public RouteGroupMember,
- public boost::enable_shared_from_this<Route>
+ public RouteGroupMember
{
public:
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index dfeb1d0834..f748adb15d 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -114,6 +114,7 @@ class Bundle;
class Butler;
class Click;
class ControllableDescriptor;
+class CoreSelection;
class Diskstream;
class ExportHandler;
class ExportStatus;
@@ -289,6 +290,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
return routes.reader ();
}
+ CoreSelection& selection () { return *_selection; }
+
/* because the set of Stripables consists of objects managed
* independently, in multiple containers within the Session (or objects
* owned by the session), we fill out a list in-place rather than
@@ -323,6 +326,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
bool io_name_is_legal (const std::string&) const;
boost::shared_ptr<Route> route_by_name (std::string) const;
boost::shared_ptr<Route> route_by_id (PBD::ID) const;
+ boost::shared_ptr<Stripable> stripable_by_id (PBD::ID) const;
boost::shared_ptr<Stripable> get_remote_nth_stripable (PresentationInfo::order_t n, PresentationInfo::Flag) const;
boost::shared_ptr<Route> get_remote_nth_route (PresentationInfo::order_t n) const;
boost::shared_ptr<Route> route_by_selected_count (uint32_t cnt) const;
@@ -1060,6 +1064,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
boost::shared_ptr<Processor> processor_by_id (PBD::ID) const;
boost::shared_ptr<PBD::Controllable> controllable_by_id (const PBD::ID&);
+ boost::shared_ptr<AutomationControl> automation_control_by_id (const PBD::ID&);
boost::shared_ptr<PBD::Controllable> controllable_by_descriptor (const ARDOUR::ControllableDescriptor&);
void add_controllable (boost::shared_ptr<PBD::Controllable>);
@@ -2088,6 +2093,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void rewire_selected_midi (boost::shared_ptr<MidiTrack>);
void rewire_midi_selection_ports ();
boost::weak_ptr<MidiTrack> current_midi_target;
+
+ CoreSelection* _selection;
};
diff --git a/libs/ardour/ardour/session_handle.h b/libs/ardour/ardour/session_handle.h
index 330f1805cd..804bf004c2 100644
--- a/libs/ardour/ardour/session_handle.h
+++ b/libs/ardour/ardour/session_handle.h
@@ -47,6 +47,7 @@ class LIBARDOUR_API SessionHandlePtr
virtual ~SessionHandlePtr () {}
virtual void set_session (ARDOUR::Session *);
+ virtual ARDOUR::Session* session() const { return _session; }
protected:
ARDOUR::Session* _session;
diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h
index 2484c26345..7298a4807e 100644
--- a/libs/ardour/ardour/stripable.h
+++ b/libs/ardour/ardour/stripable.h
@@ -25,9 +25,11 @@
#include <string>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
#include "pbd/signals.h"
+#include "ardour/automatable.h"
#include "ardour/presentation_info.h"
#include "ardour/session_object.h"
#include "ardour/libardour_visibility.h"
@@ -56,10 +58,13 @@ class RecordSafeControl;
* and behaviour of the object.
*/
-class LIBARDOUR_API Stripable : public SessionObject {
- public:
+class LIBARDOUR_API Stripable : public SessionObject,
+ public Automatable,
+ public boost::enable_shared_from_this<Stripable>
+{
+ public:
Stripable (Session& session, std::string const & name, PresentationInfo const &);
- virtual ~Stripable () {}
+ virtual ~Stripable ();
/* XXX
midi on/off
@@ -72,7 +77,7 @@ class LIBARDOUR_API Stripable : public SessionObject {
int set_state (XMLNode const&, int);
bool is_hidden() const { return _presentation_info.flags() & PresentationInfo::Hidden; }
- bool is_selected() const { return _presentation_info.flags() & PresentationInfo::Selected; }
+ bool is_selected() const;
PresentationInfo const & presentation_info () const { return _presentation_info; }
PresentationInfo& presentation_info () { return _presentation_info; }
diff --git a/libs/ardour/ardour/vca.h b/libs/ardour/ardour/vca.h
index 0977001927..5cf06e4d69 100644
--- a/libs/ardour/ardour/vca.h
+++ b/libs/ardour/ardour/vca.h
@@ -28,7 +28,6 @@
#include "pbd/controllable.h"
#include "pbd/statefuldestructible.h"
-#include "ardour/automatable.h"
#include "ardour/muteable.h"
#include "ardour/monitorable.h"
#include "ardour/recordable.h"
@@ -47,10 +46,9 @@ class MonitorControl;
class LIBARDOUR_API VCA : public Stripable,
public Soloable,
public Muteable,
- public Automatable,
public Recordable,
- public Monitorable,
- public boost::enable_shared_from_this<VCA> {
+ public Monitorable
+{
public:
VCA (Session& session, int32_t num, const std::string& name);
~VCA();