1997-11-24 22:37:52 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1997-11-24 22:37:52 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +00:00
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#include "gtkbutton.h"
|
|
|
|
#include "gtkdialog.h"
|
|
|
|
#include "gtkhbox.h"
|
|
|
|
#include "gtkhseparator.h"
|
|
|
|
#include "gtkvbox.h"
|
|
|
|
|
|
|
|
|
|
|
|
static void gtk_dialog_class_init (GtkDialogClass *klass);
|
|
|
|
static void gtk_dialog_init (GtkDialog *dialog);
|
|
|
|
|
|
|
|
|
1998-07-14 16:34:48 +00:00
|
|
|
GtkType
|
1998-05-03 22:41:32 +00:00
|
|
|
gtk_dialog_get_type (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-07-14 16:34:48 +00:00
|
|
|
static GtkType dialog_type = 0;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
if (!dialog_type)
|
|
|
|
{
|
1998-11-30 19:07:15 +00:00
|
|
|
static const GtkTypeInfo dialog_info =
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
|
|
|
"GtkDialog",
|
|
|
|
sizeof (GtkDialog),
|
|
|
|
sizeof (GtkDialogClass),
|
|
|
|
(GtkClassInitFunc) gtk_dialog_class_init,
|
|
|
|
(GtkObjectInitFunc) gtk_dialog_init,
|
1998-07-04 15:31:30 +00:00
|
|
|
/* reserved_1 */ NULL,
|
|
|
|
/* reserved_2 */ NULL,
|
1998-06-28 07:46:10 +00:00
|
|
|
(GtkClassInitFunc) NULL,
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
1998-07-14 16:34:48 +00:00
|
|
|
dialog_type = gtk_type_unique (GTK_TYPE_WINDOW, &dialog_info);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return dialog_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_dialog_class_init (GtkDialogClass *class)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gtk_dialog_init (GtkDialog *dialog)
|
|
|
|
{
|
|
|
|
GtkWidget *separator;
|
|
|
|
|
|
|
|
dialog->vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (dialog), dialog->vbox);
|
|
|
|
gtk_widget_show (dialog->vbox);
|
|
|
|
|
|
|
|
dialog->action_area = gtk_hbox_new (TRUE, 5);
|
1998-11-28 07:42:37 +00:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 10);
|
1997-11-24 22:37:52 +00:00
|
|
|
gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (dialog->action_area);
|
|
|
|
|
|
|
|
separator = gtk_hseparator_new ();
|
|
|
|
gtk_box_pack_end (GTK_BOX (dialog->vbox), separator, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (separator);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget*
|
1998-05-03 22:41:32 +00:00
|
|
|
gtk_dialog_new (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-07-14 16:34:48 +00:00
|
|
|
return GTK_WIDGET (gtk_type_new (GTK_TYPE_DIALOG));
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|