1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/paned.h>
4 #include <gtkmm/private/paned_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/gtkpaned.h>
29 #include <gtk/gtkhpaned.h>
30 #include <gtk/gtkvpaned.h>
35 void Paned::pack1(Widget& child, AttachOptions options)
37 const gboolean resize = ((options & EXPAND) != 0);
38 const gboolean shrink = ((options & SHRINK) != 0);
40 gtk_paned_pack1(gobj(), child.gobj(), resize, shrink);
43 void Paned::pack2(Widget& child, AttachOptions options)
45 const gboolean resize = ((options & EXPAND) != 0);
46 const gboolean shrink = ((options & SHRINK) != 0);
48 gtk_paned_pack2(gobj(), child.gobj(), resize, shrink);
56 } // anonymous namespace
62 Gtk::Paned* wrap(GtkPaned* object, bool take_copy)
64 return dynamic_cast<Gtk::Paned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
67 } /* namespace Glib */
73 /* The *_Class implementation: */
75 const Glib::Class& Paned_Class::init()
77 if(!gtype_) // create the GType if necessary
79 // Glib::Class has to know the class init function to clone custom types.
80 class_init_func_ = &Paned_Class::class_init_function;
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();
86 // Create the wrapper type, with the same class/instance size as the base type.
87 register_derived_type(gtk_paned_get_type());
89 // Add derived versions of interfaces, if the C type implements any interfaces:
95 void Paned_Class::class_init_function(void* g_class, void* class_data)
97 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
98 CppClassParent::class_init_function(klass, class_data);
103 Glib::ObjectBase* Paned_Class::wrap_new(GObject* o)
105 return manage(new Paned((GtkPaned*)(o)));
110 /* The implementation: */
112 Paned::Paned(const Glib::ConstructParams& construct_params)
114 Gtk::Container(construct_params)
118 Paned::Paned(GtkPaned* castitem)
120 Gtk::Container((GtkContainer*)(castitem))
129 Paned::CppClassType Paned::paned_class_; // initialize static member
131 GType Paned::get_type()
133 return paned_class_.init().get_type();
136 GType Paned::get_base_type()
138 return gtk_paned_get_type();
144 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
145 Gtk::Container(Glib::ConstructParams(paned_class_.init()))
149 void Paned::add1(Widget& child)
151 gtk_paned_add1(gobj(), (child).gobj());
154 void Paned::add2(Widget& child)
156 gtk_paned_add2(gobj(), (child).gobj());
159 void Paned::pack1(Widget& child, bool resize, bool shrink)
161 gtk_paned_pack1(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
164 void Paned::pack2(Widget& child, bool resize, bool shrink)
166 gtk_paned_pack2(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
169 int Paned::get_position() const
171 return gtk_paned_get_position(const_cast<GtkPaned*>(gobj()));
174 void Paned::set_position(int position)
176 gtk_paned_set_position(gobj(), position);
179 Widget* Paned::get_child1()
181 return Glib::wrap(gtk_paned_get_child1(gobj()));
184 const Widget* Paned::get_child1() const
186 return Glib::wrap(gtk_paned_get_child1(const_cast<GtkPaned*>(gobj())));
189 Widget* Paned::get_child2()
191 return Glib::wrap(gtk_paned_get_child2(gobj()));
194 const Widget* Paned::get_child2() const
196 return Glib::wrap(gtk_paned_get_child2(const_cast<GtkPaned*>(gobj())));
200 Glib::PropertyProxy<int> Paned::property_position()
202 return Glib::PropertyProxy<int>(this, "position");
205 Glib::PropertyProxy_ReadOnly<int> Paned::property_position() const
207 return Glib::PropertyProxy_ReadOnly<int>(this, "position");
210 Glib::PropertyProxy<bool> Paned::property_position_set()
212 return Glib::PropertyProxy<bool>(this, "position-set");
215 Glib::PropertyProxy_ReadOnly<bool> Paned::property_position_set() const
217 return Glib::PropertyProxy_ReadOnly<bool>(this, "position-set");
220 Glib::PropertyProxy_ReadOnly<int> Paned::property_min_position() const
222 return Glib::PropertyProxy_ReadOnly<int>(this, "min-position");
225 Glib::PropertyProxy_ReadOnly<int> Paned::property_max_position() const
227 return Glib::PropertyProxy_ReadOnly<int>(this, "max-position");
237 Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy)
239 return dynamic_cast<Gtk::HPaned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
242 } /* namespace Glib */
248 /* The *_Class implementation: */
250 const Glib::Class& HPaned_Class::init()
252 if(!gtype_) // create the GType if necessary
254 // Glib::Class has to know the class init function to clone custom types.
255 class_init_func_ = &HPaned_Class::class_init_function;
257 // This is actually just optimized away, apparently with no harm.
258 // Make sure that the parent type has been created.
259 //CppClassParent::CppObjectType::get_type();
261 // Create the wrapper type, with the same class/instance size as the base type.
262 register_derived_type(gtk_hpaned_get_type());
264 // Add derived versions of interfaces, if the C type implements any interfaces:
270 void HPaned_Class::class_init_function(void* g_class, void* class_data)
272 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
273 CppClassParent::class_init_function(klass, class_data);
278 Glib::ObjectBase* HPaned_Class::wrap_new(GObject* o)
280 return manage(new HPaned((GtkHPaned*)(o)));
285 /* The implementation: */
287 HPaned::HPaned(const Glib::ConstructParams& construct_params)
289 Gtk::Paned(construct_params)
293 HPaned::HPaned(GtkHPaned* castitem)
295 Gtk::Paned((GtkPaned*)(castitem))
304 HPaned::CppClassType HPaned::hpaned_class_; // initialize static member
306 GType HPaned::get_type()
308 return hpaned_class_.init().get_type();
311 GType HPaned::get_base_type()
313 return gtk_hpaned_get_type();
318 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
319 Gtk::Paned(Glib::ConstructParams(hpaned_class_.init()))
330 Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy)
332 return dynamic_cast<Gtk::VPaned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
335 } /* namespace Glib */
341 /* The *_Class implementation: */
343 const Glib::Class& VPaned_Class::init()
345 if(!gtype_) // create the GType if necessary
347 // Glib::Class has to know the class init function to clone custom types.
348 class_init_func_ = &VPaned_Class::class_init_function;
350 // This is actually just optimized away, apparently with no harm.
351 // Make sure that the parent type has been created.
352 //CppClassParent::CppObjectType::get_type();
354 // Create the wrapper type, with the same class/instance size as the base type.
355 register_derived_type(gtk_vpaned_get_type());
357 // Add derived versions of interfaces, if the C type implements any interfaces:
363 void VPaned_Class::class_init_function(void* g_class, void* class_data)
365 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
366 CppClassParent::class_init_function(klass, class_data);
371 Glib::ObjectBase* VPaned_Class::wrap_new(GObject* o)
373 return manage(new VPaned((GtkVPaned*)(o)));
378 /* The implementation: */
380 VPaned::VPaned(const Glib::ConstructParams& construct_params)
382 Gtk::Paned(construct_params)
386 VPaned::VPaned(GtkVPaned* castitem)
388 Gtk::Paned((GtkPaned*)(castitem))
397 VPaned::CppClassType VPaned::vpaned_class_; // initialize static member
399 GType VPaned::get_type()
401 return vpaned_class_.init().get_type();
404 GType VPaned::get_base_type()
406 return gtk_vpaned_get_type();
411 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
412 Gtk::Paned(Glib::ConstructParams(vpaned_class_.init()))