diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-06 13:36:55 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-06 13:39:10 -0400 |
commit | 2047ee527c688ed2c2bedea79a7e01088da58d72 (patch) | |
tree | a9326585d3bfeb12c87e2879b7280e5368b18013 /libs/surfaces/control_protocol/control_protocol | |
parent | eed3ea5047ae50484542cacece0df1fd9db2e4d0 (diff) |
restore/extend/simplify ControlProtocol API to allow tracking of selection
Diffstat (limited to 'libs/surfaces/control_protocol/control_protocol')
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol/control_protocol.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h index 496ba99083..2485ca84ac 100644 --- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h +++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h @@ -39,6 +39,7 @@ namespace ARDOUR { class Route; class Session; class Bundle; +class Stripable; class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI { @@ -78,6 +79,12 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope static PBD::Signal0<void> StepTracksDown; static PBD::Signal0<void> StepTracksUp; + static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > AddStripableToSelection; + static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > SetStripableSelection; + static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > ToggleStripableSelection; + static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > RemoveStripableFromSelection; + static PBD::Signal0<void> ClearStripableSelection; + /* signals that one UI (e.g. the GUI) can emit to get all other UI's to respond. Typically this will always be GUI->"others" - the GUI pays no attention to these signals. @@ -85,6 +92,9 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope static PBD::Signal1<void,StripableNotificationListPtr> StripableSelectionChanged; + static boost::shared_ptr<ARDOUR::Stripable> first_selected_stripable (); + static void set_first_selected_stripable (boost::shared_ptr<ARDOUR::Stripable>); + /* the model here is as follows: we imagine most control surfaces being able to control @@ -132,6 +142,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope int set_state (XMLNode const &, int version); static const std::string state_node_name; + static StripableNotificationList const & last_selected() { return _last_selected; } protected: std::vector<boost::shared_ptr<ARDOUR::Route> > route_table; @@ -143,6 +154,14 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope private: LIBCONTROLCP_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */ bool _active; + + + static Glib::Threads::Mutex first_selected_mutex; + static boost::weak_ptr<ARDOUR::Stripable> _first_selected_stripable; + static StripableNotificationList _last_selected; + static void stripable_selection_changed (StripableNotificationListPtr); + static bool selection_connected; + static PBD::ScopedConnection selection_connection; }; extern "C" { |