/* 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 Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
_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 GTKMM_API CellRendererToggle : public CellRenderer
{
_CLASS_GTKOBJECT(CellRendererToggle,GtkCellRendererToggle,GTK_CELL_RENDERER_TOGGLE,Gtk::CellRenderer,GtkCellRenderer,,,GTKMM_API)
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)
_WRAP_METHOD(bool get_activatable() const, gtk_cell_renderer_toggle_get_activatable)
_WRAP_METHOD(void set_activatable(bool setting = true), gtk_cell_renderer_toggle_set_activatable)
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
//TODO: Maybe the parameter should be a TreePath.
_WRAP_SIGNAL(void toggled(const Glib::ustring& path), "toggled")
_WRAP_PROPERTY("activatable", bool)
_WRAP_PROPERTY("active", bool)
_WRAP_PROPERTY("inconsistent", bool)
_WRAP_PROPERTY("radio", bool)
_WRAP_PROPERTY("indicator-size", int,
deprecated "Use the min-width/min-height CSS properties of the check/radio node instead.")
Glib::PropertyProxy_Base _property_renderable() override;
};
} //namespace Gtk