2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_TOGGLETOOLBUTTON_H
4 #define _GTKMM_TOGGLETOOLBUTTON_H
13 * Copyright (C) 2003 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gtkmm/toolbutton.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkToggleToolButton GtkToggleToolButton;
35 typedef struct _GtkToggleToolButtonClass GtkToggleToolButtonClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class ToggleToolButton_Class; } // namespace Gtk
44 /** A Gtk::ToolItem containing a toggle button.
46 * A ToggleToolButton is a Gtk::ToolItem that contains a toggle button.
50 class ToggleToolButton : public ToolButton
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef ToggleToolButton CppObjectType;
55 typedef ToggleToolButton_Class CppClassType;
56 typedef GtkToggleToolButton BaseObjectType;
57 typedef GtkToggleToolButtonClass BaseClassType;
58 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
60 virtual ~ToggleToolButton();
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 friend class ToggleToolButton_Class;
66 static CppClassType toggletoolbutton_class_;
69 ToggleToolButton(const ToggleToolButton&);
70 ToggleToolButton& operator=(const ToggleToolButton&);
73 explicit ToggleToolButton(const Glib::ConstructParams& construct_params);
74 explicit ToggleToolButton(GtkToggleToolButton* castitem);
76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
84 ///Provides access to the underlying C GtkObject.
85 GtkToggleToolButton* gobj() { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
87 ///Provides access to the underlying C GtkObject.
88 const GtkToggleToolButton* gobj() const { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
92 //C++ methods used to invoke GTK+ virtual functions:
93 #ifdef GLIBMM_VFUNCS_ENABLED
94 #endif //GLIBMM_VFUNCS_ENABLED
97 //GTK+ Virtual Functions (override these to change behaviour):
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
101 //Default Signal Handlers::
102 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
103 virtual void on_toggled();
104 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
111 /** Creates a new ToggleToolButton.
115 /** Creates a new ToggleToolButton from a StockID.
117 * The ToggleToolButton will be created according to the @a stock_id properties.
119 * @param stock_id The StockID which determines the look of the ToggleToolButton.
121 explicit ToggleToolButton(const Gtk::StockID& stock_id);
123 /** Creates a new ToggleToolButton with a label.
125 * The ToggleToolButton will have the label @a label.
127 * @param label The string used to display the label for this ToggleToolButton.
129 explicit ToggleToolButton(const Glib::ustring& label);
131 /** Creates a new ToggleToolButton with an image.
133 * The ToggleToolButton will have the label @a label and an image widget @a icon_widget.
135 * @param icon_widget The widget placed as the ToggleToolButton's icon.
136 * @param label The string used to display the label for this ToggleToolButton.
138 explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
141 /** Sets the status of the toggle tool button. Set to <tt>true</tt> if you
142 * want the GtkToggleButton to be 'pressed in', and <tt>false</tt> to raise it.
143 * This action causes the toggled signal to be emitted.
146 * @param is_active Whether @a button should be active.
148 void set_active(bool is_active = true);
150 /** Queries a Gtk::ToggleToolButton and returns its current state.
151 * Return value: <tt>true</tt> if the toggle tool button is pressed in, <tt>false</tt> if not
152 * @return <tt>true</tt> if the toggle tool button is pressed in, <tt>false</tt> if not
156 bool get_active() const;
161 * <tt>void on_my_%toggled()</tt>
164 Glib::SignalProxy0< void > signal_toggled();
174 /** A Glib::wrap() method for this object.
176 * @param object The C instance.
177 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
178 * @result A C++ instance that wraps this C instance.
180 * @relates Gtk::ToggleToolButton
182 Gtk::ToggleToolButton* wrap(GtkToggleToolButton* object, bool take_copy = false);
186 #endif /* _GTKMM_TOGGLETOOLBUTTON_H */