]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkhbox.c
Don't use *DISABLE_DEPRECATED guards
[~andy/gtk] / gtk / gtkhbox.c
index b917c4019d43494a9b700cc02652c52bd3655a7e..503fe2458b929b30ec7bc17615e96f323b1b0c4c 100644 (file)
 
 #include "config.h"
 
-#include "gtkhbox.h"
+#include "gtkboxprivate.h"
 #include "gtkorientable.h"
-#include "gtkalias.h"
+
+#include "gtkhbox.h"
+
+
+/**
+ * SECTION:gtkhbox
+ * @Short_description: A horizontal container box
+ * @Title: GtkHBox
+ * @See_also: #GtkVBox
+ *
+ * #GtkHBox is a container that organizes child widgets into a single row.
+ *
+ * Use the #GtkBox packing interface to determine the arrangement,
+ * spacing, width, and alignment of #GtkHBox children.
+ *
+ * All children are allocated the same height.
+ *
+ * GtkHBox has been deprecated. You can use #GtkBox instead, which is a
+ * very quick and easy change. If you have derived your own classes from
+ * GtkHBox, you can simply change the inheritance to derive directly
+ * from #GtkBox. No further changes are needed, since the default
+ * value of the #GtkOrientable::orientation property is
+ * %GTK_ORIENTATION_HORIZONTAL.
+ * If you want your code to be future-proof, the recommendation is to
+ * switch to #GtkGrid, since #GtkBox is going to be deprecated in favor
+ * of the more flexible grid widget eventually. For more information
+ * about migrating to #GtkGrid, see <xref linkend="gtk-migrating-GtkGrid"/>
+ */
+
 
 G_DEFINE_TYPE (GtkHBox, gtk_hbox, GTK_TYPE_BOX)
 
@@ -46,6 +74,20 @@ gtk_hbox_init (GtkHBox *hbox)
   _gtk_box_set_old_defaults (GTK_BOX (hbox));
 }
 
+/**
+ * gtk_hbox_new:
+ * @homogeneous: %TRUE if all children are to be given equal space allotments.
+ * @spacing: the number of pixels to place by default between children.
+ *
+ * Creates a new #GtkHBox.
+ *
+ * Returns: a new #GtkHBox.
+ *
+ * Deprecated: 3.2: You can use gtk_box_new() with %GTK_ORIENTATION_HORIZONTAL instead,
+ *   wich is a very quick and easy change. But the recommendation is to switch to
+ *   #GtkGrid, since #GtkBox is going to go away eventually.
+ *   See <xref linkend="gtk-migrating-GtkGrid"/>.
+ */
 GtkWidget *
 gtk_hbox_new (gboolean homogeneous,
              gint     spacing)
@@ -55,6 +97,3 @@ gtk_hbox_new (gboolean homogeneous,
                        "homogeneous", homogeneous ? TRUE : FALSE,
                        NULL);
 }
-
-#define __GTK_HBOX_C__
-#include "gtkaliasdef.c"