summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/presentation_info.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-10 13:50:19 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-06-10 13:57:18 -0400
commit2d4358ddb5e9cf3cd21b603b74dc999aaebf53a2 (patch)
tree156fb8fa0d0e182cacece8d112cb4dec3fd3f5aa /libs/ardour/ardour/presentation_info.h
parent3eaa6c038988776e3bab441b84de45b2a8364130 (diff)
Various changes to PresentationInfo and a small consolidation of sorters.
The semantics for sorting PresentationInfo are up to the caller, not the PresentationInfo object, so operator<() was removed and callers specifically invoke ::order() for sorting.
Diffstat (limited to 'libs/ardour/ardour/presentation_info.h')
-rw-r--r--libs/ardour/ardour/presentation_info.h32
1 files changed, 10 insertions, 22 deletions
diff --git a/libs/ardour/ardour/presentation_info.h b/libs/ardour/ardour/presentation_info.h
index 8a3c367448..91238e6537 100644
--- a/libs/ardour/ardour/presentation_info.h
+++ b/libs/ardour/ardour/presentation_info.h
@@ -128,6 +128,7 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
StatusMask = (Selected|Hidden)
};
+ static const Flag AllStripables; /* mask to use for any route or VCA (but not auditioner) */
static const Flag AllRoutes; /* mask to use for any route include master+monitor, but not auditioner */
static const Flag Route; /* mask for any route (bus or track */
static const Flag Track; /* mask to use for any track */
@@ -142,6 +143,7 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
static const order_t max_order;
+ PresentationInfo::Flag flags() const { return _flags; }
order_t order() const { return _order; }
color_t color() const { return _color; }
@@ -150,8 +152,7 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
void set_color (color_t);
void set_selected (bool yn);
void set_hidden (bool yn);
-
- PresentationInfo::Flag flags() const { return _flags; }
+ void set_flags (Flag f) { _flags = f; }
bool order_set() const { return _flags & OrderSet; }
@@ -159,18 +160,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
bool selected() const { return _flags & Selected; }
bool special() const { return _flags & (MasterOut|MonitorOut|Auditioner); }
- void set_flag (PresentationInfo::Flag f) {
- _flags = PresentationInfo::Flag (_flags | f);
- }
-
- void unset_flag (PresentationInfo::Flag f) {
- _flags = PresentationInfo::Flag (_flags & ~f);
- }
-
- void set_flags (Flag f) {
- _flags = f;
- }
-
bool flag_match (Flag f) const {
/* no flags, match all */
@@ -209,6 +198,13 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
return true;
}
+ if (f == AllStripables && (_flags & AllStripables)) {
+ /* any kind of stripable, but not auditioner. Ask for that
+ specifically.
+ */
+ return true;
+ }
+
/* compare without status mask - we already checked that above
*/
@@ -218,14 +214,6 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
int set_state (XMLNode const&, int);
XMLNode& get_state ();
- bool operator< (PresentationInfo const& other) const {
- return order() < other.order();
- }
-
- bool match (PresentationInfo const& other) const {
- return (_order == other.order()) && flag_match (other.flags());
- }
-
bool operator==(PresentationInfo const& other) {
return (_order == other.order()) && (_flags == other.flags());
}