mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 18:16:35 +01:00
change the way ControlProtocols (control surfaces) are notified and handle Stripable selection changes
The Editor continues to notify them, but via a direct call to ControlProtocolManager, not a signal. The CP Manager calls the ControlProtocol static method to set up static data structures holding selection info for all surfaces and then notifies each surface/protocol that selection has changed.
This commit is contained in:
parent
efc2660fec
commit
eb3f50e15c
23 changed files with 64 additions and 83 deletions
|
|
@ -57,6 +57,8 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
|
|||
|
||||
virtual void midi_connectivity_established () {}
|
||||
|
||||
virtual void stripable_selection_changed () = 0;
|
||||
|
||||
PBD::Signal0<void> ActiveChanged;
|
||||
|
||||
/* signals that a control protocol can emit and other (presumably graphical)
|
||||
|
|
@ -85,13 +87,6 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
|
|||
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.
|
||||
*/
|
||||
|
||||
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>);
|
||||
|
||||
|
|
@ -146,6 +141,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
|
|||
|
||||
static const std::string state_node_name;
|
||||
static StripableNotificationList const & last_selected() { return _last_selected; }
|
||||
static void notify_stripable_selection_changed (StripableNotificationListPtr);
|
||||
|
||||
protected:
|
||||
std::vector<boost::shared_ptr<ARDOUR::Route> > route_table;
|
||||
|
|
@ -158,14 +154,10 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
|
|||
LIBCONTROLCP_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */
|
||||
bool _active;
|
||||
|
||||
|
||||
static Glib::Threads::Mutex special_stripable_mutex;
|
||||
static boost::weak_ptr<ARDOUR::Stripable> _leftmost_mixer_stripable;
|
||||
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" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue