summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-09-19 10:42:09 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-09-19 10:42:09 +0000
commit21ea541267361b03c66a9cc330b7c862d7bc8e85 (patch)
tree24c23aca13597cfadea84b98c9f8a857f4894282 /libs
parent959907af01dd398fd45ee28413d37f5516ce6047 (diff)
shift-click to extend marker selection; marker drag moves all selected markers
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3758 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/location.h19
-rw-r--r--libs/ardour/audioanalyser.cc2
-rw-r--r--libs/ardour/location.cc13
-rw-r--r--libs/ardour/utils.cc1
4 files changed, 26 insertions, 9 deletions
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index 53d9489823..d5b672a89d 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -100,14 +100,15 @@ class Location : public PBD::StatefulDestructible
void set_is_end (bool yn, void* src);
void set_is_start (bool yn, void* src);
- bool is_auto_punch () { return _flags & IsAutoPunch; }
- bool is_auto_loop () { return _flags & IsAutoLoop; }
- bool is_mark () { return _flags & IsMark; }
- bool is_hidden () { return _flags & IsHidden; }
- bool is_cd_marker () { return _flags & IsCDMarker; }
- bool is_end() { return _flags & IsEnd; }
- bool is_start() { return _flags & IsStart; }
- bool is_range_marker() { return _flags & IsRangeMarker; }
+ bool is_auto_punch () const { return _flags & IsAutoPunch; }
+ bool is_auto_loop () const { return _flags & IsAutoLoop; }
+ bool is_mark () const { return _flags & IsMark; }
+ bool is_hidden () const { return _flags & IsHidden; }
+ bool is_cd_marker () const { return _flags & IsCDMarker; }
+ bool is_end() const { return _flags & IsEnd; }
+ bool is_start() const { return _flags & IsStart; }
+ bool is_range_marker() const { return _flags & IsRangeMarker; }
+ bool matches (Flags f) const { return _flags & f; }
sigc::signal<void,Location*> name_changed;
sigc::signal<void,Location*> end_changed;
@@ -175,6 +176,8 @@ class Locations : public PBD::StatefulDestructible
nframes_t first_mark_before (nframes_t, bool include_special_ranges = false);
nframes_t first_mark_after (nframes_t, bool include_special_ranges = false);
+ void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags);
+
sigc::signal<void,Location*> current_changed;
sigc::signal<void> changed;
sigc::signal<void,Location*> added;
diff --git a/libs/ardour/audioanalyser.cc b/libs/ardour/audioanalyser.cc
index 98c4206301..ab3691d8d1 100644
--- a/libs/ardour/audioanalyser.cc
+++ b/libs/ardour/audioanalyser.cc
@@ -10,6 +10,8 @@
#include <ardour/readable.h>
#include <ardour/readable.h>
+#include <cstring>
+
#include "i18n.h"
using namespace std;
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index ebebc68b7f..61471ee5b0 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -924,3 +924,16 @@ Locations::get_location_by_id(PBD::ID id)
return 0;
}
+
+void
+Locations::find_all_between (nframes64_t start, nframes64_t end, LocationList& ll, Location::Flags flags)
+{
+ Glib::Mutex::Lock lm (lock);
+
+ for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
+ if ((flags == 0 || (*i)->matches (flags)) &&
+ ((*i)->start() >= start && (*i)->end() < end)) {
+ ll.push_back (*i);
+ }
+ }
+}
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index eaf5d474d7..45d77f46a5 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -20,7 +20,6 @@
#include <cstdio> /* for sprintf */
#include <cmath>
#include <cctype>
-#include <string>
#include <cstring>
#include <cerrno>
#include <iostream>