X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Froute_group.h;h=feeac6a467cba170104ff4f87888ef191377c6cd;hb=653ae4acd639fef149314fe6f8c7a0d862afae40;hp=22e527ff9e19feec9c9167e95cc8ae8f15224fa6;hpb=932b0e9ec1d0f7fb506ccd13bf08a4efe5f91297;p=ardour.git diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 22e527ff9e..feeac6a467 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -25,28 +25,31 @@ #include #include +#include "pbd/controllable.h" #include "pbd/signals.h" #include "pbd/stateful.h" -#include "pbd/signals.h" +#include "ardour/control_group.h" #include "ardour/types.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor relative; - extern PBD::PropertyDescriptor active; - extern PBD::PropertyDescriptor gain; - extern PBD::PropertyDescriptor mute; - extern PBD::PropertyDescriptor solo; - extern PBD::PropertyDescriptor recenable; - extern PBD::PropertyDescriptor select; - extern PBD::PropertyDescriptor edit; - extern PBD::PropertyDescriptor route_active; - extern PBD::PropertyDescriptor color; + LIBARDOUR_API extern PBD::PropertyDescriptor relative; + LIBARDOUR_API extern PBD::PropertyDescriptor active; + LIBARDOUR_API extern PBD::PropertyDescriptor gain; + LIBARDOUR_API extern PBD::PropertyDescriptor mute; + LIBARDOUR_API extern PBD::PropertyDescriptor solo; + LIBARDOUR_API extern PBD::PropertyDescriptor recenable; + LIBARDOUR_API extern PBD::PropertyDescriptor select; + LIBARDOUR_API extern PBD::PropertyDescriptor route_active; + LIBARDOUR_API extern PBD::PropertyDescriptor color; + LIBARDOUR_API extern PBD::PropertyDescriptor monitoring; /* we use this, but its declared in region.cc */ - extern PBD::PropertyDescriptor hidden; + LIBARDOUR_API extern PBD::PropertyDescriptor hidden; }; class Route; @@ -54,7 +57,14 @@ class Track; class AudioTrack; class Session; -class RouteGroup : public SessionObject +/** A group identifier for routes. + * + * RouteGroups permit to define properties which are shared + * among all Routes that use the given identifier. + * + * A route can at most be in one group. + */ +class LIBARDOUR_API RouteGroup : public SessionObject { public: static void make_property_quarks(); @@ -70,9 +80,9 @@ class RouteGroup : public SessionObject bool is_solo () const { return _solo.val(); } bool is_recenable () const { return _recenable.val(); } bool is_select () const { return _select.val(); } - bool is_edit () const { return _edit.val(); } bool is_route_active () const { return _route_active.val(); } bool is_color () const { return _color.val(); } + bool is_monitoring() const { return _monitoring.val(); } bool empty() const {return routes->empty();} size_t size() const { return routes->size();} @@ -89,9 +99,9 @@ class RouteGroup : public SessionObject void set_solo (bool yn); void set_recenable (bool yn); void set_select (bool yn); - void set_edit (bool yn); void set_route_active (bool yn); void set_color (bool yn); + void set_monitoring (bool yn); bool enabled_property (PBD::PropertyID); @@ -107,7 +117,7 @@ class RouteGroup : public SessionObject /* to use these, #include "ardour/route_group_specialized.h" */ - template void apply (void (Track::*func)(T, void *), T val, void *src); + template void apply (void (Track::*func)(T, PBD::Controllable::GroupControlDisposition), T val, PBD::Controllable::GroupControlDisposition); /* fills at_set with all members of the group that are AudioTracks */ @@ -118,6 +128,7 @@ class RouteGroup : public SessionObject changed(); } + bool has_subgroup() const; void make_subgroup (bool, Placement); void destroy_subgroup (); @@ -132,7 +143,7 @@ class RouteGroup : public SessionObject int set_state (const XMLNode&, int version); -private: + private: boost::shared_ptr routes; boost::shared_ptr subgroup_bus; @@ -144,12 +155,21 @@ private: PBD::Property _solo; PBD::Property _recenable; PBD::Property _select; - PBD::Property _edit; PBD::Property _route_active; PBD::Property _color; + PBD::Property _monitoring; + + boost::shared_ptr _solo_group; + boost::shared_ptr _mute_group; + boost::shared_ptr _rec_enable_group; + boost::shared_ptr _gain_group; + boost::shared_ptr _monitoring_group; void remove_when_going_away (boost::weak_ptr); int set_state_2X (const XMLNode&, int); + + void post_set (PBD::PropertyChange const &); + void push_to_groups (); }; } /* namespace */