Ardour  9.0-pre0-350-gf17a656217
Selection Class Reference

Lists of selected things. More...

#include <selection.h>

Inheritance diagram for Selection:
[legend]

Public Types

enum  SelectionType { Object = 0x1 , Range = 0x2 }
 

Public Member Functions

MidiRegionSelection midi_regions ()
 
 Selection (EditingContext const *e, bool manage_libardour_selection)
 
void clear ()
 
bool empty (bool internal_selection=false)
 
void dump_region_layers ()
 
bool selected (TimeAxisView *) const
 
bool selected (RegionView *) const
 
bool selected (ArdourMarker *) const
 
bool selected (ControlPoint *) const
 
bool selected (TriggerEntry *) const
 
RegionSelection trigger_regionview_proxy () const
 
void set (std::list< Selectable * > const &)
 
void add (std::list< Selectable * > const &)
 
void toggle (std::list< Selectable * > const &)
 
void set (TimeAxisView *)
 
void set (const TrackViewList &)
 
void set (const MidiNoteSelection &)
 
void set (RegionView *, bool also_clear_tracks=true)
 
void set (std::vector< RegionView * > &)
 
long set (Temporal::timepos_t const &, Temporal::timepos_t const &)
 
void set_preserving_all_ranges (Temporal::timepos_t const &, Temporal::timepos_t const &)
 
void set (std::shared_ptr< Evoral::ControlList >)
 
void set (std::shared_ptr< ARDOUR::Playlist >)
 
void set (const std::list< std::shared_ptr< ARDOUR::Playlist > > &)
 
void set (ControlPoint *)
 
void set (ArdourMarker *)
 
void set (const RegionSelection &)
 
void set (TriggerEntry *)
 
void toggle (TimeAxisView *)
 
void toggle (const TrackViewList &)
 
void toggle (const MidiNoteSelection &)
 
void toggle (RegionView *)
 
void toggle (MidiCutBuffer *)
 
void toggle (std::vector< RegionView * > &)
 
long toggle (Temporal::timepos_t const &, Temporal::timepos_t const &)
 
void toggle (ARDOUR::AutomationList *)
 
void toggle (std::shared_ptr< ARDOUR::Playlist >)
 
void toggle (const std::list< std::shared_ptr< ARDOUR::Playlist > > &)
 
void toggle (ControlPoint *)
 
void toggle (std::vector< ControlPoint * > const &)
 
void toggle (ArdourMarker *)
 
void toggle (TriggerEntry *)
 
void add (TimeAxisView *)
 
void add (const TrackViewList &)
 
void add (const MidiNoteSelection &)
 
void add (RegionView *)
 
void add (MidiCutBuffer *)
 
void add (std::vector< RegionView * > &)
 
long add (Temporal::timepos_t const &, Temporal::timepos_t const &)
 
void add (std::shared_ptr< Evoral::ControlList >)
 
void add (std::shared_ptr< ARDOUR::Playlist >)
 
void add (const std::list< std::shared_ptr< ARDOUR::Playlist > > &)
 
void add (ControlPoint *)
 
void add (std::vector< ControlPoint * > const &)
 
void add (ArdourMarker *)
 
void add (const std::list< ArdourMarker * > &)
 
void add (const RegionSelection &)
 
void add (const PointSelection &)
 
void add (TriggerEntry *)
 
void remove (TimeAxisView *)
 
void remove (const TrackViewList &)
 
void remove (const MidiNoteSelection &)
 
void remove (RegionView *)
 
void remove (std::vector< RegionView * >)
 
void remove (MidiCutBuffer *)
 
void remove (uint32_t selection_id)
 
void remove (samplepos_t, samplepos_t)
 
void remove (std::shared_ptr< ARDOUR::AutomationList >)
 
void remove (std::shared_ptr< ARDOUR::Playlist >)
 
void remove (const std::list< std::shared_ptr< ARDOUR::Playlist > > &)
 
void remove (const std::list< Selectable * > &)
 
void remove (ArdourMarker *)
 
void remove (ControlPoint *)
 
void remove (TriggerEntry *)
 
void remove_regions (TimeAxisView *)
 
void move_time (Temporal::timecnt_t const &)
 
void replace (uint32_t time_index, Temporal::timepos_t const &start, Temporal::timepos_t const &end)
 
void clear_all ()
 
void clear_time (bool with_signal=true)
 
void clear_tracks (bool with_signal=true)
 
void clear_objects (bool with_signal=true)
 
void clear_regions (bool with_signal=true)
 
void clear_lines (bool with_signal=true)
 
void clear_playlists (bool with_signal=true)
 
void clear_points (bool with_signal=true)
 
