2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLRENDERERSPIN_H
4 #define _GTKMM_CELLRENDERERSPIN_H
9 /* Copyright (C) 2006 The gtkmm Development Team
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.
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.
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.
26 #include <gtkmm/cellrenderertext.h>
27 //#include <gtkmm/treemodel.h>
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _GtkCellRendererSpin GtkCellRendererSpin;
32 typedef struct _GtkCellRendererSpinClass GtkCellRendererSpinClass;
33 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 { class CellRendererSpin_Class; } // namespace Gtk
41 /** Renders a spin button in a cell.
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
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
60 class CellRendererSpin : public CellRendererText
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 */
70 virtual ~CellRendererSpin();
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75 friend class CellRendererSpin_Class;
76 static CppClassType cellrendererspin_class_;
79 CellRendererSpin(const CellRendererSpin&);
80 CellRendererSpin& operator=(const CellRendererSpin&);
83 explicit CellRendererSpin(const Glib::ConstructParams& construct_params);
84 explicit CellRendererSpin(GtkCellRendererSpin* castitem);
86 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
90 static GType get_type() G_GNUC_CONST;
91 static GType get_base_type() G_GNUC_CONST;
94 ///Provides access to the underlying C GtkObject.
95 GtkCellRendererSpin* gobj() { return reinterpret_cast<GtkCellRendererSpin*>(gobject_); }
97 ///Provides access to the underlying C GtkObject.
98 const GtkCellRendererSpin* gobj() const { return reinterpret_cast<GtkCellRendererSpin*>(gobject_); }
102 //C++ methods used to invoke GTK+ virtual functions:
103 #ifdef GLIBMM_VFUNCS_ENABLED
104 #endif //GLIBMM_VFUNCS_ENABLED
107 //GTK+ Virtual Functions (override these to change behaviour):
108 #ifdef GLIBMM_VFUNCS_ENABLED
109 #endif //GLIBMM_VFUNCS_ENABLED
111 //Default Signal Handlers::
112 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
113 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
122 #ifdef GLIBMM_PROPERTIES_ENABLED
123 /** The adjustment that holds the value of the spinbutton.
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.
129 Glib::PropertyProxy<Gtk::Adjustment*> property_adjustment() ;
130 #endif //#GLIBMM_PROPERTIES_ENABLED
132 #ifdef GLIBMM_PROPERTIES_ENABLED
133 /** The adjustment that holds the value of the spinbutton.
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.
139 Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_adjustment() const;
140 #endif //#GLIBMM_PROPERTIES_ENABLED
142 #ifdef GLIBMM_PROPERTIES_ENABLED
143 /** The acceleration rate when you hold down a button.
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.
149 Glib::PropertyProxy<double> property_climb_rate() ;
150 #endif //#GLIBMM_PROPERTIES_ENABLED
152 #ifdef GLIBMM_PROPERTIES_ENABLED
153 /** The acceleration rate when you hold down a button.
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.
159 Glib::PropertyProxy_ReadOnly<double> property_climb_rate() const;
160 #endif //#GLIBMM_PROPERTIES_ENABLED
162 #ifdef GLIBMM_PROPERTIES_ENABLED
163 /** The number of decimal places to display.
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.
169 Glib::PropertyProxy<guint> property_digits() ;
170 #endif //#GLIBMM_PROPERTIES_ENABLED
172 #ifdef GLIBMM_PROPERTIES_ENABLED
173 /** The number of decimal places to display.
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.
179 Glib::PropertyProxy_ReadOnly<guint> property_digits() const;
180 #endif //#GLIBMM_PROPERTIES_ENABLED
183 #ifdef GLIBMM_PROPERTIES_ENABLED
184 virtual Glib::PropertyProxy_Base _property_renderable(); //override
185 #endif //GLIBMM_PROPERTIES_ENABLED
195 /** A Glib::wrap() method for this object.
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.
201 * @relates Gtk::CellRendererSpin
203 Gtk::CellRendererSpin* wrap(GtkCellRendererSpin* object, bool take_copy = false);
207 #endif /* _GTKMM_CELLRENDERERSPIN_H */