Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / radiotoolbutton.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/radiotoolbutton.h>
4 #include <gtkmm/private/radiotoolbutton_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /* 
10  *
11  * Copyright 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <gtk/gtkradiotoolbutton.h>
29
30 typedef Gtk::RadioToolButton::Group Group; //So that the generate get_group return type is parsed.
31
32 namespace Gtk
33 {
34
35 RadioToolButton::RadioToolButton(Group& group, const Glib::ustring& label)
36 :
37   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
38   Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
39 {
40   set_group(group);
41 }
42
43 RadioToolButton::RadioToolButton(Group& group, const Gtk::StockID& stock_id)
44 :
45   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
46   Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
47 {
48   //Based on the source of gtk_radio_tool_button_new_from_stock():
49   set_group(group);
50 }
51
52 /* This would look too much like a copy constructor:
53 RadioToolButton::RadioToolButton(RadioToolButton& group, const Gtk::StockID& stock_id)
54 :
55   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
56   Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
57 {
58   //Based on the source of gtk_radio_tool_button_new_with_stock_from_widget():
59   Gtk::RadioButtonGroup radiogroup = group.get_group();
60   set_group(radiogroup);
61 }
62 */
63
64 RadioToolButton::RadioToolButton(Widget& icon_widget, const Glib::ustring& label)
65 :
66   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
67   Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(), "label", label.c_str(), (char*) 0))
68 {
69 }
70
71
72 } // namespace Gtk
73
74
75 namespace
76 {
77 } // anonymous namespace
78
79
80 namespace Glib
81 {
82
83 Gtk::RadioToolButton* wrap(GtkRadioToolButton* object, bool take_copy)
84 {
85   return dynamic_cast<Gtk::RadioToolButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
86 }
87
88 } /* namespace Glib */
89
90 namespace Gtk
91 {
92
93
94 /* The *_Class implementation: */
95
96 const Glib::Class& RadioToolButton_Class::init()
97 {
98   if(!gtype_) // create the GType if necessary
99   {
100     // Glib::Class has to know the class init function to clone custom types.
101     class_init_func_ = &RadioToolButton_Class::class_init_function;
102
103     // This is actually just optimized away, apparently with no harm.
104     // Make sure that the parent type has been created.
105     //CppClassParent::CppObjectType::get_type();
106
107     // Create the wrapper type, with the same class/instance size as the base type.
108     register_derived_type(gtk_radio_tool_button_get_type());
109
110     // Add derived versions of interfaces, if the C type implements any interfaces:
111   }
112
113   return *this;
114 }
115
116 void RadioToolButton_Class::class_init_function(void* g_class, void* class_data)
117 {
118   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
119   CppClassParent::class_init_function(klass, class_data);
120
121 }
122
123
124 Glib::ObjectBase* RadioToolButton_Class::wrap_new(GObject* o)
125 {
126   return manage(new RadioToolButton((GtkRadioToolButton*)(o)));
127
128 }
129
130
131 /* The implementation: */
132
133 RadioToolButton::RadioToolButton(const Glib::ConstructParams& construct_params)
134 :
135   Gtk::ToggleToolButton(construct_params)
136 {
137   }
138
139 RadioToolButton::RadioToolButton(GtkRadioToolButton* castitem)
140 :
141   Gtk::ToggleToolButton((GtkToggleToolButton*)(castitem))
142 {
143   }
144
145 RadioToolButton::~RadioToolButton()
146 {
147   destroy_();
148 }
149
150 RadioToolButton::CppClassType RadioToolButton::radiotoolbutton_class_; // initialize static member
151
152 GType RadioToolButton::get_type()
153 {
154   return radiotoolbutton_class_.init().get_type();
155 }
156
157 GType RadioToolButton::get_base_type()
158 {
159   return gtk_radio_tool_button_get_type();
160 }
161
162
163 RadioToolButton::RadioToolButton()
164 :
165   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
166   Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init()))
167 {
168   }
169
170 Group RadioToolButton::get_group()
171 {
172   return Group(gtk_radio_tool_button_get_group(gobj()));
173 }
174
175 void RadioToolButton::set_group(Group& group)
176 {
177   gtk_radio_tool_button_set_group(gobj(), group.group_);
178 }
179
180
181 } // namespace Gtk
182
183