Re: Extended Layout Summary
- Date: Thu, 10 Jan 2008 17:19:48 +0100
- From: Sven Herzberg <herzi@xxxxxxxxxxxx>
- Subject: Re: Extended Layout Summary
Am Freitag, den 21.12.2007, 11:05 +0100 schrieb Mathias Hasselmann:
> Am Donnerstag, den 20.12.2007, 11:46 -0500 schrieb Havoc Pennington:
> > Third, since implementing an interface requires extra boilerplate
> > GObject stuff, it would be convenient for authors of a custom widget if
> > GtkWidget already did the boilerplate for them. Since for newly-written
> > custom widgets, the recommendation would be to always support extended
> > layout.
>
> I don't see the boilerplate savings you talk about? As far as I
> understand GObject interfaces, you always need this this single-line
> boilerplate for overriding interface methods:
>
> G_DEFINE_TYPE_WITH_CODE (MamanBar, maman, GTK_TYPE_WIDGET,
> G_IMPLEMENT_INTERFACE (GTK_TYPE_IFACE, maman_bar_iface_init))
Not if GtkWidget already implements GtkExtendedLayout->get_min_size()
like this: GTK_WIDGET_GET_CLASS(instance)->get_min_size. Then you could
easily override the implementation in class_init(). I think this was
what Havoc meant.
Regards,
Sven
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-devel-list