/* $Id: toggletoolbutton.hg,v 1.5 2004/03/07 14:35:47 murrayc Exp $ */

/* box.h
 *
 * Copyright (C) 2003 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/toolbutton.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/toolbutton_p.h)


namespace Gtk
{

/** A Gtk::ToolItem containing a toggle button.
 *
 * A ToggleToolButton is a Gtk::ToolItem that contains a toggle button.
 *
 * A ToggleToolButton widget looks like this:
 * @image html toggletoolbutton1.png
 *
 * @ingroup Widgets
 */
class ToggleToolButton : public ToolButton
{
  _CLASS_GTKOBJECT(ToggleToolButton, GtkToggleToolButton, GTK_TOGGLE_TOOL_BUTTON, Gtk::ToolButton, GtkToolButton)
public:

  /** Creates a new ToggleToolButton.
   */
  _CTOR_DEFAULT()
  
  /** Creates a new ToggleToolButton from a StockID.
   *
   * The ToggleToolButton will be created according to the @a stock_id properties.
   * 
   * @param stock_id The StockID which determines the look of the ToggleToolButton.
   */
  _WRAP_CTOR(ToggleToolButton(const Gtk::StockID& stock_id), gtk_toggle_tool_button_new_from_stock)
  
  /** Creates a new ToggleToolButton with a label.
   *
   * The ToggleToolButton will have the label @a label.
   *
   * @param label The string used to display the label for this ToggleToolButton.
   */
  explicit ToggleToolButton(const Glib::ustring& label);
  
  /** Creates a new ToggleToolButton with an image.
   *
   * The ToggleToolButton will have the label @a label and an image widget @a icon_widget.
   *
   * @param icon_widget The widget placed as the ToggleToolButton's icon.
   * @param label The string used to display the label for this ToggleToolButton.
   */
  explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());

  _WRAP_METHOD(void set_active(bool is_active = true), gtk_toggle_tool_button_set_active)
  _WRAP_METHOD(bool get_active() const, gtk_toggle_tool_button_get_active)

  _WRAP_SIGNAL(void toggled(), toggled)
};

} // namespace Gtk

