1
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#include <gtkmm/container.h>
4
#include <gtkmm/private/container_p.h>
9
/* Copyright 1998-2002 The gtkmm Development Team
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Library General Public
13
* License as published by the Free Software Foundation; either
14
* version 2 of the License, or (at your option) any later version.
16
* This library is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* Library General Public License for more details.
21
* You should have received a copy of the GNU Library General Public
22
* License along with this library; if not, write to the Free
23
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
#include <gtkmm/adjustment.h>
27
#include <gtk/gtkcontainer.h>
34
void container_foreach_callback(GtkWidget* widget_gobj, void* data)
38
Gtk::Container::ForeachSlot& slot = *static_cast<Gtk::Container::ForeachSlot*>(data);
39
Gtk::Widget *const widget = Glib::wrap(widget_gobj);
41
g_return_if_fail(widget != 0);
47
Glib::exception_handlers_invoke();
51
} // anonymous namespace
57
void Container_Class::remove_callback_custom(GtkContainer* self, GtkWidget* p0)
61
#ifdef GLIBMM_DEBUG_REFCOUNTING
62
g_warning("Container_Class::remove_callback_custom() C self=%p: C child=%p\n", (void*)self, (void*)p0);
63
g_warning("gtypename self: %s\n, gtypename child: %s", G_OBJECT_TYPE_NAME(G_OBJECT(self)), G_OBJECT_TYPE_NAME(G_OBJECT(p0)));
66
//Don't call wrap() on a GTK+ instance whose gtkmm instance has been deleted - just call the original C callback.
67
bool gtkmm_child_already_deleted = Glib::_gobject_cppinstance_already_deleted((GObject*)p0);
69
if(!gtkmm_child_already_deleted)
71
//Call the regular, generated callback:
72
Container_Class::remove_callback(self, p0);
76
BaseClassType *const base = static_cast<BaseClassType*>(
77
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
80
//Call the original underlying C function:
81
if(base && base->remove)
82
(*base->remove)(self, p0);
86
void Container::foreach(const Container::ForeachSlot& slot)
88
ForeachSlot slot_copy (slot);
89
gtk_container_foreach(gobj(), &container_foreach_callback, &slot_copy);
92
void Container::add(Widget& widget)
94
gtk_container_add(gobj(), widget.gobj());
97
bool Container::has_focus_chain() const
99
return gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), 0);
102
Glib::ListHandle<Widget*> Container::get_focus_chain()
105
gtk_container_get_focus_chain(gobj(), &list);
107
return Glib::ListHandle<Widget*>(list, Glib::OWNERSHIP_SHALLOW);
110
Glib::ListHandle<const Widget*> Container::get_focus_chain() const
113
gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), &list);
115
return Glib::ListHandle<const Widget*>(list, Glib::OWNERSHIP_SHALLOW);
119
void Container::show_all_children(bool recursive)
121
// Plain C version if this turns out to be performance-critical:
122
//GtkCallback callback = (GtkCallback) ((recursive) ? >k_widget_show_all : >k_widget_show);
123
//gtk_container_foreach(gobj(), callback, 0);
125
// This could also be done with get_children() and an explicit loop,
126
// if any problems should arise. In gtkmm-1.2, foreach() is known to
127
// cause segfaults eventually, but it seems to work now.
129
foreach(sigc::mem_fun((recursive) ? &Widget::show_all : &Widget::show));
132
void Container::remove(Widget& widget)
134
//If this is a managed widget,
135
//then do an extra ref so that it will
136
//not be destroyed when adding to another container
137
//This should leave it in much the same state as when it was instantiated,
138
//before being added to the first container.
139
if(widget.is_managed_())
142
gtk_container_remove(gobj(), widget.gobj());
146
void Container_Class::destroy_callback(GtkObject* self)
148
#ifdef GLIBMM_DEBUG_REFCOUNTING
149
g_warning("Container_Class::destroy_callback() gobject_=%10X\n", self);
151
g_warning("gtypename: %s\n", G_OBJECT_TYPE_NAME(G_OBJECT(self)));
154
//Call the normal C destroy implementation, such as gtk_button_destroy:
155
//This will chain to gtk_container_destroy(), which will gtk_widget_destroy() any remaining child widgets.
156
GtkObjectClass *const base = static_cast<GtkObjectClass*>(
157
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
160
(*base->destroy)(self);
169
void Container_signal_add_callback(GtkContainer* self, GtkWidget* p0,void* data)
172
typedef sigc::slot< void,Widget* > SlotType;
174
// Do not try to call a signal on a disassociated wrapper.
175
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
179
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
180
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
185
Glib::exception_handlers_invoke();
190
const Glib::SignalProxyInfo Container_signal_add_info =
193
(GCallback) &Container_signal_add_callback,
194
(GCallback) &Container_signal_add_callback
198
void Container_signal_remove_callback(GtkContainer* self, GtkWidget* p0,void* data)
201
typedef sigc::slot< void,Widget* > SlotType;
203
// Do not try to call a signal on a disassociated wrapper.
204
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
208
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
209
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
214
Glib::exception_handlers_invoke();
219
const Glib::SignalProxyInfo Container_signal_remove_info =
222
(GCallback) &Container_signal_remove_callback,
223
(GCallback) &Container_signal_remove_callback
227
const Glib::SignalProxyInfo Container_signal_check_resize_info =
230
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
231
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
235
void Container_signal_set_focus_child_callback(GtkContainer* self, GtkWidget* p0,void* data)
238
typedef sigc::slot< void,Widget* > SlotType;
240
// Do not try to call a signal on a disassociated wrapper.
241
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
245
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
246
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
251
Glib::exception_handlers_invoke();
256
const Glib::SignalProxyInfo Container_signal_set_focus_child_info =
259
(GCallback) &Container_signal_set_focus_child_callback,
260
(GCallback) &Container_signal_set_focus_child_callback
263
} // anonymous namespace
269
Gtk::Container* wrap(GtkContainer* object, bool take_copy)
271
return dynamic_cast<Gtk::Container *> (Glib::wrap_auto ((GObject*)(object), take_copy));
274
} /* namespace Glib */
280
/* The *_Class implementation: */
282
const Glib::Class& Container_Class::init()
284
if(!gtype_) // create the GType if necessary
286
// Glib::Class has to know the class init function to clone custom types.
287
class_init_func_ = &Container_Class::class_init_function;
289
// This is actually just optimized away, apparently with no harm.
290
// Make sure that the parent type has been created.
291
//CppClassParent::CppObjectType::get_type();
293
// Create the wrapper type, with the same class/instance size as the base type.
294
register_derived_type(gtk_container_get_type());
296
// Add derived versions of interfaces, if the C type implements any interfaces:
302
void Container_Class::class_init_function(void* g_class, void* class_data)
304
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
305
CppClassParent::class_init_function(klass, class_data);
307
klass->child_type = &child_type_vfunc_callback;
308
klass->forall = &forall_vfunc_callback;
309
klass->composite_name = &composite_name_vfunc_callback;
310
klass->set_child_property = &set_child_property_vfunc_callback;
311
klass->get_child_property = &get_child_property_vfunc_callback;
312
klass->add = &add_callback;
313
klass->remove = &remove_callback;
314
klass->check_resize = &check_resize_callback;
315
klass->set_focus_child = &set_focus_child_callback;
316
reinterpret_cast<GtkObjectClass*>(klass)->destroy = &destroy_callback;
317
klass->remove = &remove_callback_custom;
319
if(G_OBJECT_CLASS_TYPE(klass) == Gtk::Container::get_type())
321
//Remove the parent class's (GtkContainer) remove callback - it just prints a warning.
322
//This prevents that warning when people derive directly from Gtk::Container.
323
BaseClassType *const base = static_cast<BaseClassType*>( g_type_class_peek_parent(klass) );
329
GtkType Container_Class::child_type_vfunc_callback(GtkContainer* self)
331
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
332
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
334
// Non-gtkmmproc-generated custom classes implicitly call the default
335
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
336
// generated classes can use this optimisation, which avoids the unnecessary
337
// parameter conversions if there is no possibility of the virtual function
339
if(obj && obj->is_derived_())
341
try // Trap C++ exceptions which would normally be lost because this is a C callback.
343
// Call the virtual member method, which derived classes might override.
344
return obj->child_type_vfunc();
348
Glib::exception_handlers_invoke();
353
BaseClassType *const base = static_cast<BaseClassType*>(
354
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
357
// Call the original underlying C function:
358
if(base && base->child_type)
359
return (*base->child_type)(self);
362
typedef GtkType RType;
366
void Container_Class::forall_vfunc_callback(GtkContainer* self, gboolean include_internals, GtkCallback callback, gpointer callback_data)
368
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
369
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
371
// Non-gtkmmproc-generated custom classes implicitly call the default
372
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
373
// generated classes can use this optimisation, which avoids the unnecessary
374
// parameter conversions if there is no possibility of the virtual function
376
if(obj && obj->is_derived_())
378
try // Trap C++ exceptions which would normally be lost because this is a C callback.
380
// Call the virtual member method, which derived classes might override.
381
obj->forall_vfunc(include_internals, callback, callback_data);
385
Glib::exception_handlers_invoke();
390
BaseClassType *const base = static_cast<BaseClassType*>(
391
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
394
// Call the original underlying C function:
395
if(base && base->forall)
396
(*base->forall)(self, include_internals, callback, callback_data);
400
gchar* Container_Class::composite_name_vfunc_callback(GtkContainer* self, GtkWidget* child)
402
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
403
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
405
// Non-gtkmmproc-generated custom classes implicitly call the default
406
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
407
// generated classes can use this optimisation, which avoids the unnecessary
408
// parameter conversions if there is no possibility of the virtual function
410
if(obj && obj->is_derived_())
412
try // Trap C++ exceptions which would normally be lost because this is a C callback.
414
// Call the virtual member method, which derived classes might override.
415
return obj->composite_name_vfunc(child);
419
Glib::exception_handlers_invoke();
424
BaseClassType *const base = static_cast<BaseClassType*>(
425
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
428
// Call the original underlying C function:
429
if(base && base->composite_name)
430
return (*base->composite_name)(self, child);
433
typedef gchar* RType;
437
void Container_Class::set_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec)
439
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
440
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
442
// Non-gtkmmproc-generated custom classes implicitly call the default
443
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
444
// generated classes can use this optimisation, which avoids the unnecessary
445
// parameter conversions if there is no possibility of the virtual function
447
if(obj && obj->is_derived_())
449
try // Trap C++ exceptions which would normally be lost because this is a C callback.
451
// Call the virtual member method, which derived classes might override.
452
obj->set_child_property_vfunc(child, property_id, value, pspec);
456
Glib::exception_handlers_invoke();
461
BaseClassType *const base = static_cast<BaseClassType*>(
462
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
465
// Call the original underlying C function:
466
if(base && base->set_child_property)
467
(*base->set_child_property)(self, child, property_id, value, pspec);
471
void Container_Class::get_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec)
473
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
474
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
476
// Non-gtkmmproc-generated custom classes implicitly call the default
477
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
478
// generated classes can use this optimisation, which avoids the unnecessary
479
// parameter conversions if there is no possibility of the virtual function
481
if(obj && obj->is_derived_())
483
try // Trap C++ exceptions which would normally be lost because this is a C callback.
485
// Call the virtual member method, which derived classes might override.
486
obj->get_child_property_vfunc(child, property_id, value, pspec);
490
Glib::exception_handlers_invoke();
495
BaseClassType *const base = static_cast<BaseClassType*>(
496
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
499
// Call the original underlying C function:
500
if(base && base->get_child_property)
501
(*base->get_child_property)(self, child, property_id, value, pspec);
506
void Container_Class::add_callback(GtkContainer* self, GtkWidget* p0)
508
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
509
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
511
// Non-gtkmmproc-generated custom classes implicitly call the default
512
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
513
// generated classes can use this optimisation, which avoids the unnecessary
514
// parameter conversions if there is no possibility of the virtual function
516
if(obj && obj->is_derived_())
518
try // Trap C++ exceptions which would normally be lost because this is a C callback.
520
// Call the virtual member method, which derived classes might override.
521
obj->on_add(Glib::wrap(p0)
526
Glib::exception_handlers_invoke();
531
BaseClassType *const base = static_cast<BaseClassType*>(
532
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
535
// Call the original underlying C function:
536
if(base && base->add)
537
(*base->add)(self, p0);
541
void Container_Class::remove_callback(GtkContainer* self, GtkWidget* p0)
543
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
544
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
546
// Non-gtkmmproc-generated custom classes implicitly call the default
547
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
548
// generated classes can use this optimisation, which avoids the unnecessary
549
// parameter conversions if there is no possibility of the virtual function
551
if(obj && obj->is_derived_())
553
try // Trap C++ exceptions which would normally be lost because this is a C callback.
555
// Call the virtual member method, which derived classes might override.
556
obj->on_remove(Glib::wrap(p0)
561
Glib::exception_handlers_invoke();
566
BaseClassType *const base = static_cast<BaseClassType*>(
567
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
570
// Call the original underlying C function:
571
if(base && base->remove)
572
(*base->remove)(self, p0);
576
void Container_Class::check_resize_callback(GtkContainer* self)
578
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
579
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
581
// Non-gtkmmproc-generated custom classes implicitly call the default
582
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
583
// generated classes can use this optimisation, which avoids the unnecessary
584
// parameter conversions if there is no possibility of the virtual function
586
if(obj && obj->is_derived_())
588
try // Trap C++ exceptions which would normally be lost because this is a C callback.
590
// Call the virtual member method, which derived classes might override.
591
obj->on_check_resize();
595
Glib::exception_handlers_invoke();
600
BaseClassType *const base = static_cast<BaseClassType*>(
601
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
604
// Call the original underlying C function:
605
if(base && base->check_resize)
606
(*base->check_resize)(self);
610
void Container_Class::set_focus_child_callback(GtkContainer* self, GtkWidget* p0)
612
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
613
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
615
// Non-gtkmmproc-generated custom classes implicitly call the default
616
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
617
// generated classes can use this optimisation, which avoids the unnecessary
618
// parameter conversions if there is no possibility of the virtual function
620
if(obj && obj->is_derived_())
622
try // Trap C++ exceptions which would normally be lost because this is a C callback.
624
// Call the virtual member method, which derived classes might override.
625
obj->on_set_focus_child(Glib::wrap(p0)
630
Glib::exception_handlers_invoke();
635
BaseClassType *const base = static_cast<BaseClassType*>(
636
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
639
// Call the original underlying C function:
640
if(base && base->set_focus_child)
641
(*base->set_focus_child)(self, p0);
646
Glib::ObjectBase* Container_Class::wrap_new(GObject* o)
648
return manage(new Container((GtkContainer*)(o)));
653
/* The implementation: */
655
Container::Container(const Glib::ConstructParams& construct_params)
657
Gtk::Widget(construct_params)
661
Container::Container(GtkContainer* castitem)
663
Gtk::Widget((GtkWidget*)(castitem))
667
Container::~Container()
672
Container::CppClassType Container::container_class_; // initialize static member
674
GType Container::get_type()
676
return container_class_.init().get_type();
679
GType Container::get_base_type()
681
return gtk_container_get_type();
685
void Container::set_border_width(guint border_width)
687
gtk_container_set_border_width(gobj(), border_width);
690
guint Container::get_border_width() const
692
return gtk_container_get_border_width(const_cast<GtkContainer*>(gobj()));
695
void Container::set_resize_mode(ResizeMode resize_mode)
697
gtk_container_set_resize_mode(gobj(), ((GtkResizeMode)(resize_mode)));
700
ResizeMode Container::get_resize_mode() const
702
return ((ResizeMode)(gtk_container_get_resize_mode(const_cast<GtkContainer*>(gobj()))));
705
void Container::check_resize()
707
gtk_container_check_resize(gobj());
710
Glib::ListHandle<Widget*> Container::get_children()
712
return Glib::ListHandle<Widget*>(gtk_container_get_children(gobj()), Glib::OWNERSHIP_SHALLOW);
715
Glib::ListHandle<const Widget*> Container::get_children() const
717
return Glib::ListHandle<const Widget*>(gtk_container_get_children(const_cast<GtkContainer*>(gobj())), Glib::OWNERSHIP_SHALLOW);
720
void Container::propagate_expose(Widget& child, GdkEventExpose* event)
722
gtk_container_propagate_expose(gobj(), (child).gobj(), event);
725
void Container::set_focus_chain(const Glib::ListHandle<Widget*>& focusable_widgets)
727
gtk_container_set_focus_chain(gobj(), focusable_widgets.data());
730
void Container::unset_focus_chain()
732
gtk_container_unset_focus_chain(gobj());
735
void Container::set_reallocate_redraws(bool needs_redraws)
737
gtk_container_set_reallocate_redraws(gobj(), static_cast<int>(needs_redraws));
740
void Container::set_focus_child(Widget& widget)
742
gtk_container_set_focus_child(gobj(), (widget).gobj());
745
void Container::set_focus_vadjustment(Adjustment& adjustment)
747
gtk_container_set_focus_vadjustment(gobj(), (adjustment).gobj());
750
Adjustment* Container::get_focus_vadjustment()
752
return Glib::wrap(gtk_container_get_focus_vadjustment(gobj()));
755
const Adjustment* Container::get_focus_vadjustment() const
757
return Glib::wrap(gtk_container_get_focus_vadjustment(const_cast<GtkContainer*>(gobj())));
760
void Container::set_focus_hadjustment(Adjustment& adjustment)
762
gtk_container_set_focus_hadjustment(gobj(), (adjustment).gobj());
765
Adjustment* Container::get_focus_hadjustment()
767
return Glib::wrap(gtk_container_get_focus_hadjustment(gobj()));
770
const Adjustment* Container::get_focus_hadjustment() const
772
return Glib::wrap(gtk_container_get_focus_hadjustment(const_cast<GtkContainer*>(gobj())));
775
void Container::resize_children()
777
gtk_container_resize_children(gobj());
780
GType Container::child_type() const
782
return gtk_container_child_type(const_cast<GtkContainer*>(gobj()));
785
Container::Container()
787
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
788
Gtk::Widget(Glib::ConstructParams(container_class_.init()))
793
Glib::SignalProxy1< void,Widget* > Container::signal_add()
795
return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_add_info);
798
Glib::SignalProxy1< void,Widget* > Container::signal_remove()
800
return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_remove_info);
803
Glib::SignalProxy0< void > Container::signal_check_resize()
805
return Glib::SignalProxy0< void >(this, &Container_signal_check_resize_info);
808
Glib::SignalProxy1< void,Widget* > Container::signal_set_focus_child()
810
return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_set_focus_child_info);
814
Glib::PropertyProxy<guint> Container::property_border_width()
816
return Glib::PropertyProxy<guint>(this, "border-width");
819
Glib::PropertyProxy_ReadOnly<guint> Container::property_border_width() const
821
return Glib::PropertyProxy_ReadOnly<guint>(this, "border-width");
824
Glib::PropertyProxy<ResizeMode> Container::property_resize_mode()
826
return Glib::PropertyProxy<ResizeMode>(this, "resize-mode");
829
Glib::PropertyProxy_ReadOnly<ResizeMode> Container::property_resize_mode() const
831
return Glib::PropertyProxy_ReadOnly<ResizeMode>(this, "resize-mode");
834
Glib::PropertyProxy_WriteOnly<Widget*> Container::property_child()
836
return Glib::PropertyProxy_WriteOnly<Widget*>(this, "child");
839
Glib::PropertyProxy_ReadOnly<Widget*> Container::property_child() const
841
return Glib::PropertyProxy_ReadOnly<Widget*>(this, "child");
845
void Gtk::Container::on_add(Widget* widget)
847
BaseClassType *const base = static_cast<BaseClassType*>(
848
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
851
if(base && base->add)
852
(*base->add)(gobj(),(GtkWidget*)Glib::unwrap(widget));
855
void Gtk::Container::on_remove(Widget* widget)
857
BaseClassType *const base = static_cast<BaseClassType*>(
858
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
861
if(base && base->remove)
862
(*base->remove)(gobj(),(GtkWidget*)Glib::unwrap(widget));
865
void Gtk::Container::on_check_resize()
867
BaseClassType *const base = static_cast<BaseClassType*>(
868
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
871
if(base && base->check_resize)
872
(*base->check_resize)(gobj());
875
void Gtk::Container::on_set_focus_child(Widget* widget)
877
BaseClassType *const base = static_cast<BaseClassType*>(
878
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
881
if(base && base->set_focus_child)
882
(*base->set_focus_child)(gobj(),(GtkWidget*)Glib::unwrap(widget));
886
GtkType Gtk::Container::child_type_vfunc() const
888
BaseClassType *const base = static_cast<BaseClassType*>(
889
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
892
if(base && base->child_type)
893
return (*base->child_type)(const_cast<GtkContainer*>(gobj()));
895
typedef GtkType RType;
899
void Gtk::Container::forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data)
901
BaseClassType *const base = static_cast<BaseClassType*>(
902
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
905
if(base && base->forall)
906
(*base->forall)(gobj(),include_internals,callback,callback_data);
909
char* Gtk::Container::composite_name_vfunc(GtkWidget* child)
911
BaseClassType *const base = static_cast<BaseClassType*>(
912
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
915
if(base && base->composite_name)
916
return (*base->composite_name)(gobj(),child);
922
void Gtk::Container::set_child_property_vfunc(GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec)
924
BaseClassType *const base = static_cast<BaseClassType*>(
925
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
928
if(base && base->set_child_property)
929
(*base->set_child_property)(gobj(),child,property_id,value,pspec);
932
void Gtk::Container::get_child_property_vfunc(GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec) const
934
BaseClassType *const base = static_cast<BaseClassType*>(
935
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
938
if(base && base->get_child_property)
939
(*base->get_child_property)(const_cast<GtkContainer*>(gobj()),child,property_id,value,pspec);