void clear_markers (bool with_signal=true)
 
void clear_midi_notes (bool with_signal=true)
 
void clear_triggers (bool with_signal=true)
 
void foreach_region (void(ARDOUR::Region::*method)(void))
 
void foreach_regionview (void(RegionView::*method)(void))
 
void foreach_midi_regionview (void(MidiRegionView::*method)(void))
 
template<class A >
void foreach_region (void(ARDOUR::Region::*method)(A), A arg)
 
XMLNodeget_state () const
 
int set_state (XMLNode const &, int)
 
void core_selection_changed (PBD::PropertyChange const &pc)
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Public Attributes

TrackSelection tracks
 
RegionSelection regions
 
TimeSelection time
 
AutomationSelection lines
 
PlaylistSelection playlists
 
PointSelection points
 
MarkerSelection markers
 
TriggerSelection triggers
 
MidiNoteSelection midi_notes
 
sigc::signal< void > TracksChanged
 
sigc::signal< void > RegionsChanged
 
sigc::signal< void > TimeChanged
 
sigc::signal< void > LinesChanged
 
sigc::signal< void > PlaylistsChanged
 
sigc::signal< void > PointsChanged
 
sigc::signal< void > MarkersChanged
 
sigc::signal< void > MidiNotesChanged
 
sigc::signal< void > TriggersChanged
 
std::list< std::pair< PBD::ID const, std::list< Evoral::event_id_t > > > pending_midi_note_selection
 

Private Attributes

EditingContext const * editor
 
uint32_t next_time_id
 
bool manage_libardour_selection
 

Detailed Description

Lists of selected things.

The Selection class holds lists of selected items (tracks, regions, etc. etc.).

Definition at line 72 of file gtk2_ardour/selection.h.

Member Enumeration Documentation

◆ SelectionType

Enumerator
Object 
Range 

Definition at line 75 of file gtk2_ardour/selection.h.

Constructor & Destructor Documentation

◆ Selection()

Selection::Selection ( EditingContext const *  e,
bool  manage_libardour_selection 
)

Member Function Documentation

◆ add() [1/18]

void Selection::add ( ArdourMarker )

◆ add() [2/18]

void Selection::add ( const MidiNoteSelection )

◆ add() [3/18]

void Selection::add ( const PointSelection )

◆ add() [4/18]

void Selection::add ( const RegionSelection )

◆ add() [5/18]

void Selection::add ( const std::list< ArdourMarker * > &  )

◆ add() [6/18]

void Selection::add ( const std::list< std::shared_ptr< ARDOUR::Playlist > > &  )

◆ add() [7/18]

void Selection::add ( const TrackViewList )

◆ add() [8/18]

void Selection::add ( ControlPoint )

◆ add() [9/18]

void Selection::add ( MidiCutBuffer )

◆ add() [10/18]

void Selection::add ( RegionView )

◆ add() [11/18]

void Selection::add ( std::list< Selectable * > const &  )

◆ add() [12/18]

void Selection::add ( std::shared_ptr< ARDOUR::Playlist )

◆ add() [13/18]

void Selection::add ( std::shared_ptr< Evoral::ControlList )

◆ add() [14/18]

void Selection::add ( std::vector< ControlPoint * > const &  )

◆ add() [15/18]

void Selection::add ( std::vector< RegionView * > &  )

◆ add() [16/18]

long Selection::add ( Temporal::timepos_t const &  ,
Temporal::timepos_t const &   
)

◆ add() [17/18]

void Selection::add ( TimeAxisView )

◆ add() [18/18]

void Selection::add ( TriggerEntry )

◆ clear()

void Selection::clear ( )

◆ clear_all()

void Selection::clear_all ( )
inline

Definition at line 217 of file gtk2_ardour/selection.h.

◆ clear_lines()

void Selection::clear_lines ( bool  with_signal = true)

◆ clear_markers()

void Selection::clear_markers ( bool  with_signal = true)

◆ clear_midi_notes()

void Selection::clear_midi_notes ( bool  with_signal = true)

◆ clear_objects()

void Selection::clear_objects ( bool  with_signal = true)

◆ clear_playlists()

void Selection::clear_playlists ( bool  with_signal = true)

◆ clear_points()

void Selection::clear_points ( bool  with_signal = true)

◆ clear_regions()

void Selection::clear_regions ( bool  with_signal = true)

◆ clear_time()

void Selection::clear_time ( bool  with_signal = true)

◆ clear_tracks()

void Selection::clear_tracks ( bool  with_signal = true)

◆ clear_triggers()

void Selection::clear_triggers ( bool  with_signal = true)

◆ core_selection_changed()

void Selection::core_selection_changed ( PBD::PropertyChange const &  pc)

