2007-09-05 22:30:39 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2001, 2007 Paul Davis
|
2007-09-05 22:30:39 -04:00
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
{
|
|
|
|
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 ();
|
|
|
|
|
2010-08-05 09:36:38 -04:00
|
|
|
void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*> &);
|
2010-08-04 11:41:55 -04:00
|
|
|
void set_selected_points (PointSelection &);
|
|
|
|
|
2010-08-05 09:35:43 -04:00
|
|
|
std::list<boost::shared_ptr<AutomationLine> > get_lines () const;
|
2014-11-16 17:04:27 -05:00
|
|
|
|
|
|
|
bool paste (framepos_t pos,
|
|
|
|
unsigned paste_count,
|
|
|
|
float times,
|
|
|
|
boost::shared_ptr<ARDOUR::AutomationList> list);
|
2010-08-05 09:35:43 -04:00
|
|
|
|
2007-09-05 22:30:39 -04:00
|
|
|
private:
|
|
|
|
void setup_rec_box ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
|
2007-09-05 22:30:39 -04:00
|
|
|
void display_region(AutomationRegionView* 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__ */
|