summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-02-11 17:08:34 +0000
committerCarl Hetherington <carl@carlh.net>2010-02-11 17:08:34 +0000
commit3a27410dcbaaca10480ffc14770b41c11e9ca1da (patch)
tree0b017597b99f3279dc3981033382a4d3f18a2b14 /libs/ardour/ardour
parent24fbade20a831fe629ed9bbc1d68a33ac1bd4d74 (diff)
More tinkering with State<>. Use some StateDiffCommands instead of
MementoCommand<Region>. More use of State<> for Region members. git-svn-id: svn://localhost/ardour2/branches/3.0@6675 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/ardour.h1
-rw-r--r--libs/ardour/ardour/region.h14
-rw-r--r--libs/ardour/ardour/session_object.h14
3 files changed, 17 insertions, 12 deletions
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h
index a7b3bcafd0..403cf21007 100644
--- a/libs/ardour/ardour/ardour.h
+++ b/libs/ardour/ardour/ardour.h
@@ -70,6 +70,7 @@ namespace ARDOUR {
extern PBD::Change PositionChanged;
extern PBD::Change NameChanged;
extern PBD::Change BoundsChanged;
+ extern PBD::Change FlagsChanged;
static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index 414a1723f9..9c78285a09 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -314,21 +314,21 @@ class Region
virtual void recompute_at_end () = 0;
DataType _type;
- Flag _flags;
+ PBD::EnumState<Flag> _flags;
PBD::State<nframes_t> _start;
- nframes_t _length;
+ PBD::State<nframes_t> _length;
nframes_t _last_length;
PBD::State<nframes_t> _position;
nframes_t _last_position;
PositionLockStyle _positional_lock_style;
- nframes_t _sync_position;
+ PBD::State<nframes_t> _sync_position;
PBD::State<layer_t> _layer;
mutable RegionEditState _first_edit;
int _frozen;
- nframes64_t _ancestral_start;
- nframes64_t _ancestral_length;
- float _stretch;
- float _shift;
+ PBD::State<nframes64_t> _ancestral_start;
+ PBD::State<nframes64_t> _ancestral_length;
+ PBD::State<float> _stretch;
+ PBD::State<float> _shift;
BBT_Time _bbt_time;
AnalysisFeatureList _transients;
bool _valid_transients;
diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h
index 47caab5475..cf9ccbb3a7 100644
--- a/libs/ardour/ardour/session_object.h
+++ b/libs/ardour/ardour/session_object.h
@@ -26,6 +26,8 @@
#include "ardour/session_handle.h"
+#include "i18n.h"
+
namespace ARDOUR {
class Session;
@@ -39,11 +41,13 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible
public:
SessionObject (Session& session, const std::string& name)
: SessionHandleRef (session)
- , _name(name)
- {}
+ , _name (X_("name"), PBD::Change (0), "")
+ {
+ add_state (_name);
+ }
- Session& session() const { return _session; }
- const std::string& name() const { return _name; }
+ Session& session() const { return _session; }
+ std::string name() const { return _name; }
virtual bool set_name (const std::string& str) {
if (_name != str) {
@@ -56,7 +60,7 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible
PBD::Signal0<void> NameChanged;
protected:
- std::string _name;
+ PBD::State<std::string> _name;
};
} // namespace ARDOUR