#include <ardour/data_type.h>
#include <ardour/automatable.h>
#include <ardour/readable.h>
+#include <ardour/session_object.h>
class XMLNode;
EditChangesID = 2
};
-class Region : public Automatable, public boost::enable_shared_from_this<Region>, public Readable
+class Region
+ : public SessionObject
+ , public boost::enable_shared_from_this<Region>
+ , public Readable
{
public:
typedef std::vector<boost::shared_ptr<Source> > SourceList;
static Change HiddenChanged;
sigc::signal<void,Change> StateChanged;
+ static sigc::signal<void,boost::shared_ptr<ARDOUR::Region> > RegionPropertyChanged;
virtual ~Region();
nframes_t sync_offset(int& dir) const;
nframes_t sync_position() const;
+ nframes_t sync_point () const;
- nframes_t adjust_to_sync (nframes_t);
+ nframes_t adjust_to_sync (nframes_t) const;
/* first_frame() is an alias; last_frame() just hides some math */
std::vector<string> master_source_names();
void set_master_sources (const SourceList&);
+ /* automation */
+
+ virtual boost::shared_ptr<Evoral::Control>
+ control(const Evoral::Parameter& id, bool create=false) = 0;
+
+ virtual boost::shared_ptr<const Evoral::Control>
+ control(const Evoral::Parameter& id) const = 0;
+
/* serialization */
XMLNode& get_state ();
// no transients, but its OK
return 0;
}
+
+ virtual int separate_by_channel (ARDOUR::Session&,
+ std::vector< boost::shared_ptr<Region> >&) const {
+ return 0;
+ }
void invalidate_transients ();
const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags);
Region (boost::shared_ptr<const Region>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags);
+ Region (boost::shared_ptr<const Region>, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags);
Region (boost::shared_ptr<const Region>);
Region (boost::shared_ptr<Source> src, const XMLNode&);
Region (const SourceList& srcs, const XMLNode&);
Region (Session& s, nframes_t start, nframes_t length, const string& name, DataType, layer_t = 0, Flag flags = DefaultFlags);
protected:
+ void copy_stuff (boost::shared_ptr<const Region>, nframes_t start, nframes_t length, const string& name, layer_t, Flag flags);
+
XMLNode& get_short_state (); /* used only by Session */
void send_change (Change);