X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fplaylist.h;h=55947a84a5779ac85494f50729c7812a26c83c5c;hb=6698f5f686bef82b0c9568558c83a3b9b3344700;hp=6e36d3120bee3aa273730468164a6dafebd5ad29;hpb=6edccc3070b813157ffcd4014ec8dd7fa6ed9ce7;p=ardour.git diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 6e36d3120b..55947a84a5 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -38,20 +38,22 @@ #include #include +#include #include #include +#include namespace ARDOUR { class Session; class Region; -class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_from_this { +class Playlist : public SessionObject, public boost::enable_shared_from_this { public: typedef list > RegionList; - Playlist (Session&, const XMLNode&, bool hidden = false); - Playlist (Session&, string name, bool hidden = false); + Playlist (Session&, const XMLNode&, DataType type, bool hidden = false); + Playlist (Session&, string name, DataType type, bool hidden = false); Playlist (boost::shared_ptr, string name, bool hidden = false); Playlist (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); @@ -66,8 +68,9 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f void release(); bool used () const { return _refcnt != 0; } - std::string name() const { return _name; } - void set_name (std::string str); + bool set_name (const string& str); + + const DataType& data_type() const { return _type; } bool frozen() const { return _frozen; } void set_frozen (bool yn); @@ -122,15 +125,11 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f void freeze (); void thaw (); - void raise_region (boost::shared_ptr); - void lower_region (boost::shared_ptr); void raise_region_to_top (boost::shared_ptr); void lower_region_to_bottom (boost::shared_ptr); uint32_t read_data_count() const { return _read_data_count; } - Session& session() { return _session; } - const PBD::ID& get_orig_diskstream_id () const { return _orig_diskstream_id; } void set_orig_diskstream_id (const PBD::ID& did) { _orig_diskstream_id = did; } @@ -138,6 +137,12 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f virtual bool destroy_region (boost::shared_ptr) = 0; + /* special case function used by UI selection objects, which have playlists that actually own the regions + within them. + */ + + void drop_regions (); + protected: friend class Session; @@ -163,8 +168,7 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f RegionList regions; /* the current list of regions in the playlist */ std::set > all_regions; /* all regions ever added to this playlist */ - string _name; - Session& _session; + DataType _type; mutable gint block_notifications; mutable gint ignore_state_changes; mutable Glib::Mutex region_lock; @@ -176,6 +180,7 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f bool save_on_thaw; string last_save_reason; uint32_t in_set_state; + bool first_set_state; bool _hidden; bool _splicing; bool _nudging; @@ -254,8 +259,6 @@ class Playlist : public PBD::StatefulDestructible, public boost::enable_shared_f boost::shared_ptr cut (nframes_t start, nframes_t cnt, bool result_is_hidden); boost::shared_ptr copy (nframes_t start, nframes_t cnt, bool result_is_hidden); - - int move_region_to_layer (layer_t, boost::shared_ptr r, int dir); void relayer (); void unset_freeze_parent (Playlist*);