13
0

Make a fair bit of Region's interface private.

git-svn-id: svn://localhost/ardour2/branches/3.0@11014 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-12-17 02:04:58 +00:00
parent 3d859a5ac6
commit 6c575f1385
2 changed files with 48 additions and 44 deletions

View File

@ -330,12 +330,38 @@ class Region
}
protected:
void send_change (const PBD::PropertyChange&);
virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
void post_set (const PBD::PropertyChange&);
virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
virtual void set_length_internal (framepos_t pos);
DataType _type;
PBD::Property<bool> _sync_marked;
PBD::Property<bool> _left_of_split;
PBD::Property<bool> _right_of_split;
PBD::Property<bool> _valid_transients;
PBD::Property<framepos_t> _start;
PBD::Property<framecnt_t> _length;
PBD::Property<framepos_t> _position;
/** Sync position relative to the start of our file */
PBD::Property<framepos_t> _sync_position;
PBD::Property<layer_t> _layer;
SourceList _sources;
/** Used when timefx are applied, so we can always use the original source */
SourceList _master_sources;
AnalysisFeatureList _transients;
boost::weak_ptr<ARDOUR::Playlist> _playlist;
private:
void mid_thaw (const PBD::PropertyChange&);
void trim_to_internal (framepos_t position, framecnt_t length);
virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
virtual void set_length_internal (framepos_t pos);
void modify_front (framepos_t new_position, bool reset_fade);
void modify_end (framepos_t new_position, bool reset_fade);
@ -350,8 +376,6 @@ class Region
virtual void recompute_at_start () = 0;
virtual void recompute_at_end () = 0;
DataType _type;
PBD::Property<bool> _muted;
PBD::Property<bool> _opaque;
PBD::Property<bool> _locked;
@ -359,18 +383,8 @@ class Region
PBD::Property<bool> _whole_file;
PBD::Property<bool> _import;
PBD::Property<bool> _external;
PBD::Property<bool> _sync_marked;
PBD::Property<bool> _left_of_split;
PBD::Property<bool> _right_of_split;
PBD::Property<bool> _hidden;
PBD::Property<bool> _position_locked;
PBD::Property<bool> _valid_transients;
PBD::Property<framepos_t> _start;
PBD::Property<framecnt_t> _length;
PBD::Property<framepos_t> _position;
/** Sync position relative to the start of our file */
PBD::Property<framepos_t> _sync_position;
PBD::Property<layer_t> _layer;
PBD::Property<framepos_t> _ancestral_start;
PBD::Property<framecnt_t> _ancestral_length;
PBD::Property<float> _stretch;
@ -381,24 +395,14 @@ class Region
framepos_t _last_position;
mutable RegionEditState _first_edit;
Timecode::BBT_Time _bbt_time;
AnalysisFeatureList _transients;
uint64_t _last_layer_op; ///< timestamp
SourceList _sources;
/** Used when timefx are applied, so we can always use the original source */
SourceList _master_sources;
/** true if this region has had its layer explicitly set since the playlist last relayered */
bool _pending_explicit_relayer;
boost::weak_ptr<ARDOUR::Playlist> _playlist;
virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
void register_properties ();
void post_set (const PBD::PropertyChange&);
protected:
void use_sources (SourceList const &);
};

View File

@ -160,24 +160,24 @@ Region::register_properties ()
}
#define REGION_DEFAULT_STATE(s,l) \
_muted (Properties::muted, false) \
, _opaque (Properties::opaque, true) \
, _locked (Properties::locked, false) \
, _automatic (Properties::automatic, false) \
, _whole_file (Properties::whole_file, false) \
, _import (Properties::import, false) \
, _external (Properties::external, false) \
, _sync_marked (Properties::sync_marked, false) \
_sync_marked (Properties::sync_marked, false) \
, _left_of_split (Properties::left_of_split, false) \
, _right_of_split (Properties::right_of_split, false) \
, _hidden (Properties::hidden, false) \
, _position_locked (Properties::position_locked, false) \
, _valid_transients (Properties::valid_transients, false) \
, _start (Properties::start, (s)) \
, _length (Properties::length, (l)) \
, _position (Properties::position, 0) \
, _sync_position (Properties::sync_position, (s)) \
, _layer (Properties::layer, 0) \
, _muted (Properties::muted, false) \
, _opaque (Properties::opaque, true) \
, _locked (Properties::locked, false) \
, _automatic (Properties::automatic, false) \
, _whole_file (Properties::whole_file, false) \
, _import (Properties::import, false) \
, _external (Properties::external, false) \
, _hidden (Properties::hidden, false) \
, _position_locked (Properties::position_locked, false) \
, _ancestral_start (Properties::ancestral_start, (s)) \
, _ancestral_length (Properties::ancestral_length, (l)) \
, _stretch (Properties::stretch, 1.0) \
@ -185,24 +185,24 @@ Region::register_properties ()
, _position_lock_style (Properties::position_lock_style, _type == DataType::AUDIO ? AudioTime : MusicTime)
#define REGION_COPY_STATE(other) \
_muted (Properties::muted, other->_muted) \
, _opaque (Properties::opaque, other->_opaque) \
, _locked (Properties::locked, other->_locked) \
, _automatic (Properties::automatic, other->_automatic) \
, _whole_file (Properties::whole_file, other->_whole_file) \
, _import (Properties::import, other->_import) \
, _external (Properties::external, other->_external) \
, _sync_marked (Properties::sync_marked, other->_sync_marked) \
_sync_marked (Properties::sync_marked, other->_sync_marked) \
, _left_of_split (Properties::left_of_split, other->_left_of_split) \
, _right_of_split (Properties::right_of_split, other->_right_of_split) \
, _hidden (Properties::hidden, other->_hidden) \
, _position_locked (Properties::position_locked, other->_position_locked) \
, _valid_transients (Properties::valid_transients, other->_valid_transients) \
, _start(Properties::start, other->_start) \
, _length(Properties::length, other->_length) \
, _position(Properties::position, other->_position) \
, _sync_position(Properties::sync_position, other->_sync_position) \
, _layer (Properties::layer, other->_layer) \
, _muted (Properties::muted, other->_muted) \
, _opaque (Properties::opaque, other->_opaque) \
, _locked (Properties::locked, other->_locked) \
, _automatic (Properties::automatic, other->_automatic) \
, _whole_file (Properties::whole_file, other->_whole_file) \
, _import (Properties::import, other->_import) \
, _external (Properties::external, other->_external) \
, _hidden (Properties::hidden, other->_hidden) \
, _position_locked (Properties::position_locked, other->_position_locked) \
, _ancestral_start (Properties::ancestral_start, other->_ancestral_start) \
, _ancestral_length (Properties::ancestral_length, other->_ancestral_length) \
, _stretch (Properties::stretch, other->_stretch) \