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.
21 * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #include "gtkbutton.h"
28 #include "gtkdialog.h"
30 #include "gtkhseparator.h"
34 static void gtk_dialog_class_init (GtkDialogClass *klass);
35 static void gtk_dialog_init (GtkDialog *dialog);
39 gtk_dialog_get_type (void)
41 static GtkType dialog_type = 0;
45 static const GtkTypeInfo dialog_info =
49 sizeof (GtkDialogClass),
50 (GtkClassInitFunc) gtk_dialog_class_init,
51 (GtkObjectInitFunc) gtk_dialog_init,
52 /* reserved_1 */ NULL,
53 /* reserved_2 */ NULL,
54 (GtkClassInitFunc) NULL,
57 dialog_type = gtk_type_unique (GTK_TYPE_WINDOW, &dialog_info);
64 gtk_dialog_class_init (GtkDialogClass *class)
69 gtk_dialog_init (GtkDialog *dialog)
73 dialog->vbox = gtk_vbox_new (FALSE, 0);
74 gtk_container_add (GTK_CONTAINER (dialog), dialog->vbox);
75 gtk_widget_show (dialog->vbox);
77 dialog->action_area = gtk_hbox_new (TRUE, 5);
78 gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 10);
79 gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, FALSE, TRUE, 0);
80 gtk_widget_show (dialog->action_area);
82 separator = gtk_hseparator_new ();
83 gtk_box_pack_end (GTK_BOX (dialog->vbox), separator, FALSE, TRUE, 0);
84 gtk_widget_show (separator);
90 return GTK_WIDGET (gtk_type_new (GTK_TYPE_DIALOG));