]> git.sur5r.net Git - glabels/blob - glabels1/src/propertybox.h
2009-09-22 Jim Evins <evins@snaught.com>
[glabels] / glabels1 / src / propertybox.h
1 /* Modified version of gnome-propertybox from gnome-libs-1.4 */
2 /* Primarily removed the "help" button and changed the names.*/
3 /*  -Jim Evins 11/25/2001 */
4
5 /* gnome-propertybox.h - Property dialog box.
6
7    Copyright (C) 1998 Tom Tromey
8
9    This library is free software; you can redistribute it and/or
10    modify it under the terms of the GNU Library General Public License
11    as published by the Free Software Foundation; either version 2, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17    Library General Public License for more details.
18
19    You should have received a copy of the GNU Library General Public
20    License along with this program; if not, write to the Free Software
21    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22    02111-1307, USA.  */
23
24 #ifndef __PROPERTY_BOX_H__
25 #define __PROPERTY_BOX_H__
26
27 #include <libgnomeui/gnome-dialog.h>
28 #include <libgnome/gnome-defs.h>
29
30 BEGIN_GNOME_DECLS
31 #define GL_TYPE_PROPERTY_BOX            (gl_property_box_get_type ())
32 #define GL_PROPERTY_BOX(obj)            (GTK_CHECK_CAST ((obj), GL_TYPE_PROPERTY_BOX, glPropertyBox))
33 #define GL_PROPERTY_BOX_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROPERTY_BOX, glPropertyBoxClass))
34 #define GL_IS_PROPERTY_BOX(obj)         (GTK_CHECK_TYPE ((obj), GL_TYPE_PROPERTY_BOX))
35 #define GL_IS_PROPERTY_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROPERTY_BOX))
36 /*the flag used on the notebook pages to see if a change happened on a certain page or not*/
37 #define GL_PROPERTY_BOX_DIRTY   "gl_property_box_dirty"
38 typedef struct _glPropertyBox glPropertyBox;
39 typedef struct _glPropertyBoxClass glPropertyBoxClass;
40
41 struct _glPropertyBox {
42         GnomeDialog dialog;
43
44         GtkWidget *notebook;    /* The notebook widget.  */
45         GtkWidget *ok_button;   /* OK button.  */
46         GtkWidget *apply_button;        /* Apply button.  */
47         GtkWidget *cancel_button;       /* Cancel/Close button.  */
48 };
49
50 struct _glPropertyBoxClass {
51         GnomeDialogClass parent_class;
52
53         void (*apply) (glPropertyBox * propertybox,
54                        gint page_num);
55 };
56
57 guint gl_property_box_get_type (void);
58 GtkWidget *gl_property_box_new (void);
59
60 /*
61  * Call this when the user changes something in the current page of
62  * the notebook.
63  */
64 void gl_property_box_changed (glPropertyBox * property_box);
65
66 void gl_property_box_set_modified (glPropertyBox * property_box,
67                                    gboolean state);
68
69 gint gl_property_box_append_page (glPropertyBox * property_box,
70                                   GtkWidget * child,
71                                   GtkWidget * tab_label);
72
73 END_GNOME_DECLS
74 #endif                          /* __PROPERTY_BOX_H__ */