ardour
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
RegionSelection Class Reference

#include <region_selection.h>

Inheritance diagram for RegionSelection:
MidiRegionSelection

Public Member Functions

 RegionSelection ()
 
 RegionSelection (const RegionSelection &)
 
RegionSelectionoperator= (const RegionSelection &)
 
bool add (RegionView *)
 
bool remove (RegionView *)
 
void sort_by_position_and_track ()
 
bool contains (RegionView *) const
 
bool involves (const TimeAxisView &) const
 
void clear_all ()
 
framepos_t start () const
 
framepos_t end_frame () const
 
const std::list< RegionView * > & by_layer () const
 
void by_position (std::list< RegionView * > &) const
 
void by_track (std::list< RegionView * > &) const
 
size_t n_midi_regions () const
 
std::set< boost::shared_ptr
< ARDOUR::Playlist > > 
playlists () const
 

Public Attributes

std::list< PBD::IDpending
 

Private Member Functions

void remove_it (RegionView *)
 
void add_to_layer (RegionView *)
 

Private Attributes

std::list< RegionView * > _bylayer
 list of regions sorted by layer More...
 
PBD::ScopedConnection death_connection
 

Detailed Description

Class to represent list of selected regions.

Definition at line 37 of file region_selection.h.

Constructor & Destructor Documentation

RegionSelection::RegionSelection ( )

Construct an empty RegionSelection.

Definition at line 35 of file region_selection.cc.

RegionSelection::RegionSelection ( const RegionSelection other)

Copy constructor.

Parameters
otherRegionSelection to copy.

Definition at line 43 of file region_selection.cc.

Member Function Documentation

bool RegionSelection::add ( RegionView rv)

Add a region to the selection.

Parameters
rvRegion to add.
Returns
false if we already had the region or if it cannot be added, otherwise true.

Definition at line 96 of file region_selection.cc.

void RegionSelection::add_to_layer ( RegionView rv)
private

Add a region to the list sorted by layer.

Parameters
rvRegion to add.

Definition at line 154 of file region_selection.cc.

const std::list<RegionView *>& RegionSelection::by_layer ( ) const
inline

Definition at line 60 of file region_selection.h.

void RegionSelection::by_position ( std::list< RegionView * > &  foo) const
Parameters
fooList which will be filled with the selection's regions sorted by position.

Definition at line 184 of file region_selection.cc.

void RegionSelection::by_track ( std::list< RegionView * > &  foo) const
Parameters
Listwhich will be filled with the selection's regions sorted by track and position.

Definition at line 216 of file region_selection.cc.

void RegionSelection::clear_all ( )

Empty this RegionSelection.

Definition at line 74 of file region_selection.cc.

bool RegionSelection::contains ( RegionView rv) const
Parameters
rvRegionView.
Returns
true if this selection contains rv.

Definition at line 85 of file region_selection.cc.

framepos_t RegionSelection::end_frame ( ) const

Definition at line 270 of file region_selection.cc.

bool RegionSelection::involves ( const TimeAxisView tv) const
Parameters
tvTrack.
Returns
true if any of the selection's regions are on tv.

Definition at line 244 of file region_selection.cc.

size_t RegionSelection::n_midi_regions ( ) const

Definition at line 293 of file region_selection.cc.

RegionSelection & RegionSelection::operator= ( const RegionSelection other)

operator= to set a RegionSelection to be the same as another.

Parameters
otherOther RegionSelection.

Definition at line 57 of file region_selection.cc.

set< boost::shared_ptr< Playlist > > RegionSelection::playlists ( ) const
Returns
the playlists that the regions in the selection are on

Definition at line 282 of file region_selection.cc.

bool RegionSelection::remove ( RegionView rv)

Remove a region from the selection.

Parameters
rvRegion to remove.
Returns
true if the region was in the selection, false if not.

Definition at line 134 of file region_selection.cc.

void RegionSelection::remove_it ( RegionView rv)
private

Remove a region from the selection.

Parameters
rvRegion to remove.

Definition at line 124 of file region_selection.cc.

void RegionSelection::sort_by_position_and_track ( )
Parameters
Sortthe selection by position and track.

Definition at line 233 of file region_selection.cc.

framepos_t RegionSelection::start ( void  ) const

Definition at line 255 of file region_selection.cc.

Member Data Documentation

std::list<RegionView *> RegionSelection::_bylayer
private

list of regions sorted by layer

Definition at line 74 of file region_selection.h.

PBD::ScopedConnection RegionSelection::death_connection
private

Definition at line 75 of file region_selection.h.

std::list<PBD::ID> RegionSelection::pending

Definition at line 67 of file region_selection.h.


The documentation for this class was generated from the following files: