diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-11-11 11:37:28 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-11-16 17:18:00 +0100 |
commit | 81cb57b260b22ab2e1a0cb2b29c7c09fd3de128c (patch) | |
tree | 9debb721b3c49dff3599baa2e9e79a632b24b4c7 | |
parent | d0d393174b7168192d0c4eeb65e3c89563b89ff8 (diff) | |
download | gtk+-81cb57b260b22ab2e1a0cb2b29c7c09fd3de128c.tar.gz |
gtkcontainer: clarify requirements for implementations
Spent quite a few time investigating why the widgets were
not shown in my GtkContainer implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=758087
-rw-r--r-- | gtk/gtkcontainer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 30a6d1ef79..9c4b81d70a 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -80,6 +80,16 @@ * children in a horizontal row, and a #GtkGrid arranges the widgets it contains * in a two-dimensional grid. * + * For implementations of #GtkContainer the virtual method #GtkContainerClass.forall() + * is always required, since it's used for drawing and other internal operations + * on the children. + * If the #GtkContainer implementation expect to have non internal children + * it's needed to implement both #GtkContainerClass.add() and #GtkContainerClass.remove(). + * If the GtkContainer implementation has internal children, they should be added + * with gtk_widget_set_parent() on init() and removed with gtk_widget_unparent() + * in the #GtkWidgetClass.destroy() implementation. + * See more about implementing custom widgets at https://wiki.gnome.org/HowDoI/CustomWidgets + * * # Height for width geometry management * * GTK+ uses a height-for-width (and width-for-height) geometry management system. |