Update GPL boilerplate and (C)
[ardour.git] / gtk2_ardour / audio_region_view.h
index ed160301ac17de81aba6567670240043a4f5d932..015739a0dcff1f2085568e8e8004f32d8755cbcc 100644 (file)
@@ -1,20 +1,25 @@
 /*
-    Copyright (C) 2001-2006 Paul Davis
-
-    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.
-*/
+ * Copyright (C) 2006-2014 David Robillard <d@drobilla.net>
+ * Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2007 Doug McLain <doug@nostar.net>
+ * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2012 Ben Loftis <ben@harrisonconsoles.com>
+ * Copyright (C) 2014-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.
+ */
 
 #ifndef __gtk_ardour_audio_region_view_h__
 #define __gtk_ardour_audio_region_view_h__
 #include "ardour/audioregion.h"
 
 #include "canvas/fwd.h"
-#include "canvas/wave_view.h"
 #include "canvas/xfade_curve.h"
 
+#include "waveview/wave_view.h"
+
 #include "region_view.h"
 #include "time_axis_view_item.h"
 #include "automation_line.h"
@@ -50,20 +56,20 @@ class RouteTimeAxisView;
 
 class AudioRegionView : public RegionView
 {
-  public:
+public:
        AudioRegionView (ArdourCanvas::Container *,
-                        RouteTimeAxisView&,
-                        boost::shared_ptr<ARDOUR::AudioRegion>,
-                        double initial_samples_per_pixel,
-                        uint32_t base_color);
+                        RouteTimeAxisView&,
+                        boost::shared_ptr<ARDOUR::AudioRegion>,
+                        double initial_samples_per_pixel,
+                        uint32_t base_color);
 
        AudioRegionView (ArdourCanvas::Container *,
-                        RouteTimeAxisView&,
-                        boost::shared_ptr<ARDOUR::AudioRegion>,
-                        double samples_per_pixel,
-                        uint32_t base_color,
-                        bool recording,
-                        TimeAxisViewItem::Visibility);
+                        RouteTimeAxisView&,
+                        boost::shared_ptr<ARDOUR::AudioRegion>,
+                        double samples_per_pixel,
+                        uint32_t base_color,
+                        bool recording,
+                        TimeAxisViewItem::Visibility);
 
        AudioRegionView (const AudioRegionView& other, boost::shared_ptr<ARDOUR::AudioRegion>);
 
@@ -96,14 +102,14 @@ class AudioRegionView : public RegionView
 
        GhostRegion* add_ghost (TimeAxisView&);
 
-       void reset_fade_in_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, framecnt_t, bool drag_active = false);
-       void reset_fade_out_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, framecnt_t, bool drag_active = false);
+       void reset_fade_in_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, samplecnt_t, bool drag_active = false);
+       void reset_fade_out_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, samplecnt_t, bool drag_active = false);
 
-       framepos_t get_fade_in_shape_width ();
-       framepos_t get_fade_out_shape_width ();
+       samplepos_t get_fade_in_shape_width ();
+       samplepos_t get_fade_out_shape_width ();
 
        void set_fade_visibility (bool);
-       void update_coverage_frames (LayerDisplay);
+       void update_coverage_frame (LayerDisplay);
 
        void update_transient(float old_pos, float new_pos);
        void remove_transient(float pos);
@@ -118,8 +124,8 @@ class AudioRegionView : public RegionView
        void drag_start ();
        void drag_end ();
 
-       void redraw_start_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double);
-       void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double, double);
+       void redraw_start_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, samplecnt_t, ArdourCanvas::Points&, double, double);
+       void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, samplecnt_t, ArdourCanvas::Points&, double, double, double);
        void redraw_start_xfade ();
        void redraw_end_xfade ();
 
@@ -138,12 +144,12 @@ class AudioRegionView : public RegionView
                return _end_xfade_visible;
        }
 
-  protected:
+protected:
 
        /* this constructor allows derived types
-          to specify their visibility requirements
-          to the TimeAxisViewItem parent class
-       */
+        * to specify their visibility requirements
+        * to the TimeAxisViewItem parent class
+        */
 
        enum Flags {
                WaveformVisible = 0x4,
@@ -151,10 +157,10 @@ class AudioRegionView : public RegionView
                WaveformLogScaled = 0x10,
        };
 
-       std::vector<ArdourCanvas::WaveView *> waves;
-       std::vector<ArdourCanvas::WaveView *> tmp_waves; ///< see ::create_waves()
+       std::vector<ArdourWaveView::WaveView *> waves;
+       std::vector<ArdourWaveView::WaveView *> tmp_waves; ///< see ::create_waves()
 
-       std::list<std::pair<framepos_t, ArdourCanvas::Line*> > feature_lines;
+       std::list<std::pair<samplepos_t, ArdourCanvas::Line*> > feature_lines;
 
        ArdourCanvas::Polygon*          sync_mark; ///< polgyon for sync position
        ArdourCanvas::Rectangle*        fade_in_handle; ///< fade in handle, or 0
@@ -209,7 +215,7 @@ private:
 
        void parameter_changed (std::string const &);
        void setup_waveform_visibility ();
-       void set_some_waveform_colors (std::vector<ArdourCanvas::WaveView*>& waves_to_color);
+       void set_some_waveform_colors (std::vector<ArdourWaveView::WaveView*>& waves_to_color);
 
        /** A ScopedConnection for each PeaksReady callback (one per channel).  Each member
         *  may be 0 if no connection exists.