[gtk+/wip/csoriano/pathbar-prototype: 1/23] gtkcontainer: clarify requirements for implementations



commit 76f64faea587a0dce30cf8890e936e18d69ec5f1
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Nov 11 11:37:28 2015 +0100

    gtkcontainer: clarify requirements for implementations
    
    Spent quite a few time investigating why the widgets were
    not shown in my GtkContainer implementation.

 gtk/gtkcontainer.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 30a6d1e..3daeb79 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -80,6 +80,15 @@
  * 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 gtk_container_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 gtk_container_add() and gtk_container_remove().
+ * If the GtkContainer implementation has internal children, it's needed to
+ * set your container as parent with gtk_widget_set_parent() on init() and
+ * unparent them in the destroy() virtual method of the container.
+ *
  * # Height for width geometry management
  *
  * GTK+ uses a height-for-width (and width-for-height) geometry management system.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]