Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / curve.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CURVE_H
4 #define _GTKMM_CURVE_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* curve.h
12  * 
13  * Copyright (C) 1998-2002 The gtkmm 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 <glibmm/arrayhandle.h>
31 #include <gtkmm/box.h>
32 #include <gtkmm/drawingarea.h>
33
34
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 typedef struct _GtkCurve GtkCurve;
37 typedef struct _GtkCurveClass GtkCurveClass;
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39
40
41 namespace Gtk
42 { class Curve_Class; } // namespace Gtk
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 typedef struct _GtkGammaCurve GtkGammaCurve;
45 typedef struct _GtkGammaCurveClass GtkGammaCurveClass;
46 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
47
48
49 namespace Gtk
50 { class GammaCurve_Class; } // namespace Gtk
51 namespace Gtk
52 {
53
54 /** Allows direct editing of a curve.
55  *
56  * @ingroup Widgets
57  */
58
59 class Curve : public DrawingArea
60 {
61   public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63   typedef Curve CppObjectType;
64   typedef Curve_Class CppClassType;
65   typedef GtkCurve BaseObjectType;
66   typedef GtkCurveClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68
69   virtual ~Curve();
70
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72
73 private:
74   friend class Curve_Class;
75   static CppClassType curve_class_;
76
77   // noncopyable
78   Curve(const Curve&);
79   Curve& operator=(const Curve&);
80
81 protected:
82   explicit Curve(const Glib::ConstructParams& construct_params);
83   explicit Curve(GtkCurve* 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   GtkCurve*       gobj()       { return reinterpret_cast<GtkCurve*>(gobject_); }
95
96   ///Provides access to the underlying C GtkObject.
97   const GtkCurve* gobj() const { return reinterpret_cast<GtkCurve*>(gobject_); }
98
99
100 public:
101   //C++ methods used to invoke GTK+ virtual functions:
102 #ifdef GLIBMM_VFUNCS_ENABLED
103 #endif //GLIBMM_VFUNCS_ENABLED
104
105 protected:
106   //GTK+ Virtual Functions (override these to change behaviour):
107 #ifdef GLIBMM_VFUNCS_ENABLED
108 #endif //GLIBMM_VFUNCS_ENABLED
109
110   //Default Signal Handlers::
111 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
112   virtual void on_curve_type_changed();
113 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
114
115
116 private:
117
118   
119 public:
120
121   Curve();
122   
123
124   void reset();
125   
126   void set_gamma(float gamma);
127   
128   void set_range(float min_x, float max_x, float min_y, float max_y);
129   
130   void get_vector(int veclen, float* data) const;
131
132   Glib::ArrayHandle<float> get_vector(int veclen) const;
133   void set_vector(const Glib::ArrayHandle<float>& array);
134
135   
136   void set_curve_type(CurveType type);
137
138   
139   /**
140    * @par Prototype:
141    * <tt>void on_my_%curve_type_changed()</tt>
142    */
143
144   Glib::SignalProxy0< void > signal_curve_type_changed();
145
146
147   #ifdef GLIBMM_PROPERTIES_ENABLED
148 /** Is this curve linear
149    *
150    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
151    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
152    * the value of the property changes.
153    */
154   Glib::PropertyProxy<CurveType> property_curve_type() ;
155 #endif //#GLIBMM_PROPERTIES_ENABLED
156
157 #ifdef GLIBMM_PROPERTIES_ENABLED
158 /** Is this curve linear
159    *
160    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
161    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
162    * the value of the property changes.
163    */
164   Glib::PropertyProxy_ReadOnly<CurveType> property_curve_type() const;
165 #endif //#GLIBMM_PROPERTIES_ENABLED
166
167   #ifdef GLIBMM_PROPERTIES_ENABLED
168 /** Minimum possible value for X.
169    *
170    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
171    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
172    * the value of the property changes.
173    */
174   Glib::PropertyProxy<float> property_min_x() ;
175 #endif //#GLIBMM_PROPERTIES_ENABLED
176
177 #ifdef GLIBMM_PROPERTIES_ENABLED
178 /** Minimum possible value for X.
179    *
180    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
181    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
182    * the value of the property changes.
183    */
184   Glib::PropertyProxy_ReadOnly<float> property_min_x() const;
185 #endif //#GLIBMM_PROPERTIES_ENABLED
186
187   #ifdef GLIBMM_PROPERTIES_ENABLED
188 /** Maximum possible X value.
189    *
190    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
191    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
192    * the value of the property changes.
193    */
194   Glib::PropertyProxy<float> property_max_x() ;
195 #endif //#GLIBMM_PROPERTIES_ENABLED
196
197 #ifdef GLIBMM_PROPERTIES_ENABLED
198 /** Maximum possible X value.
199    *
200    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
201    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
202    * the value of the property changes.
203    */
204   Glib::PropertyProxy_ReadOnly<float> property_max_x() const;
205 #endif //#GLIBMM_PROPERTIES_ENABLED
206
207   #ifdef GLIBMM_PROPERTIES_ENABLED
208 /** Minimum possible value for Y.
209    *
210    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
211    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
212    * the value of the property changes.
213    */
214   Glib::PropertyProxy<float> property_min_y() ;
215 #endif //#GLIBMM_PROPERTIES_ENABLED
216
217 #ifdef GLIBMM_PROPERTIES_ENABLED
218 /** Minimum possible value for Y.
219    *
220    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
221    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
222    * the value of the property changes.
223    */
224   Glib::PropertyProxy_ReadOnly<float> property_min_y() const;
225 #endif //#GLIBMM_PROPERTIES_ENABLED
226
227   #ifdef GLIBMM_PROPERTIES_ENABLED
228 /** Maximum possible value for Y.
229    *
230    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
231    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
232    * the value of the property changes.
233    */
234   Glib::PropertyProxy<float> property_max_y() ;
235 #endif //#GLIBMM_PROPERTIES_ENABLED
236
237 #ifdef GLIBMM_PROPERTIES_ENABLED
238 /** Maximum possible value for Y.
239    *
240    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
241    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
242    * the value of the property changes.
243    */
244   Glib::PropertyProxy_ReadOnly<float> property_max_y() const;
245 #endif //#GLIBMM_PROPERTIES_ENABLED
246
247
248 };
249
250 /** A subclass of Gtk::Curve for editing gamma curves.
251  *
252  * @ingroup Widgets
253  */
254
255 class GammaCurve : public VBox
256 {
257   public:
258 #ifndef DOXYGEN_SHOULD_SKIP_THIS
259   typedef GammaCurve CppObjectType;
260   typedef GammaCurve_Class CppClassType;
261   typedef GtkGammaCurve BaseObjectType;
262   typedef GtkGammaCurveClass BaseClassType;
263 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
264
265   virtual ~GammaCurve();
266
267 #ifndef DOXYGEN_SHOULD_SKIP_THIS
268
269 private:
270   friend class GammaCurve_Class;
271   static CppClassType gammacurve_class_;
272
273   // noncopyable
274   GammaCurve(const GammaCurve&);
275   GammaCurve& operator=(const GammaCurve&);
276
277 protected:
278   explicit GammaCurve(const Glib::ConstructParams& construct_params);
279   explicit GammaCurve(GtkGammaCurve* castitem);
280
281 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
282
283 public:
284 #ifndef DOXYGEN_SHOULD_SKIP_THIS
285   static GType get_type()      G_GNUC_CONST;
286   static GType get_base_type() G_GNUC_CONST;
287 #endif
288
289   ///Provides access to the underlying C GtkObject.
290   GtkGammaCurve*       gobj()       { return reinterpret_cast<GtkGammaCurve*>(gobject_); }
291
292   ///Provides access to the underlying C GtkObject.
293   const GtkGammaCurve* gobj() const { return reinterpret_cast<GtkGammaCurve*>(gobject_); }
294
295
296 public:
297   //C++ methods used to invoke GTK+ virtual functions:
298 #ifdef GLIBMM_VFUNCS_ENABLED
299 #endif //GLIBMM_VFUNCS_ENABLED
300
301 protected:
302   //GTK+ Virtual Functions (override these to change behaviour):
303 #ifdef GLIBMM_VFUNCS_ENABLED
304 #endif //GLIBMM_VFUNCS_ENABLED
305
306   //Default Signal Handlers::
307 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
308 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
309
310
311 private:
312
313 public:
314   GammaCurve();
315   
316
317 };
318
319 } /* namespace Gtk */
320
321
322 namespace Glib
323 {
324   /** A Glib::wrap() method for this object.
325    * 
326    * @param object The C instance.
327    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
328    * @result A C++ instance that wraps this C instance.
329    *
330    * @relates Gtk::Curve
331    */
332   Gtk::Curve* wrap(GtkCurve* object, bool take_copy = false);
333 } //namespace Glib
334
335
336 namespace Glib
337 {
338   /** A Glib::wrap() method for this object.
339    * 
340    * @param object The C instance.
341    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
342    * @result A C++ instance that wraps this C instance.
343    *
344    * @relates Gtk::GammaCurve
345    */
346   Gtk::GammaCurve* wrap(GtkGammaCurve* object, bool take_copy = false);
347 } //namespace Glib
348
349
350 #endif /* _GTKMM_CURVE_H */
351