◆ dump_region_layers()

void Selection::dump_region_layers ( )

◆ empty()

bool Selection::empty ( bool  internal_selection = false)

check if all selections are empty

Parameters
internal_selectionalso check object internals (e.g midi notes, automation points), when false only check objects.
Returns
true if nothing is selected.

◆ foreach_midi_regionview()

void Selection::foreach_midi_regionview ( void(MidiRegionView::*)(void)  method)
inline

Definition at line 49 of file selection_templates.h.

◆ foreach_region() [1/2]

template<class A >
void Selection::foreach_region ( void(ARDOUR::Region::*)(A)  method,
arg 
)
inline

Definition at line 59 of file selection_templates.h.

◆ foreach_region() [2/2]

void Selection::foreach_region ( void(ARDOUR::Region::*)(void)  method)
inline

Definition at line 34 of file selection_templates.h.

◆ foreach_regionview()

void Selection::foreach_regionview ( void(RegionView::*)(void)  method)
inline

Definition at line 42 of file selection_templates.h.

◆ get_state()

XMLNode& Selection::get_state ( ) const

◆ midi_regions()

MidiRegionSelection Selection::midi_regions ( )

we don't store MidiRegionViews in their own selection, we just pull them from "regions" as a convenience for various operations.

◆ move_time()

void Selection::move_time ( Temporal::timecnt_t const &  )

◆ remove() [1/15]

void Selection::remove ( ArdourMarker )

◆ remove() [2/15]

void Selection::remove ( const MidiNoteSelection )

◆ remove() [3/15]

void Selection::remove ( const std::list< Selectable * > &  )

◆ remove() [4/15]

void Selection::remove ( const std::list< std::shared_ptr< ARDOUR::Playlist > > &  )

◆ remove() [5/15]

void Selection::remove ( const TrackViewList )

◆ remove() [6/15]

void Selection::remove ( ControlPoint )

◆ remove() [7/15]

void Selection::remove ( MidiCutBuffer )

◆ remove() [8/15]

void Selection::remove ( RegionView )

◆ remove() [9/15]

void Selection::remove ( samplepos_t  ,
samplepos_t   
)

◆ remove() [10/15]

void Selection::remove ( std::shared_ptr< ARDOUR::AutomationList )

◆ remove() [11/15]

void Selection::remove ( std::shared_ptr< ARDOUR::Playlist )

◆ remove() [12/15]

void Selection::remove ( std::vector< RegionView * >  )

◆ remove() [13/15]

void Selection::remove ( TimeAxisView )

◆ remove() [14/15]

void Selection::remove ( TriggerEntry )

◆ remove() [15/15]

void Selection::remove ( uint32_t  selection_id)

◆ remove_regions()

void Selection::remove_regions ( TimeAxisView )

◆ replace()

void Selection::replace ( uint32_t  time_index,
Temporal::timepos_t const &  start,
Temporal::timepos_t const &  end 
)

◆ selected() [1/5]

bool Selection::selected ( ArdourMarker ) const

◆ selected() [2/5]

bool Selection::selected ( ControlPoint ) const

◆ selected() [3/5]

bool Selection::selected ( RegionView ) const

◆ selected() [4/5]

bool Selection::selected ( TimeAxisView ) const

◆ selected() [5/5]

bool Selection::selected ( TriggerEntry ) const

◆ set() [1/14]

void Selection::set ( ArdourMarker )

◆ set() [2/14]

void Selection::set ( const MidiNoteSelection )

◆ set() [3/14]

void Selection::set ( const RegionSelection )

◆ set() [4/14]

void Selection::set ( const std::list< std::shared_ptr< ARDOUR::Playlist > > &  )

◆ set() [5/14]

void Selection::set ( const TrackViewList )

◆ set() [6/14]

void Selection::set ( ControlPoint )

◆ set() [7/14]

void Selection::set ( RegionView ,
bool  also_clear_tracks = true 
)

◆ set() [8/14]

void Selection::set ( std::list< Selectable * > const &  )

◆ set() [9/14]

void Selection::set ( std::shared_ptr< ARDOUR::Playlist )

◆ set() [10/14]

void Selection::set ( std::shared_ptr< Evoral::ControlList )

◆ set() [11/14]

void Selection::set ( std::vector< RegionView * > &  )

◆ set() [12/14]

long Selection::set ( Temporal::timepos_t const &  ,
Temporal::timepos_t const &   
)

◆ set() [13/14]

void Selection::set ( TimeAxisView )

◆ set() [14/14]

void Selection::set ( TriggerEntry )

◆ set_preserving_all_ranges()

void Selection::set_preserving_all_ranges ( Temporal::timepos_t const &  ,
Temporal::timepos_t const &   
)

