56d0ed76753b9c178184c4b1984307584fc69222
[ardour.git] / gtk2_ardour / waveview.h
1 // -*- c++ -*-
2 #ifndef _LIBGNOMECANVASMM_WAVEVIEW_H
3 #define _LIBGNOMECANVASMM_WAVEVIEW_H
4
5 #include <glibmm.h>
6
7 /* $Id$ */
8
9 /* waveview.h
10  * 
11  * Copyright (C) 1998 EMC Capital Management Inc.
12  * Developed by Havoc Pennington <hp@pobox.com>
13  *
14  * Copyright (C) 1999 The Gtk-- Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Library General Public
18  * License as published by the Free Software Foundation; either
19  * version 2 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24  * Library General Public License for more details.
25  *
26  * You should have received a copy of the GNU Library General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30
31 #include <libgnomecanvasmm/item.h>
32 #include "canvas-waveview.h"
33 #include <libgnomecanvas/gnome-canvas-util.h>
34 #include <libgnomecanvas/libgnomecanvas.h>
35 #include <vector>
36
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 typedef struct _GnomeCanvasWaveView GnomeCanvasWaveView;
40 typedef struct _GnomeCanvasWaveViewClass GnomeCanvasWaveViewClass;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
42
43
44 namespace Gnome
45 {
46
47 namespace Canvas
48 { class WaveView_Class; } // namespace Canvas
49
50 } // namespace Gnome
51 namespace Gnome
52 {
53
54 namespace Canvas
55 {
56
57 class GnomeGroup;
58
59 class WaveView : public Item
60 {
61   public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63   typedef WaveView CppObjectType;
64   typedef WaveView_Class CppClassType;
65   typedef GnomeCanvasWaveView BaseObjectType;
66   typedef GnomeCanvasWaveViewClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68
69   virtual ~WaveView();
70
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72
73 private:
74   friend class WaveView_Class;
75   static CppClassType waveview_class_;
76
77   // noncopyable
78   WaveView(const WaveView&);
79   WaveView& operator=(const WaveView&);
80
81 protected:
82   explicit WaveView(const Glib::ConstructParams& construct_params);
83   explicit WaveView(GnomeCanvasWaveView* castitem);
84   
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86
87 public:
88 #ifndef DOXYGEN_SHOULD_SKIP_THIS
89   static GType get_type()      G_GNUC_CONST;
90   static GType get_base_type() G_GNUC_CONST;
91 #endif
92
93   ///Provides access to the underlying C GtkObject.
94   GnomeCanvasWaveView*       gobj()       { return reinterpret_cast<GnomeCanvasWaveView*>(gobject_); }
95
96   ///Provides access to the underlying C GtkObject.
97   const GnomeCanvasWaveView* gobj() const { return reinterpret_cast<GnomeCanvasWaveView*>(gobject_); }
98
99
100 public:
101   //C++ methods used to invoke GTK+ virtual functions:
102
103 protected:
104   //GTK+ Virtual Functions (override these to change behaviour):
105
106   //Default Signal Handlers::
107
108
109 private:
110
111 public:
112   WaveView(Group& parent);
113
114   static GnomeCanvasWaveViewCache* create_cache();
115
116   Glib::PropertyProxy<void*> property_data_src();
117   Glib::PropertyProxy_ReadOnly<void*> property_data_src() const;
118   Glib::PropertyProxy<uint32_t> property_channel();
119   Glib::PropertyProxy_ReadOnly<uint32_t> property_channel() const;
120   Glib::PropertyProxy<void*> property_length_function();
121   Glib::PropertyProxy_ReadOnly<void*> property_length_function() const;
122   Glib::PropertyProxy<void*> property_sourcefile_length_function();
123   Glib::PropertyProxy_ReadOnly<void*> property_sourcefile_length_function() const;
124   Glib::PropertyProxy<void*> property_peak_function();
125   Glib::PropertyProxy_ReadOnly<void*> property_peak_function() const;
126   Glib::PropertyProxy<void*> property_gain_function();
127   Glib::PropertyProxy_ReadOnly<void*> property_gain_function() const;
128   Glib::PropertyProxy<void*> property_gain_src();
129   Glib::PropertyProxy_ReadOnly<void*> property_gain_src() const;
130   Glib::PropertyProxy<void*> property_cache();
131   Glib::PropertyProxy_ReadOnly<void*> property_cache() const;
132   Glib::PropertyProxy<bool> property_cache_updater();
133   Glib::PropertyProxy_ReadOnly<bool> property_cache_updater() const;
134   Glib::PropertyProxy<double> property_samples_per_unit();
135   Glib::PropertyProxy_ReadOnly<double> property_samples_per_unit() const;
136   Glib::PropertyProxy<double> property_amplitude_above_axis();
137   Glib::PropertyProxy_ReadOnly<double> property_amplitude_above_axis() const;
138   Glib::PropertyProxy<double> property_x();
139   Glib::PropertyProxy_ReadOnly<double> property_x() const;
140   Glib::PropertyProxy<double> property_y();
141   Glib::PropertyProxy_ReadOnly<double> property_y() const;
142   Glib::PropertyProxy<double> property_height();
143   Glib::PropertyProxy_ReadOnly<double> property_height() const;
144   Glib::PropertyProxy<guint> property_wave_color();
145   Glib::PropertyProxy_ReadOnly<guint> property_wave_color() const;
146   Glib::PropertyProxy<gint> property_rectified();
147   Glib::PropertyProxy_ReadOnly<gint> property_rectified() const;
148   Glib::PropertyProxy<guint> property_region_start();
149   Glib::PropertyProxy_ReadOnly<guint> property_region_start() const;
150   Glib::PropertyProxy<gint> property_logscaled();
151   Glib::PropertyProxy_ReadOnly<gint> property_logscaled() const;
152 };
153
154 } /* namespace Canvas */
155 } /* namespace Gnome */
156
157
158 namespace Glib
159 {
160   /** @relates Gnome::Canvas::WaveView
161    * @param object The C instance
162    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
163    * @result A C++ instance that wraps this C instance.
164    */
165   Gnome::Canvas::WaveView* wrap(GnomeCanvasWaveView* object, bool take_copy = false);
166 }
167 #endif /* _LIBGNOMECANVASMM_WAVEVIEW_H */
168