1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/misc.h>
4 #include <gtkmm/private/misc_p.h>
11 * Copyright 1998-2002 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/gtkmisc.h>
38 } // anonymous namespace
44 Gtk::Misc* wrap(GtkMisc* object, bool take_copy)
46 return dynamic_cast<Gtk::Misc *> (Glib::wrap_auto ((GObject*)(object), take_copy));
49 } /* namespace Glib */
55 /* The *_Class implementation: */
57 const Glib::Class& Misc_Class::init()
59 if(!gtype_) // create the GType if necessary
61 // Glib::Class has to know the class init function to clone custom types.
62 class_init_func_ = &Misc_Class::class_init_function;
64 // This is actually just optimized away, apparently with no harm.
65 // Make sure that the parent type has been created.
66 //CppClassParent::CppObjectType::get_type();
68 // Create the wrapper type, with the same class/instance size as the base type.
69 register_derived_type(gtk_misc_get_type());
71 // Add derived versions of interfaces, if the C type implements any interfaces:
77 void Misc_Class::class_init_function(void* g_class, void* class_data)
79 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
80 CppClassParent::class_init_function(klass, class_data);
85 Glib::ObjectBase* Misc_Class::wrap_new(GObject* o)
87 return manage(new Misc((GtkMisc*)(o)));
92 /* The implementation: */
94 Misc::Misc(const Glib::ConstructParams& construct_params)
96 Gtk::Widget(construct_params)
100 Misc::Misc(GtkMisc* castitem)
102 Gtk::Widget((GtkWidget*)(castitem))
111 Misc::CppClassType Misc::misc_class_; // initialize static member
113 GType Misc::get_type()
115 return misc_class_.init().get_type();
118 GType Misc::get_base_type()
120 return gtk_misc_get_type();
126 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
127 Gtk::Widget(Glib::ConstructParams(misc_class_.init()))
131 void Misc::set_alignment(float xalign, float yalign)
133 gtk_misc_set_alignment(gobj(), xalign, yalign);
136 void Misc::set_alignment(AlignmentEnum xalign, AlignmentEnum yalign)
138 gtk_misc_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign));
141 void Misc::get_alignment(float& xalign, float& yalign) const
143 gtk_misc_get_alignment(const_cast<GtkMisc*>(gobj()), &(xalign), &(yalign));
146 void Misc::set_padding(int xpad, int ypad)
148 gtk_misc_set_padding(gobj(), xpad, ypad);
151 void Misc::get_padding(int& xpad, int& ypad) const
153 gtk_misc_get_padding(const_cast<GtkMisc*>(gobj()), &xpad, &ypad);
157 Glib::PropertyProxy<float> Misc::property_xalign()
159 return Glib::PropertyProxy<float>(this, "xalign");
162 Glib::PropertyProxy_ReadOnly<float> Misc::property_xalign() const
164 return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
167 Glib::PropertyProxy<float> Misc::property_yalign()
169 return Glib::PropertyProxy<float>(this, "yalign");
172 Glib::PropertyProxy_ReadOnly<float> Misc::property_yalign() const
174 return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
177 Glib::PropertyProxy<int> Misc::property_xpad()
179 return Glib::PropertyProxy<int>(this, "xpad");
182 Glib::PropertyProxy_ReadOnly<int> Misc::property_xpad() const
184 return Glib::PropertyProxy_ReadOnly<int>(this, "xpad");
187 Glib::PropertyProxy<int> Misc::property_ypad()
189 return Glib::PropertyProxy<int>(this, "ypad");
192 Glib::PropertyProxy_ReadOnly<int> Misc::property_ypad() const
194 return Glib::PropertyProxy_ReadOnly<int>(this, "ypad");