◆ set_state()

int Selection::set_state ( XMLNode const &  ,
int   
)

◆ toggle() [1/15]

void Selection::toggle ( ARDOUR::AutomationList )

◆ toggle() [2/15]

void Selection::toggle ( ArdourMarker )

◆ toggle() [3/15]

void Selection::toggle ( const MidiNoteSelection )

◆ toggle() [4/15]

void Selection::toggle ( const std::list< std::shared_ptr< ARDOUR::Playlist > > &  )

◆ toggle() [5/15]

void Selection::toggle ( const TrackViewList )

◆ toggle() [6/15]

void Selection::toggle ( ControlPoint )

◆ toggle() [7/15]

void Selection::toggle ( MidiCutBuffer )

◆ toggle() [8/15]

void Selection::toggle ( RegionView )

◆ toggle() [9/15]

void Selection::toggle ( std::list< Selectable * > const &  )

◆ toggle() [10/15]

void Selection::toggle ( std::shared_ptr< ARDOUR::Playlist )

◆ toggle() [11/15]

void Selection::toggle ( std::vector< ControlPoint * > const &  )

◆ toggle() [12/15]

void Selection::toggle ( std::vector< RegionView * > &  )

◆ toggle() [13/15]

long Selection::toggle ( Temporal::timepos_t const &  ,
Temporal::timepos_t const &   
)

◆ toggle() [14/15]

void Selection::toggle ( TimeAxisView )

◆ toggle() [15/15]

void Selection::toggle ( TriggerEntry )

◆ trigger_regionview_proxy()

RegionSelection Selection::trigger_regionview_proxy ( ) const

Member Data Documentation

◆ editor

EditingContext const* Selection::editor
private

Definition at line 245 of file gtk2_ardour/selection.h.

◆ lines

AutomationSelection Selection::lines

Definition at line 83 of file gtk2_ardour/selection.h.

◆ LinesChanged

sigc::signal<void> Selection::LinesChanged

Definition at line 104 of file gtk2_ardour/selection.h.

◆ manage_libardour_selection

bool Selection::manage_libardour_selection
private

Definition at line 247 of file gtk2_ardour/selection.h.

◆ markers

MarkerSelection Selection::markers

Definition at line 86 of file gtk2_ardour/selection.h.

◆ MarkersChanged

sigc::signal<void> Selection::MarkersChanged

Definition at line 107 of file gtk2_ardour/selection.h.

◆ midi_notes

MidiNoteSelection Selection::midi_notes

only used when this class is used as a cut buffer

Definition at line 90 of file gtk2_ardour/selection.h.

◆ MidiNotesChanged

sigc::signal<void> Selection::MidiNotesChanged

Definition at line 108 of file gtk2_ardour/selection.h.

◆ next_time_id

uint32_t Selection::next_time_id
private

Definition at line 246 of file gtk2_ardour/selection.h.

◆ pending_midi_note_selection

std::list<std::pair<PBD::ID const, std::list<Evoral::event_id_t> > > Selection::pending_midi_note_selection

Definition at line 240 of file gtk2_ardour/selection.h.

◆ playlists

PlaylistSelection Selection::playlists

Definition at line 84 of file gtk2_ardour/selection.h.

◆ PlaylistsChanged

sigc::signal<void> Selection::PlaylistsChanged

Definition at line 105 of file gtk2_ardour/selection.h.

◆ points

PointSelection Selection::points

Definition at line 85 of file gtk2_ardour/selection.h.

◆ PointsChanged

sigc::signal<void> Selection::PointsChanged

Definition at line 106 of file gtk2_ardour/selection.h.

◆ regions

RegionSelection Selection::regions

Definition at line 81 of file gtk2_ardour/selection.h.

◆ RegionsChanged

sigc::signal<void> Selection::RegionsChanged

Definition at line 102 of file gtk2_ardour/selection.h.

◆ time

TimeSelection Selection::time

Definition at line 82 of file gtk2_ardour/selection.h.

◆ TimeChanged

sigc::signal<void> Selection::TimeChanged

Definition at line 103 of file gtk2_ardour/selection.h.

◆ tracks

TrackSelection Selection::tracks

Definition at line 80 of file gtk2_ardour/selection.h.

◆ TracksChanged

sigc::signal<void> Selection::TracksChanged

Definition at line 101 of file gtk2_ardour/selection.h.

◆ triggers

TriggerSelection Selection::triggers

Definition at line 87 of file gtk2_ardour/selection.h.

◆ TriggersChanged

sigc::signal<void> Selection::TriggersChanged

Definition at line 109 of file gtk2_ardour/selection.h.


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