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 Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #include "gtkbutton.h"
19 #include "gtkdialog.h"
21 #include "gtkhseparator.h"
25 static void gtk_dialog_class_init (GtkDialogClass *klass);
26 static void gtk_dialog_init (GtkDialog *dialog);
30 gtk_dialog_get_type ()
32 static guint dialog_type = 0;
36 GtkTypeInfo dialog_info =
40 sizeof (GtkDialogClass),
41 (GtkClassInitFunc) gtk_dialog_class_init,
42 (GtkObjectInitFunc) gtk_dialog_init,
46 dialog_type = gtk_type_unique (gtk_window_get_type (), &dialog_info);
53 gtk_dialog_class_init (GtkDialogClass *class)
58 gtk_dialog_init (GtkDialog *dialog)
62 dialog->vbox = gtk_vbox_new (FALSE, 0);
63 gtk_container_add (GTK_CONTAINER (dialog), dialog->vbox);
64 gtk_widget_show (dialog->vbox);
66 dialog->action_area = gtk_hbox_new (TRUE, 5);
67 gtk_container_border_width (GTK_CONTAINER (dialog->action_area), 10);
68 gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, FALSE, TRUE, 0);
69 gtk_widget_show (dialog->action_area);
71 separator = gtk_hseparator_new ();
72 gtk_box_pack_end (GTK_BOX (dialog->vbox), separator, FALSE, TRUE, 0);
73 gtk_widget_show (separator);
79 return GTK_WIDGET (gtk_type_new (gtk_dialog_get_type ()));