Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / cellrendererspin.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLRENDERERSPIN_H
4 #define _GTKMM_CELLRENDERERSPIN_H
5
6
7 #include <glibmm.h>
8
9 /* Copyright (C) 2006 The gtkmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #include <gtkmm/cellrenderertext.h>
27 //#include <gtkmm/treemodel.h>
28
29
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _GtkCellRendererSpin GtkCellRendererSpin;
32 typedef struct _GtkCellRendererSpinClass GtkCellRendererSpinClass;
33 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
34
35
36 namespace Gtk
37 { class CellRendererSpin_Class; } // namespace Gtk
38 namespace Gtk
39 {
40
41 /**  Renders a spin button in a cell.
42  *
43  * Gtk::CellRendererSpin renders text in a cell like Gtk::CellRendererText, 
44  * from which it is derived. But while Gtk::CellRendererText offers a simple 
45  * entry to edit the text, Gtk::CellRendererSpin offers a Gtk::SpinButton widget. 
46  * Of course, that means that the text must be parseable as a floating point 
47  * number.
48  *
49  * The range of the spinbutton is taken from the adjustment property of the 
50  * cell renderer, which can be set explicitly or mapped to a column in 
51  * the tree model, like all properties of cell renders. Gtk::CellRendererSpin 
52  * also has properties for the climb rate and the number of digits to display. 
53  * Other Gtk::SpinButton properties can be set in a handler for the start-editing
54  * signal. 
55  *
56  * @ingroup TreeView
57  * @newin2p12
58  */
59
60 class CellRendererSpin : public CellRendererText
61 {
62   public:
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64   typedef CellRendererSpin CppObjectType;
65   typedef CellRendererSpin_Class CppClassType;
66   typedef GtkCellRendererSpin BaseObjectType;
67   typedef GtkCellRendererSpinClass BaseClassType;
68 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
69
70   virtual ~CellRendererSpin();
71
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73
74 private:
75   friend class CellRendererSpin_Class;
76   static CppClassType cellrendererspin_class_;
77
78   // noncopyable
79   CellRendererSpin(const CellRendererSpin&);
80   CellRendererSpin& operator=(const CellRendererSpin&);
81
82 protected:
83   explicit CellRendererSpin(const Glib::ConstructParams& construct_params);
84   explicit CellRendererSpin(GtkCellRendererSpin* castitem);
85
86 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87
88 public:
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
90   static GType get_type()      G_GNUC_CONST;
91   static GType get_base_type() G_GNUC_CONST;
92 #endif
93
94   ///Provides access to the underlying C GtkObject.
95   GtkCellRendererSpin*       gobj()       { return reinterpret_cast<GtkCellRendererSpin*>(gobject_); }
96
97   ///Provides access to the underlying C GtkObject.
98   const GtkCellRendererSpin* gobj() const { return reinterpret_cast<GtkCellRendererSpin*>(gobject_); }
99
100
101 public:
102   //C++ methods used to invoke GTK+ virtual functions:
103 #ifdef GLIBMM_VFUNCS_ENABLED
104 #endif //GLIBMM_VFUNCS_ENABLED
105
106 protected:
107   //GTK+ Virtual Functions (override these to change behaviour):
108 #ifdef GLIBMM_VFUNCS_ENABLED
109 #endif //GLIBMM_VFUNCS_ENABLED
110
111   //Default Signal Handlers::
112 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
113 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
114
115
116 private:
117
118 public:
119
120   CellRendererSpin();
121   
122   #ifdef GLIBMM_PROPERTIES_ENABLED
123 /** The adjustment that holds the value of the spinbutton.
124    *
125    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
126    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
127    * the value of the property changes.
128    */
129   Glib::PropertyProxy<Gtk::Adjustment*> property_adjustment() ;
130 #endif //#GLIBMM_PROPERTIES_ENABLED
131
132 #ifdef GLIBMM_PROPERTIES_ENABLED
133 /** The adjustment that holds the value of the spinbutton.
134    *
135    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
136    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
137    * the value of the property changes.
138    */
139   Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_adjustment() const;
140 #endif //#GLIBMM_PROPERTIES_ENABLED
141
142   #ifdef GLIBMM_PROPERTIES_ENABLED
143 /** The acceleration rate when you hold down a button.
144    *
145    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
146    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
147    * the value of the property changes.
148    */
149   Glib::PropertyProxy<double> property_climb_rate() ;
150 #endif //#GLIBMM_PROPERTIES_ENABLED
151
152 #ifdef GLIBMM_PROPERTIES_ENABLED
153 /** The acceleration rate when you hold down a button.
154    *
155    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
156    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
157    * the value of the property changes.
158    */
159   Glib::PropertyProxy_ReadOnly<double> property_climb_rate() const;
160 #endif //#GLIBMM_PROPERTIES_ENABLED
161
162   #ifdef GLIBMM_PROPERTIES_ENABLED
163 /** The number of decimal places to display.
164    *
165    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
166    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
167    * the value of the property changes.
168    */
169   Glib::PropertyProxy<guint> property_digits() ;
170 #endif //#GLIBMM_PROPERTIES_ENABLED
171
172 #ifdef GLIBMM_PROPERTIES_ENABLED
173 /** The number of decimal places to display.
174    *
175    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
176    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
177    * the value of the property changes.
178    */
179   Glib::PropertyProxy_ReadOnly<guint> property_digits() const;
180 #endif //#GLIBMM_PROPERTIES_ENABLED
181
182
183 #ifdef GLIBMM_PROPERTIES_ENABLED
184   virtual Glib::PropertyProxy_Base _property_renderable(); //override
185 #endif //GLIBMM_PROPERTIES_ENABLED
186
187
188 };
189
190 } // namespace Gtk
191
192
193 namespace Glib
194 {
195   /** A Glib::wrap() method for this object.
196    * 
197    * @param object The C instance.
198    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
199    * @result A C++ instance that wraps this C instance.
200    *
201    * @relates Gtk::CellRendererSpin
202    */
203   Gtk::CellRendererSpin* wrap(GtkCellRendererSpin* object, bool take_copy = false);
204 } //namespace Glib
205
206
207 #endif /* _GTKMM_CELLRENDERERSPIN_H */
208