2 * Copyright (C) 2007-2014 David Robillard <d@drobilla.net>
3 * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
5 * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef __ardour_automation_streamview_h__
23 #define __ardour_automation_streamview_h__
28 #include "ardour/location.h"
30 #include "streamview.h"
31 #include "time_axis_view_item.h"
32 #include "route_time_axis.h"
33 #include "automation_controller.h"
42 class AutomationRegionView;
44 class AutomationStreamView : public StreamView
47 AutomationStreamView (AutomationTimeAxisView& tv);
48 ~AutomationStreamView ();
50 void set_automation_state (ARDOUR::AutoState state);
51 ARDOUR::AutoState automation_state () const;
53 void redisplay_track ();
55 inline double contents_height() const {
56 return (_trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2);
59 bool has_automation () const;
61 void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
62 ARDOUR::AutomationList::InterpolationStyle interpolation () const;
66 void get_selectables (ARDOUR::samplepos_t, ARDOUR::samplepos_t, double, double, std::list<Selectable*> &, bool within = false);
67 void set_selected_points (PointSelection &);
69 std::list<boost::shared_ptr<AutomationLine> > get_lines () const;
71 bool paste (samplepos_t pos,
74 boost::shared_ptr<ARDOUR::AutomationList> list);
77 void setup_rec_box ();
79 RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
80 void display_region(AutomationRegionView* region_view);
82 void color_handler ();
84 AutomationTimeAxisView& _automation_view;
85 /** automation state that should be applied when this view gets its first RegionView */
86 ARDOUR::AutoState _pending_automation_state;
89 #endif /* __ardour_automation_streamview_h__ */