Allow group gain sharing + VCA again
[ardour.git] / libs / ardour / ardour / playlist.h
index 1530eede9fcda1012b704cb49afd1c67a98432a9..26c664b0f2c29ca0880de013289b5da31d397136 100644 (file)
@@ -117,6 +117,13 @@ public:
 
        bool hidden() const { return _hidden; }
        bool empty() const;
+
+       bool shared () const { return !_shared_with_ids.empty(); }
+       void share_with (const PBD::ID&);
+       void unshare_with (const PBD::ID&);
+       bool shared_with (const PBD::ID&) const;
+       void reset_shares ();
+
        uint32_t n_regions() const;
        bool all_regions_empty() const;
        std::pair<framepos_t, framepos_t> get_extent () const;
@@ -128,14 +135,14 @@ public:
 
        /* Editing operations */
 
-       void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, const int32_t sub_num = 0);
+       void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, int32_t sub_num = 0, double quarter_note = 0.0, bool for_music = false);
        void remove_region (boost::shared_ptr<Region>);
        void get_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void get_region_list_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void get_source_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, framepos_t pos);
-       void split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
-       void split (framepos_t at, const int32_t sub_num);
+       void split_region (boost::shared_ptr<Region>, const MusicFrame& position);
+       void split (const MusicFrame& at);
        void shift (framepos_t at, frameoffset_t distance, bool move_intersected, bool ignore_music_glue);
        void partition (framepos_t start, framepos_t end, bool cut = false);
        void duplicate (boost::shared_ptr<Region>, framepos_t position, float times);
@@ -278,7 +285,7 @@ public:
        PBD::ScopedConnectionList region_state_changed_connections;
        PBD::ScopedConnectionList region_drop_references_connections;
        DataType        _type;
-       int             _sort_id;
+       uint32_t        _sort_id;
        mutable gint    block_notifications;
        mutable gint    ignore_state_changes;
        std::set<boost::shared_ptr<Region> > pending_adds;
@@ -311,6 +318,7 @@ public:
        uint32_t         subcnt;
        PBD::ID         _orig_track_id;
        uint32_t        _combine_ops;
+       std::list<PBD::ID> _shared_with_ids;
 
        void init (bool hide);
 
@@ -364,7 +372,7 @@ public:
 
        virtual XMLNode& state (bool);
 
-       bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num = 0);
+       bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, int32_t sub_num = 0, double quarter_note = 0.0, bool for_music = false);
 
        int remove_region_internal (boost::shared_ptr<Region>);
        void copy_regions (RegionList&) const;
@@ -382,7 +390,7 @@ public:
        void begin_undo ();
        void end_undo ();
 
-       void _split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
+       virtual void _split_region (boost::shared_ptr<Region>, const MusicFrame& position);
 
        typedef std::pair<boost::shared_ptr<Region>, boost::shared_ptr<Region> > TwoRegions;