/* 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, see .
*/
#include
_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 GTKMM_API ToggleToolButton : public ToolButton
{
_CLASS_GTKOBJECT(ToggleToolButton, GtkToggleToolButton, GTK_TOGGLE_TOOL_BUTTON, Gtk::ToolButton, GtkToolButton, , , GTKMM_API)
public:
/** Creates a new ToggleToolButton.
*/
_CTOR_DEFAULT()
// _WRAP_CTOR does not take a 'deprecated' parameter.
// _WRAP_CTOR(ToggleToolButton(const Gtk::StockID& stock_id), gtk_toggle_tool_button_new_from_stock)
#ifndef GTKMM_DISABLE_DEPRECATED
/** 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.
* @deprecated Use one of the other constructors instead.
*/
explicit ToggleToolButton(const Gtk::StockID& stock_id);
_IGNORE(gtk_toggle_tool_button_new_from_stock)
#endif // GTKMM_DISABLE_DEPRECATED
/** 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)
_WRAP_PROPERTY("active", bool)
};
} // namespace Gtk