Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / accellabel.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/accellabel.h>
4 #include <gtkmm/private/accellabel_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/gtkaccellabel.h>
29 #include <glibmm/wrap.h>
30
31 namespace Gtk
32 {
33
34 AccelLabel::AccelLabel(const Glib::ustring& label, bool mnemonic)
35 :
36   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
37   Gtk::Label(Glib::ConstructParams(accellabel_class_.init(), (char*) 0))
38 {
39   if(mnemonic)
40     set_text_with_mnemonic(label);
41   else
42     set_text(label);
43 }
44
45 void AccelLabel::unset_accel_widget()
46 {
47   //Not documented, at the moment, but this is what the source does:
48   gtk_accel_label_set_accel_widget(gobj(), 0);
49 }
50
51 } // namespace Gtk
52
53
54 namespace
55 {
56 } // anonymous namespace
57
58
59 namespace Glib
60 {
61
62 Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy)
63 {
64   return dynamic_cast<Gtk::AccelLabel *> (Glib::wrap_auto ((GObject*)(object), take_copy));
65 }
66
67 } /* namespace Glib */
68
69 namespace Gtk
70 {
71
72
73 /* The *_Class implementation: */
74
75 const Glib::Class& AccelLabel_Class::init()
76 {
77   if(!gtype_) // create the GType if necessary
78   {
79     // Glib::Class has to know the class init function to clone custom types.
80     class_init_func_ = &AccelLabel_Class::class_init_function;
81
82     // This is actually just optimized away, apparently with no harm.
83     // Make sure that the parent type has been created.
84     //CppClassParent::CppObjectType::get_type();
85
86     // Create the wrapper type, with the same class/instance size as the base type.
87     register_derived_type(gtk_accel_label_get_type());
88
89     // Add derived versions of interfaces, if the C type implements any interfaces:
90   }
91
92   return *this;
93 }
94
95 void AccelLabel_Class::class_init_function(void* g_class, void* class_data)
96 {
97   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
98   CppClassParent::class_init_function(klass, class_data);
99
100 }
101
102
103 Glib::ObjectBase* AccelLabel_Class::wrap_new(GObject* o)
104 {
105   return manage(new AccelLabel((GtkAccelLabel*)(o)));
106
107 }
108
109
110 /* The implementation: */
111
112 AccelLabel::AccelLabel(const Glib::ConstructParams& construct_params)
113 :
114   Gtk::Label(construct_params)
115 {
116   }
117
118 AccelLabel::AccelLabel(GtkAccelLabel* castitem)
119 :
120   Gtk::Label((GtkLabel*)(castitem))
121 {
122   }
123
124 AccelLabel::~AccelLabel()
125 {
126   destroy_();
127 }
128
129 AccelLabel::CppClassType AccelLabel::accellabel_class_; // initialize static member
130
131 GType AccelLabel::get_type()
132 {
133   return accellabel_class_.init().get_type();
134 }
135
136 GType AccelLabel::get_base_type()
137 {
138   return gtk_accel_label_get_type();
139 }
140
141
142 AccelLabel::AccelLabel()
143 :
144   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
145   Gtk::Label(Glib::ConstructParams(accellabel_class_.init()))
146 {
147   }
148
149 void AccelLabel::set_accel_widget(const Widget& accel_widget)
150 {
151   gtk_accel_label_set_accel_widget(gobj(), const_cast<GtkWidget*>((accel_widget).gobj()));
152 }
153
154 Widget* AccelLabel::get_accel_widget()
155 {
156   return Glib::wrap(gtk_accel_label_get_accel_widget(gobj()));
157 }
158
159 const Widget* AccelLabel::get_accel_widget() const
160 {
161   return Glib::wrap(gtk_accel_label_get_accel_widget(const_cast<GtkAccelLabel*>(gobj())));
162 }
163
164 guint AccelLabel::get_accel_width() const
165 {
166   return gtk_accel_label_get_accel_width(const_cast<GtkAccelLabel*>(gobj()));
167 }
168
169 bool AccelLabel::refetch()
170 {
171   return gtk_accel_label_refetch(gobj());
172 }
173
174
175 Glib::PropertyProxy<Gtk::Widget*> AccelLabel::property_accel_widget() 
176 {
177   return Glib::PropertyProxy<Gtk::Widget*>(this, "accel-widget");
178 }
179
180 Glib::PropertyProxy_ReadOnly<Gtk::Widget*> AccelLabel::property_accel_widget() const
181 {
182   return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "accel-widget");
183 }
184
185
186 } // namespace Gtk
187
188