summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-19 22:02:30 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-19 22:02:30 +0000
commit2592a320d42dd4a157ee16101c042d875d3142be (patch)
tree0409a06f1ef030dc9339c5c17bd3ff1854125256 /libs/ardour/ardour/region.h
parent0c31e4c4f3d0bfe37d26a793c934f1b436f8fa0f (diff)
major changes to Region, AudioRegion, Playlist, AudioPlaylist and Crossfade state management, to try to fix undo/redo. Not finished, butthe speedups etc. are in place
git-svn-id: svn://localhost/ardour2/trunk@993 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/region.h')
-rw-r--r--libs/ardour/ardour/region.h29
1 files changed, 4 insertions, 25 deletions
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index 30cd3267df..67e00d0ee8 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -28,7 +28,6 @@
#include <pbd/statefuldestructible.h>
#include <ardour/ardour.h>
-#include <ardour/state_manager.h>
class XMLNode;
@@ -42,21 +41,7 @@ enum RegionEditState {
EditChangesID = 2
};
-struct RegionState : public StateManager::State
-{
- RegionState (std::string why) : StateManager::State (why) {}
-
- nframes_t _start;
- nframes_t _length;
- nframes_t _position;
- uint32_t _flags;
- nframes_t _sync_position;
- layer_t _layer;
- string _name;
- mutable RegionEditState _first_edit;
-};
-
-class Region : public PBD::StatefulDestructible, public StateManager, public boost::enable_shared_from_this<Region>
+class Region : public PBD::StatefulDestructible, public boost::enable_shared_from_this<Region>
{
public:
enum Flag {
@@ -92,6 +77,8 @@ class Region : public PBD::StatefulDestructible, public StateManager, public boo
static Change LayerChanged;
static Change HiddenChanged;
+ sigc::signal<void,Change> StateChanged;
+
virtual ~Region();
/* Note: changing the name of a Region does not constitute an edit */
@@ -176,8 +163,6 @@ class Region : public PBD::StatefulDestructible, public StateManager, public boo
ARDOUR::Playlist* playlist() const { return _playlist; }
- virtual UndoAction get_memento() const = 0;
-
void set_playlist (ARDOUR::Playlist*);
virtual void lock_sources () {}
@@ -188,6 +173,7 @@ class Region : public PBD::StatefulDestructible, public StateManager, public boo
XMLNode& get_state ();
virtual XMLNode& state (bool);
virtual int set_state (const XMLNode&);
+ virtual int set_live_state (const XMLNode&, Change&, bool send);
virtual boost::shared_ptr<Region> get_parent() = 0;
@@ -207,15 +193,8 @@ class Region : public PBD::StatefulDestructible, public StateManager, public boo
protected:
XMLNode& get_short_state (); /* used only by Session */
- /* state management */
-
void send_change (Change);
- /* derived classes need these during their own state management calls */
-
- void store_state (RegionState&) const;
- Change restore_and_return_flags (RegionState&);
-
void trim_to_internal (nframes_t position, nframes_t length, void *src);
bool copied() const { return _flags & Copied; }