2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLRENDERERTOGGLE_H
4 #define _GTKMM_CELLRENDERERTOGGLE_H
10 /* cellrenderertoggle.h
12 * Copyright (C) 1998-2002 The gtkmm Development Team
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <gtkmm/cellrenderer.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkCellRendererToggle GtkCellRendererToggle;
34 typedef struct _GtkCellRendererToggleClass GtkCellRendererToggleClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 { class CellRendererToggle_Class; } // namespace Gtk
43 /** Renders a toggle button in a cell.
44 * The button is drawn as a radio- or checkbutton, depending on the radio property. When activated, it
45 * emits the toggled signal.
50 class CellRendererToggle : public CellRenderer
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef CellRendererToggle CppObjectType;
55 typedef CellRendererToggle_Class CppClassType;
56 typedef GtkCellRendererToggle BaseObjectType;
57 typedef GtkCellRendererToggleClass BaseClassType;
58 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
60 virtual ~CellRendererToggle();
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 friend class CellRendererToggle_Class;
66 static CppClassType cellrenderertoggle_class_;
69 CellRendererToggle(const CellRendererToggle&);
70 CellRendererToggle& operator=(const CellRendererToggle&);
73 explicit CellRendererToggle(const Glib::ConstructParams& construct_params);
74 explicit CellRendererToggle(GtkCellRendererToggle* castitem);
76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
84 ///Provides access to the underlying C GtkObject.
85 GtkCellRendererToggle* gobj() { return reinterpret_cast<GtkCellRendererToggle*>(gobject_); }
87 ///Provides access to the underlying C GtkObject.
88 const GtkCellRendererToggle* gobj() const { return reinterpret_cast<GtkCellRendererToggle*>(gobject_); }
92 //C++ methods used to invoke GTK+ virtual functions:
95 //GTK+ Virtual Functions (override these to change behaviour):
97 //Default Signal Handlers::
98 virtual void on_toggled(const Glib::ustring& path);
105 CellRendererToggle();
108 /** Returns wether we're rendering radio toggles rather than checkboxes.
109 * @return <tt>true</tt> if we're rendering radio toggles rather than checkboxes.
111 bool get_radio() const;
113 /** If @a radio is <tt>true</tt>, the cell renderer renders a radio toggle
114 * (i.e.\ a toggle in a group of mutually-exclusive toggles).
115 * If <tt>false</tt>, it renders a check toggle (a standalone boolean option).
116 * This can be set globally for the cell renderer, or changed just
117 * before rendering each cell in the model (for Gtk::TreeView, you set
118 * up a per-row setting using Gtk::TreeViewColumn to associate model
119 * columns with cell renderer properties).
120 * @param radio <tt>true</tt> to make the toggle look like a radio button.
122 void set_radio(bool radio = true);
124 /** Returns whether the cell renderer is active. See
126 * @return <tt>true</tt> if the cell renderer is active.
128 bool get_active() const;
130 /** Activates or deactivates a cell renderer.
131 * @param setting The value to set.
133 void set_active(bool setting = true);
136 Glib::SignalProxy1< void,const Glib::ustring& > signal_toggled();
139 /** The toggle button can be activated.
141 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
142 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
143 * the value of the property changes.
145 Glib::PropertyProxy<bool> property_activatable() ;
147 /** The toggle button can be activated.
149 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
150 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
151 * the value of the property changes.
153 Glib::PropertyProxy_ReadOnly<bool> property_activatable() const;
155 /** The toggle state of the button.
157 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
158 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
159 * the value of the property changes.
161 Glib::PropertyProxy<bool> property_active() ;
163 /** The toggle state of the button.
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_ReadOnly<bool> property_active() const;
171 /** Draw the toggle button as a radio button.
173 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
174 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
175 * the value of the property changes.
177 Glib::PropertyProxy<bool> property_radio() ;
179 /** Draw the toggle button as a radio button.
181 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
182 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
183 * the value of the property changes.
185 Glib::PropertyProxy_ReadOnly<bool> property_radio() const;
188 virtual Glib::PropertyProxy_Base _property_renderable(); //override
193 } /* namespace Gtk */
198 /** @relates Gtk::CellRendererToggle
199 * @param object The C instance
200 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
201 * @result A C++ instance that wraps this C instance.
203 Gtk::CellRendererToggle* wrap(GtkCellRendererToggle* object, bool take_copy = false);
205 #endif /* _GTKMM_CELLRENDERERTOGGLE_H */