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