]> git.sur5r.net Git - glabels/blob - glabels2/src/hig.h
Refinements to new label dialog and associated widgets.
[glabels] / glabels2 / src / hig.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  hig.h:  HIG inspired dialog and layout tools
5  *
6  *  Copyright (C) 2002  Jim Evins <evins@snaught.com>.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 #ifndef __HIG_H__
24 #define __HIG_H__
25
26 #include <gtk/gtk.h>
27
28 G_BEGIN_DECLS
29
30 #define GL_HIG_SPACING 6
31
32 /*===========================================================================*/
33 /* HIG Dialog.                                                               */
34 /*===========================================================================*/
35
36 #define GL_TYPE_HIG_DIALOG (gl_hig_dialog_get_type ())
37 #define GL_HIG_DIALOG(obj) \
38         (GTK_CHECK_CAST((obj), GL_TYPE_HIG_DIALOG, glHigDialog ))
39 #define GL_HIG_DIALOG_CLASS(klass) \
40         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_HIG_DIALOG, glHigDialogClass))
41 #define GL_IS_HIG_DIALOG(obj) \
42         (GTK_CHECK_TYPE ((obj), GL_TYPE_HIG_DIALOG))
43 #define GL_IS_HIG_DIALOG_CLASS(klass) \
44         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_HIG_DIALOG))
45
46 typedef struct _glHigDialog      glHigDialog;
47 typedef struct _glHigDialogClass glHigDialogClass;
48
49 struct _glHigDialog {
50         GtkDialog         parent_widget;
51
52         GtkWidget        *vbox;
53 };
54
55 struct _glHigDialogClass {
56         GtkDialogClass    parent_class;
57 };
58
59 guint      gl_hig_dialog_get_type         (void);
60
61 GtkWidget *gl_hig_dialog_new              (void);
62
63 GtkWidget *gl_hig_dialog_new_with_buttons (const gchar    *title,
64                                            GtkWindow      *parent,
65                                            GtkDialogFlags  flags,
66                                            const gchar    *first_button_text,
67                                            ...);
68
69
70 /*===========================================================================*/
71 /* HIG Category.                                                             */
72 /*===========================================================================*/
73
74 #define GL_TYPE_HIG_CATEGORY (gl_hig_category_get_type ())
75 #define GL_HIG_CATEGORY(obj) \
76         (GTK_CHECK_CAST((obj), GL_TYPE_HIG_CATEGORY, glHigCategory ))
77 #define GL_HIG_CATEGORY_CLASS(klass) \
78         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_HIG_CATEGORY, glHigCategoryClass))
79 #define GL_IS_HIG_CATEGORY(obj) \
80         (GTK_CHECK_TYPE ((obj), GL_TYPE_HIG_CATEGORY))
81 #define GL_IS_HIG_CATEGORY_CLASS(klass) \
82         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_HIG_CATEGORY))
83
84 typedef struct _glHigCategory      glHigCategory;
85 typedef struct _glHigCategoryClass glHigCategoryClass;
86
87 struct _glHigCategory {
88         GtkVBox           parent_widget;
89
90         GtkWidget        *label;
91         GtkWidget        *vbox;
92 };
93
94 struct _glHigCategoryClass {
95         GtkVBoxClass      parent_class;
96 };
97
98 guint      gl_hig_category_get_type         (void);
99
100 GtkWidget *gl_hig_category_new              (const gchar *header);
101
102 G_END_DECLS
103
104 #endif /* __HIG_H__ */