1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/expander.h>
4 #include <gtkmm/private/expander_p.h>
11 * Copyright 2003 The gtkmm Development Team
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.
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.
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.
28 #include <gtk/gtkexpander.h>
33 Expander::Expander(const Glib::ustring& label, bool mnemonic)
35 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
36 Gtk::Bin(Glib::ConstructParams(expander_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
44 } // anonymous namespace
50 Gtk::Expander* wrap(GtkExpander* object, bool take_copy)
52 return dynamic_cast<Gtk::Expander *> (Glib::wrap_auto ((GObject*)(object), take_copy));
55 } /* namespace Glib */
61 /* The *_Class implementation: */
63 const Glib::Class& Expander_Class::init()
65 if(!gtype_) // create the GType if necessary
67 // Glib::Class has to know the class init function to clone custom types.
68 class_init_func_ = &Expander_Class::class_init_function;
70 // This is actually just optimized away, apparently with no harm.
71 // Make sure that the parent type has been created.
72 //CppClassParent::CppObjectType::get_type();
74 // Create the wrapper type, with the same class/instance size as the base type.
75 register_derived_type(gtk_expander_get_type());
77 // Add derived versions of interfaces, if the C type implements any interfaces:
83 void Expander_Class::class_init_function(void* g_class, void* class_data)
85 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
86 CppClassParent::class_init_function(klass, class_data);
91 Glib::ObjectBase* Expander_Class::wrap_new(GObject* o)
93 return manage(new Expander((GtkExpander*)(o)));
98 /* The implementation: */
100 Expander::Expander(const Glib::ConstructParams& construct_params)
102 Gtk::Bin(construct_params)
106 Expander::Expander(GtkExpander* castitem)
108 Gtk::Bin((GtkBin*)(castitem))
112 Expander::~Expander()
117 Expander::CppClassType Expander::expander_class_; // initialize static member
119 GType Expander::get_type()
121 return expander_class_.init().get_type();
124 GType Expander::get_base_type()
126 return gtk_expander_get_type();
132 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
133 Gtk::Bin(Glib::ConstructParams(expander_class_.init()))
137 void Expander::set_expanded(bool expanded)
139 gtk_expander_set_expanded(gobj(), static_cast<int>(expanded));
142 bool Expander::get_expanded() const
144 return gtk_expander_get_expanded(const_cast<GtkExpander*>(gobj()));
147 void Expander::set_spacing(int spacing)
149 gtk_expander_set_spacing(gobj(), spacing);
152 int Expander::get_spacing() const
154 return gtk_expander_get_spacing(const_cast<GtkExpander*>(gobj()));
157 void Expander::set_label(const Glib::ustring& label)
159 gtk_expander_set_label(gobj(), label.c_str());
162 Glib::ustring Expander::get_label() const
164 return Glib::convert_const_gchar_ptr_to_ustring(gtk_expander_get_label(const_cast<GtkExpander*>(gobj())));
167 void Expander::set_use_underline(bool use_underline)
169 gtk_expander_set_use_underline(gobj(), static_cast<int>(use_underline));
172 bool Expander::get_use_underline() const
174 return gtk_expander_get_use_underline(const_cast<GtkExpander*>(gobj()));
177 void Expander::set_use_markup(bool use_markup)
179 gtk_expander_set_use_markup(gobj(), static_cast<int>(use_markup));
182 bool Expander::get_use_markup() const
184 return gtk_expander_get_use_markup(const_cast<GtkExpander*>(gobj()));
187 void Expander::set_label_widget(Widget& label_widget)
189 gtk_expander_set_label_widget(gobj(), (label_widget).gobj());
192 Widget* Expander::get_label_widget()
194 return Glib::wrap(gtk_expander_get_label_widget(gobj()));
197 const Widget* Expander::get_label_widget() const
199 return Glib::wrap(gtk_expander_get_label_widget(const_cast<GtkExpander*>(gobj())));
203 Glib::PropertyProxy<bool> Expander::property_expanded()
205 return Glib::PropertyProxy<bool>(this, "expanded");
208 Glib::PropertyProxy_ReadOnly<bool> Expander::property_expanded() const
210 return Glib::PropertyProxy_ReadOnly<bool>(this, "expanded");
213 Glib::PropertyProxy<Glib::ustring> Expander::property_label()
215 return Glib::PropertyProxy<Glib::ustring>(this, "label");
218 Glib::PropertyProxy_ReadOnly<Glib::ustring> Expander::property_label() const
220 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
223 Glib::PropertyProxy<bool> Expander::property_use_underline()
225 return Glib::PropertyProxy<bool>(this, "use-underline");
228 Glib::PropertyProxy_ReadOnly<bool> Expander::property_use_underline() const
230 return Glib::PropertyProxy_ReadOnly<bool>(this, "use-underline");
233 Glib::PropertyProxy<bool> Expander::property_use_markup()
235 return Glib::PropertyProxy<bool>(this, "use-markup");
238 Glib::PropertyProxy_ReadOnly<bool> Expander::property_use_markup() const
240 return Glib::PropertyProxy_ReadOnly<bool>(this, "use-markup");
243 Glib::PropertyProxy<int> Expander::property_spacing()
245 return Glib::PropertyProxy<int>(this, "spacing");
248 Glib::PropertyProxy_ReadOnly<int> Expander::property_spacing() const
250 return Glib::PropertyProxy_ReadOnly<int>(this, "spacing");
253 Glib::PropertyProxy<Widget*> Expander::property_label_widget()
255 return Glib::PropertyProxy<Widget*>(this, "label-widget");
258 Glib::PropertyProxy_ReadOnly<Widget*> Expander::property_label_widget() const
260 return Glib::PropertyProxy_ReadOnly<Widget*>(this, "label-widget");