2 Copyright (C) 2007 Paul Davis
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk_ardour_automation_region_view_h__
21 #define __gtk_ardour_automation_region_view_h__
23 #include <ardour/diskstream.h>
24 #include <ardour/types.h>
26 #include "region_view.h"
27 #include "automation_time_axis.h"
28 #include "automation_line.h"
38 class AutomationRegionView : public RegionView
41 AutomationRegionView(ArdourCanvas::Group*,
42 AutomationTimeAxisView&,
43 boost::shared_ptr<ARDOUR::Region>,
44 boost::shared_ptr<ARDOUR::AutomationList>,
45 double initial_samples_per_unit,
46 Gdk::Color& basic_color);
48 ~AutomationRegionView() {}
50 void init (Gdk::Color& basic_color, bool wfd);
52 inline AutomationTimeAxisView* automation_view() const
53 { return dynamic_cast<AutomationTimeAxisView*>(&trackview); }
55 boost::shared_ptr<AutomationLine> line() { return _line; }
57 // We are a ghost. Meta ghosts? Crazy talk.
58 virtual GhostRegion* add_ghost(TimeAxisView&) { return NULL; }
60 void reset_width_dependent_items(double pixel_width);
63 bool set_position(nframes_t pos, void* src, double* ignored);
64 void set_y_position_and_height(double y, double h);
65 void region_resized(ARDOUR::Change what_changed);
66 bool canvas_event(GdkEvent* ev);
67 void add_automation_event (GdkEvent* event, nframes_t when, double y);
72 boost::shared_ptr<AutomationLine> _line;
75 #endif /* __gtk_ardour_automation_region_view_h__ */