diff options
Diffstat (limited to 'libs/gtkmm2/gtk/src/cellrenderertoggle.hg')
-rw-r--r-- | libs/gtkmm2/gtk/src/cellrenderertoggle.hg | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libs/gtkmm2/gtk/src/cellrenderertoggle.hg b/libs/gtkmm2/gtk/src/cellrenderertoggle.hg new file mode 100644 index 0000000000..cc5f42d732 --- /dev/null +++ b/libs/gtkmm2/gtk/src/cellrenderertoggle.hg @@ -0,0 +1,69 @@ +/* $Id: cellrenderertoggle.hg,v 1.5 2006/05/10 20:59:27 murrayc Exp $ */ + +/* cellrenderertoggle.h + * + * Copyright (C) 1998-2002 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <gtkmm/cellrenderer.h> +_DEFS(gtkmm,gtk) +_PINCLUDE(gtkmm/private/cellrenderer_p.h) + + +namespace Gtk +{ + +/** Renders a toggle button in a cell. + * The button is drawn as a radio- or checkbutton, depending on the radio property. When activated, it + * emits the toggled signal. + * + * @ingroup TreeView + */ +class CellRendererToggle : public CellRenderer +{ + _CLASS_GTKOBJECT(CellRendererToggle,GtkCellRendererToggle,GTK_CELL_RENDERER_TOGGLE,Gtk::CellRenderer,GtkCellRenderer) +public: + + _CTOR_DEFAULT + + + _WRAP_METHOD(bool get_radio() const, gtk_cell_renderer_toggle_get_radio) + _WRAP_METHOD(void set_radio(bool radio = true), gtk_cell_renderer_toggle_set_radio) + _WRAP_METHOD(bool get_active() const, gtk_cell_renderer_toggle_get_active) + _WRAP_METHOD(void set_active(bool setting = true), gtk_cell_renderer_toggle_set_active) + + //TODO: Maybe the parameter should be a TreePath. + /** The toggled signal is emitted when the cell is toggled. + * + * @param path string representation of TreePath describing the event location + */ + _WRAP_SIGNAL(void toggled(const Glib::ustring& path), "toggled") + + _WRAP_PROPERTY("activatable", bool) + _WRAP_PROPERTY("active", bool) + _WRAP_PROPERTY("radio", bool) + _WRAP_PROPERTY("indicator-size", int) + +#ifdef GLIBMM_PROPERTIES_ENABLED + virtual Glib::PropertyProxy_Base _property_renderable(); +#else + virtual Glib::ustring _property_renderable(); +#endif +}; + +} /* namespace Gtk */ + |