summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/location.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-11-12 22:23:01 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-11-12 22:23:01 +0000
commitb01bdb7e70f021da764e81a4b55722e746e4885d (patch)
tree3f22af0fc8399bedd6843f7a9a4383295ac7b3cb /libs/ardour/ardour/location.h
parent99d002dbdf2563bcad880628e7876aebe191ba0c (diff)
merged with trunk revs 2605-2627
git-svn-id: svn://localhost/ardour2/trunk@2628 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/location.h')
-rw-r--r--libs/ardour/ardour/location.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index 6625b7dbf5..5ffb716598 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -62,26 +62,34 @@ class Location : public PBD::StatefulDestructible
: _name (name),
_start (sample_start),
_end (sample_end),
- _flags (bits) { }
+ _flags (bits),
+ _locked (false) { }
Location () {
_start = 0;
_end = 0;
_flags = Flags (0);
+ _locked = false;
}
Location (const Location& other);
Location (const XMLNode&);
Location* operator= (const Location& other);
- nframes_t start() { return _start; }
- nframes_t end() { return _end; }
- nframes_t length() { return _end - _start; }
+ bool locked() const { return _locked; }
+ void lock() { _locked = true; changed (this); }
+ void unlock() { _locked = false; changed (this); }
+
+ nframes_t start() const { return _start; }
+ nframes_t end() const { return _end; }
+ nframes_t length() const { return _end - _start; }
int set_start (nframes_t s);
int set_end (nframes_t e);
int set (nframes_t start, nframes_t end);
+ int move_to (nframes_t pos);
+
const string& name() { return _name; }
void set_name (const string &str) { _name = str; name_changed(this); }
@@ -124,6 +132,7 @@ class Location : public PBD::StatefulDestructible
nframes_t _start;
nframes_t _end;
Flags _flags;
+ bool _locked;
void set_mark (bool yn);
bool set_flag_internal (bool yn, Flags flag);
@@ -136,7 +145,7 @@ class Locations : public PBD::StatefulDestructible
Locations ();
~Locations ();
-
+
void add (Location *, bool make_current = false);
void remove (Location *);
void clear ();
@@ -182,8 +191,8 @@ class Locations : public PBD::StatefulDestructible
private:
- LocationList locations;
- Location *current_location;
+ LocationList locations;
+ Location *current_location;
mutable Glib::Mutex lock;
int set_current_unlocked (Location *);