* confusing.
*/
void
-AutomationStreamView::get_selectables (framepos_t start, framepos_t end, double botfrac, double topfrac, list<Selectable*>& results)
+AutomationStreamView::get_selectables (framepos_t start, framepos_t end, double botfrac, double topfrac, list<Selectable*>& results, bool /*within*/)
{
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
void clear ();
- void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*> &);
+ void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*> &, bool within = false);
void set_selected_points (PointSelection &);
std::list<boost::shared_ptr<AutomationLine> > get_lines () const;
}
void
-AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results)
+AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results, bool /*within*/)
{
if (!_line && !_view) {
return;
std::list<boost::shared_ptr<AutomationLine> > lines () const;
void set_selected_points (PointSelection&);
- void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&);
+ void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&, bool within = false);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
void show_timestretch (framepos_t /*start*/, framepos_t /*end*/, int /*layers*/, int /*layer*/) {}
}
void
-Editor::select_all_selectables_between (bool /*within*/)
+Editor::select_all_selectables_between (bool within)
{
framepos_t start;
framepos_t end;
if ((*iter)->hidden()) {
continue;
}
- (*iter)->get_selectables (start, end, 0, DBL_MAX, touched);
+ (*iter)->get_selectables (start, end, 0, DBL_MAX, touched, within);
}
begin_reversible_selection_op(_("Select all Selectables Between"));
* @param results List to add things to.
*/
void
-RouteTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results)
+RouteTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results, bool within)
{
double speed = 1.0;
framepos_t const end_adjusted = session_frame_to_track_frame(end, speed);
if ((_view && ((top < 0.0 && bot < 0.0))) || touched (top, bot)) {
- _view->get_selectables (start_adjusted, end_adjusted, top, bot, results);
+ _view->get_selectables (start_adjusted, end_adjusted, top, bot, results, within);
}
/* pick up visible automation tracks */
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
if (!(*i)->hidden()) {
- (*i)->get_selectables (start_adjusted, end_adjusted, top, bot, results);
+ (*i)->get_selectables (start_adjusted, end_adjusted, top, bot, results, within);
}
}
}
void selection_click (GdkEventButton*);
void set_selected_points (PointSelection&);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&);
+ void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&, bool within = false);
void get_inverted_selectables (Selection&, std::list<Selectable*>&);
void set_layer_display (LayerDisplay d, bool apply_to_selection = false);
LayerDisplay layer_display () const;
* @param result Filled in with selectable things.
*/
void
-StreamView::get_selectables (framepos_t start, framepos_t end, double top, double bottom, list<Selectable*>& results)
+StreamView::get_selectables (framepos_t start, framepos_t end, double top, double bottom, list<Selectable*>& results, bool within)
{
if (_trackview.editor().internal_editing()) {
return; // Don't select regions with an internal tool
layer_t const l = (*i)->region()->layer ();
layer_ok = (min_layer <= l && l <= max_layer);
}
-
- if ((*i)->region()->coverage (start, end) != Evoral::OverlapNone && layer_ok) {
- results.push_back (*i);
+
+ if (within) {
+ if ((*i)->region()->coverage (start, end) == Evoral::OverlapExternal && layer_ok) {
+ results.push_back (*i);
+ }
+ } else {
+ if ((*i)->region()->coverage (start, end) != Evoral::OverlapNone && layer_ok) {
+ results.push_back (*i);
+ }
}
+
}
}
void foreach_selected_regionview (sigc::slot<void,RegionView*> slot);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable* >&);
+ void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable* >&, bool within = false);
void get_inverted_selectables (Selection&, std::list<Selectable* >& results);
virtual void update_contents_metrics(boost::shared_ptr<ARDOUR::Region>) {}
* @param result Filled in with selectable things.
*/
void
-TimeAxisView::get_selectables (framepos_t /*start*/, framepos_t /*end*/, double /*top*/, double /*bot*/, list<Selectable*>& /*result*/)
+TimeAxisView::get_selectables (framepos_t /*start*/, framepos_t /*end*/, double /*top*/, double /*bot*/, list<Selectable*>& /*result*/, bool /*within*/)
{
return;
}
void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top);
- virtual void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*>&);
+ virtual void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*>&, bool within = false);
virtual void get_inverted_selectables (Selection&, std::list<Selectable *>& results);
void add_ghost (RegionView*);