1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #include "gtkbutton.h"
20 #include "gtkdialog.h"
22 #include "gtkhseparator.h"
26 static void gtk_dialog_class_init (GtkDialogClass *klass);
27 static void gtk_dialog_init (GtkDialog *dialog);
31 gtk_dialog_get_type (void)
33 static guint dialog_type = 0;
37 GtkTypeInfo dialog_info =
41 sizeof (GtkDialogClass),
42 (GtkClassInitFunc) gtk_dialog_class_init,
43 (GtkObjectInitFunc) gtk_dialog_init,
44 /* reversed_1 */ NULL,
45 /* reversed_2 */ NULL,
46 (GtkClassInitFunc) NULL,
49 dialog_type = gtk_type_unique (gtk_window_get_type (), &dialog_info);
56 gtk_dialog_class_init (GtkDialogClass *class)
61 gtk_dialog_init (GtkDialog *dialog)
65 dialog->vbox = gtk_vbox_new (FALSE, 0);
66 gtk_container_add (GTK_CONTAINER (dialog), dialog->vbox);
67 gtk_widget_show (dialog->vbox);
69 dialog->action_area = gtk_hbox_new (TRUE, 5);
70 gtk_container_border_width (GTK_CONTAINER (dialog->action_area), 10);
71 gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, FALSE, TRUE, 0);
72 gtk_widget_show (dialog->action_area);
74 separator = gtk_hseparator_new ();
75 gtk_box_pack_end (GTK_BOX (dialog->vbox), separator, FALSE, TRUE, 0);
76 gtk_widget_show (separator);
82 return GTK_WIDGET (gtk_type_new (gtk_dialog_get_type ()));