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;
/* 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);
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;
uint32_t subcnt;
PBD::ID _orig_track_id;
uint32_t _combine_ops;
+ std::list<PBD::ID> _shared_with_ids;
void init (bool hide);
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;
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;