add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / toggletoolbutton.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_TOGGLETOOLBUTTON_H
4 #define _GTKMM_TOGGLETOOLBUTTON_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* box.h
12  *
13  * Copyright (C) 2003 The gtkmm Development Team
14  *
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.
19  *
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.
24  *
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.
28  */
29
30 #include <gtkmm/toolbutton.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkToggleToolButton GtkToggleToolButton;
35 typedef struct _GtkToggleToolButtonClass GtkToggleToolButtonClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class ToggleToolButton_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
44 /** A Gtk::ToolItem containing a toggle button.
45  *
46  * A ToggleToolButton is a Gtk::ToolItem that contains a toggle button.
47  * @ingroup Widgets
48  */
49
50 class ToggleToolButton : public ToolButton
51 {
52   public:
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 */
59
60   virtual ~ToggleToolButton();
61
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63
64 private:
65   friend class ToggleToolButton_Class;
66   static CppClassType toggletoolbutton_class_;
67
68   // noncopyable
69   ToggleToolButton(const ToggleToolButton&);
70   ToggleToolButton& operator=(const ToggleToolButton&);
71
72 protected:
73   explicit ToggleToolButton(const Glib::ConstructParams& construct_params);
74   explicit ToggleToolButton(GtkToggleToolButton* castitem);
75
76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
77
78 public:
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80   static GType get_type()      G_GNUC_CONST;
81   static GType get_base_type() G_GNUC_CONST;
82 #endif
83
84   ///Provides access to the underlying C GtkObject.
85   GtkToggleToolButton*       gobj()       { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
86
87   ///Provides access to the underlying C GtkObject.
88   const GtkToggleToolButton* gobj() const { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
89
90
91 public:
92   //C++ methods used to invoke GTK+ virtual functions:
93 #ifdef GLIBMM_VFUNCS_ENABLED
94 #endif //GLIBMM_VFUNCS_ENABLED
95
96 protected:
97   //GTK+ Virtual Functions (override these to change behaviour):
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
100
101   //Default Signal Handlers::
102 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
103   virtual void on_toggled();
104 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
105
106
107 private:
108
109 public:
110
111   /** Creates a new ToggleToolButton.
112    */
113   ToggleToolButton();
114   
115   /** Creates a new ToggleToolButton from a StockID.
116    *
117    * The ToggleToolButton will be created according to the @a stock_id properties.
118    * 
119    * @param stock_id The StockID which determines the look of the ToggleToolButton.
120    */
121   explicit ToggleToolButton(const Gtk::StockID& stock_id);
122   
123   /** Creates a new ToggleToolButton with a label.
124    *
125    * The ToggleToolButton will have the label @a label.
126    *
127    * @param label The string used to display the label for this ToggleToolButton.
128    */
129   explicit ToggleToolButton(const Glib::ustring& label);
130   
131   /** Creates a new ToggleToolButton with an image.
132    *
133    * The ToggleToolButton will have the label @a label and an image widget @a icon_widget.
134    *
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.
137    */
138   explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
139
140   
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.
144    * 
145    * @newin2p4
146    * @param is_active Whether @a button  should be active.
147    */
148   void set_active(bool is_active = true);
149   
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
153    * 
154    * @newin2p4.
155    */
156   bool get_active() const;
157
158   
159   /**
160    * @par Prototype:
161    * <tt>void on_my_%toggled()</tt>
162    */
163
164   Glib::SignalProxy0< void > signal_toggled();
165
166
167 };
168
169 } // namespace Gtk
170
171
172 namespace Glib
173 {
174   /** A Glib::wrap() method for this object.
175    * 
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.
179    *
180    * @relates Gtk::ToggleToolButton
181    */
182   Gtk::ToggleToolButton* wrap(GtkToggleToolButton* object, bool take_copy = false);
183 } //namespace Glib
184
185
186 #endif /* _GTKMM_TOGGLETOOLBUTTON_H */
187