Vkeybd: add a mod-wheel
[ardour.git] / gtk2_ardour / audio_streamview.h
1 /*
2  * Copyright (C) 2006-2012 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
4  * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2007 Doug McLain <doug@nostar.net>
6  *
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.
11  *
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.
16  *
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.
20  */
21
22 #ifndef __ardour_audio_streamview_h__
23 #define __ardour_audio_streamview_h__
24
25 #include <list>
26 #include <map>
27 #include <cmath>
28
29 #include <boost/weak_ptr.hpp>
30
31 #include "ardour/location.h"
32 #include "point_selection.h"
33 #include "editing.h"
34 #include "streamview.h"
35
36 namespace Gdk {
37         class Color;
38 }
39
40 namespace ARDOUR {
41         class AudioRegion;
42         class Route;
43         class Source;
44         struct PeakData;
45 }
46
47 class PublicEditor;
48 class Selectable;
49 class AudioTimeAxisView;
50 class AudioRegionView;
51 class RegionSelection;
52 class Selection;
53
54 class AudioStreamView : public StreamView
55 {
56 public:
57         AudioStreamView (AudioTimeAxisView&);
58
59         int     set_amplitude_above_axis (gdouble app);
60         gdouble get_amplitude_above_axis () { return _amplitude_above_axis; }
61
62         void show_all_fades ();
63         void hide_all_fades ();
64
65         std::pair<std::list<AudioRegionView*>, std::list<AudioRegionView*> > hide_xfades_with (boost::shared_ptr<ARDOUR::AudioRegion> ar);
66
67         RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool);
68         void set_selected_points (PointSelection&);
69
70 private:
71         void setup_rec_box ();
72         void rec_peak_range_ready (samplepos_t start, ARDOUR::samplecnt_t cnt, boost::weak_ptr<ARDOUR::Source> src);
73         void update_rec_regions (ARDOUR::samplepos_t, ARDOUR::samplecnt_t);
74
75         RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves, bool recording = false);
76         void remove_audio_region_view (boost::shared_ptr<ARDOUR::AudioRegion> );
77
78         void redisplay_track ();
79
80         void color_handler ();
81
82         double _amplitude_above_axis;
83
84         std::map<boost::shared_ptr<ARDOUR::Source>, bool> rec_data_ready_map;
85
86         bool outline_region;
87 };
88
89 #endif /* __ardour_audio_streamview_h__ */