2007-09-05 22:30:39 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2007-2014 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2007-09-05 22:30:39 -04:00
|
|
|
|
|
|
|
#ifndef __ardour_automation_streamview_h__
|
|
|
|
#define __ardour_automation_streamview_h__
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <cmath>
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/location.h"
|
2007-09-05 22:30:39 -04:00
|
|
|
#include "enums.h"
|
|
|
|
#include "streamview.h"
|
|
|
|
#include "time_axis_view_item.h"
|
|
|
|
#include "route_time_axis.h"
|
|
|
|
#include "automation_controller.h"
|
|
|
|
|
|
|
|
namespace Gdk {
|
|
|
|
class Color;
|
|
|
|
}
|
|
|
|
|
|
|
|
class PublicEditor;
|
|
|
|
class Selectable;
|
|
|
|
class Selection;
|
|
|
|
class AutomationRegionView;
|
|
|
|
|
|
|
|
class AutomationStreamView : public StreamView
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2009-07-09 13:58:13 -04:00
|
|
|
AutomationStreamView (AutomationTimeAxisView& tv);
|
2007-09-05 22:30:39 -04:00
|
|
|
~AutomationStreamView ();
|
|
|
|
|
2008-09-21 12:17:02 -04:00
|
|
|
void set_automation_state (ARDOUR::AutoState state);
|
2010-05-21 21:33:13 -04:00
|
|
|
ARDOUR::AutoState automation_state () const;
|
2007-09-05 22:30:39 -04:00
|
|
|
|
2010-04-21 16:42:22 -04:00
|
|
|
void redisplay_track ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
|
|
|
inline double contents_height() const {
|
2009-07-09 13:58:13 -04:00
|
|
|
return (_trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2);
|
2008-09-10 11:03:30 -04:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-05-25 11:51:32 -04:00
|
|
|
bool has_automation () const;
|
|
|
|
|
2010-05-25 12:40:35 -04:00
|
|
|
void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
|
2010-07-13 20:58:15 -04:00
|
|
|
ARDOUR::AutomationList::InterpolationStyle interpolation () const;
|
2010-05-25 12:40:35 -04:00
|
|
|
|
2010-07-30 20:44:26 -04:00
|
|
|
void clear ();
|
|
|
|
|
2020-10-02 23:26:17 -04:00
|
|
|
void get_selectables (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, std::list<Selectable*> &, bool within = false);
|
2010-08-04 11:41:55 -04:00
|
|
|
void set_selected_points (PointSelection &);
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::list<std::shared_ptr<AutomationLine> > get_lines () const;
|
2014-11-16 17:04:27 -05:00
|
|
|
|
2020-09-26 11:14:59 -04:00
|
|
|
bool paste (Temporal::timepos_t const & pos,
|
2014-11-16 17:04:27 -05:00
|
|
|
unsigned paste_count,
|
|
|
|
float times,
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::AutomationList> list);
|
2010-08-05 09:35:43 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2007-09-05 22:30:39 -04:00
|
|
|
void setup_rec_box ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
RegionView* add_region_view_internal (std::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
|
2022-12-18 22:58:05 -05:00
|
|
|
void display_region (RegionView* region_view);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2007-09-05 22:30:39 -04:00
|
|
|
void color_handler ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-07-09 13:58:13 -04:00
|
|
|
AutomationTimeAxisView& _automation_view;
|
2010-06-25 16:47:09 -04:00
|
|
|
/** automation state that should be applied when this view gets its first RegionView */
|
|
|
|
ARDOUR::AutoState _pending_automation_state;
|
2007-09-05 22:30:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_automation_streamview_h__ */
|