/* Copyright (C) 2010 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gtkmm/widget.h>
#include <gtkmm/activatable.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)

namespace Gtk
{

/** A "light switch"-style toggle.
 *
 * The Switch widget has two states: on or off. The user can control
 * which state should be active by clicking the empty area, or by dragging the
 * handle.
 *
 * @ingroup Widgets
 * @newin{3,0}
 */
class Switch
  : public Widget,
    public Activatable
{
  _CLASS_GTKOBJECT(Switch, GtkSwitch, GTK_SWITCH, Gtk::Widget, GtkWidget)
  _IMPLEMENTS_INTERFACE(Activatable)
public:

  _CTOR_DEFAULT

  _WRAP_METHOD(void set_active(bool is_active = true), gtk_switch_set_active)
  _WRAP_METHOD(bool get_active() const, gtk_switch_get_active)

  _WRAP_PROPERTY("active", bool)
};

} // namespace Gtk
