1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/aspectframe.h>
4 #include <gtkmm/private/aspectframe_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/gtkaspectframe.h>
33 } // anonymous namespace
39 Gtk::AspectFrame* wrap(GtkAspectFrame* object, bool take_copy)
41 return dynamic_cast<Gtk::AspectFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
44 } /* namespace Glib */
50 /* The *_Class implementation: */
52 const Glib::Class& AspectFrame_Class::init()
54 if(!gtype_) // create the GType if necessary
56 // Glib::Class has to know the class init function to clone custom types.
57 class_init_func_ = &AspectFrame_Class::class_init_function;
59 // This is actually just optimized away, apparently with no harm.
60 // Make sure that the parent type has been created.
61 //CppClassParent::CppObjectType::get_type();
63 // Create the wrapper type, with the same class/instance size as the base type.
64 register_derived_type(gtk_aspect_frame_get_type());
66 // Add derived versions of interfaces, if the C type implements any interfaces:
72 void AspectFrame_Class::class_init_function(void* g_class, void* class_data)
74 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
75 CppClassParent::class_init_function(klass, class_data);
80 Glib::ObjectBase* AspectFrame_Class::wrap_new(GObject* o)
82 return manage(new AspectFrame((GtkAspectFrame*)(o)));
87 /* The implementation: */
89 AspectFrame::AspectFrame(const Glib::ConstructParams& construct_params)
91 Gtk::Frame(construct_params)
95 AspectFrame::AspectFrame(GtkAspectFrame* castitem)
97 Gtk::Frame((GtkFrame*)(castitem))
101 AspectFrame::~AspectFrame()
106 AspectFrame::CppClassType AspectFrame::aspectframe_class_; // initialize static member
108 GType AspectFrame::get_type()
110 return aspectframe_class_.init().get_type();
113 GType AspectFrame::get_base_type()
115 return gtk_aspect_frame_get_type();
119 AspectFrame::AspectFrame(const Glib::ustring& label, AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
121 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
122 Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", _gtkmm_align_float_from_enum(xalign), "yalign", _gtkmm_align_float_from_enum(yalign), "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
126 AspectFrame::AspectFrame(const Glib::ustring& label, float xalign, float yalign, float ratio, bool obey_child)
128 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
129 Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", xalign, "yalign", yalign, "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
133 void AspectFrame::set(float xalign, float yalign, float ratio, bool obey_child)
135 gtk_aspect_frame_set(gobj(), xalign, yalign, ratio, static_cast<int>(obey_child));
138 void AspectFrame::set(AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
140 gtk_aspect_frame_set(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign), ratio, static_cast<int>(obey_child));
144 Glib::PropertyProxy<float> AspectFrame::property_xalign()
146 return Glib::PropertyProxy<float>(this, "xalign");
149 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_xalign() const
151 return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
154 Glib::PropertyProxy<float> AspectFrame::property_yalign()
156 return Glib::PropertyProxy<float>(this, "yalign");
159 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_yalign() const
161 return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
164 Glib::PropertyProxy<float> AspectFrame::property_ratio()
166 return Glib::PropertyProxy<float>(this, "ratio");
169 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_ratio() const
171 return Glib::PropertyProxy_ReadOnly<float>(this, "ratio");
174 Glib::PropertyProxy<bool> AspectFrame::property_obey_child()
176 return Glib::PropertyProxy<bool>(this, "obey-child");
179 Glib::PropertyProxy_ReadOnly<bool> AspectFrame::property_obey_child() const
181 return Glib::PropertyProxy_ReadOnly<bool>(this, "obey-child");