/* Create a new hbox with the appropriate homogeneous
* and spacing settings */
- box = gtk_hbox_new (homogeneous, spacing);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, homogeneous, spacing);
/* Create a series of buttons with the appropriate settings */
button = gtk_button_new_with_label ("gtk_box_pack");
/* We create a vertical box (vbox) to pack the horizontal boxes into.
* This allows us to stack the horizontal boxes filled with buttons one
* on top of the other in this vbox. */
- box1 = gtk_vbox_new (FALSE, 0);
+ box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
/* which example to show. These correspond to the pictures above. */
switch (which) {
case 1:
/* create a new label. */
- label = gtk_label_new ("gtk_hbox_new (FALSE, 0);");
+ label = gtk_label_new ("gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);");
/* Align the label to the left side. We'll discuss this function and
* others in the section on Widget Attributes. */
gtk_widget_show (separator);
/* Create another new label, and show it. */
- label = gtk_label_new ("gtk_hbox_new (TRUE, 0);");
+ label = gtk_label_new ("gtk_box_new (GTK_ORIENTATION_HORIZONTAL, TRUE, 0);");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);
gtk_widget_show (label);
/* Create a new label, remember box1 is a vbox as created
* near the beginning of main() */
- label = gtk_label_new ("gtk_hbox_new (FALSE, 10);");
+ label = gtk_label_new ("gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 10);");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
gtk_widget_show (separator);
- label = gtk_label_new ("gtk_hbox_new (FALSE, 0);");
+ label = gtk_label_new ("gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);
gtk_widget_show (label);
}
/* Create another new hbox.. remember we can use as many as we need! */
- quitbox = gtk_hbox_new (FALSE, 0);
+ quitbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
/* Our quit button. */
button = gtk_button_new_with_label ("Quit");