]> git.sur5r.net Git - glabels/blob - glabels2/src/merge-ui.h
Changed M_PI to G_PI.
[glabels] / glabels2 / src / merge-ui.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  merge_ui.h:  document merge user interface module header file
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 #ifndef __MERGE_UI_H__
23 #define __MERGE_UI_H__
24
25 #include <gnome.h>
26
27 #include "merge.h"
28
29 extern void
30  gl_merge_ui_init (void);
31
32 /*======================================================*/
33 /* Merge source selection widget                        */
34 /*======================================================*/
35 #define GL_TYPE_MERGE_UI_SRC (gl_merge_ui_src_get_type ())
36 #define GL_MERGE_UI_SRC(obj) \
37         (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_SRC, glMergeUISrc ))
38 #define GL_MERGE_UI_SRC_CLASS(klass) \
39         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_SRC, glMergeUISrcClass))
40 #define GL_IS_MERGE_UI_SRC(obj) \
41         (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_SRC))
42 #define GL_IS_MERGE_UI_SRC_CLASS(klass) \
43         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_SRC))
44
45 typedef struct _glMergeUISrc glMergeUISrc;
46 typedef struct _glMergeUISrcClass glMergeUISrcClass;
47
48 struct _glMergeUISrc {
49         GtkVBox parent_widget;
50
51         glMergeType type;
52         GtkWidget *backend_widget;
53 };
54
55 struct _glMergeUISrcClass {
56         GtkVBoxClass parent_class;
57
58         void (*changed) (glMergeUISrc * src, gpointer user_data);
59 };
60
61 extern guint gl_merge_ui_src_get_type (void);
62 extern GtkWidget *gl_merge_ui_src_new (void);
63 extern void gl_merge_ui_src_set_type (glMergeUISrc * src, glMergeType type);
64 extern void gl_merge_ui_src_set_value (glMergeUISrc * src, gchar * text);
65 extern gchar *gl_merge_ui_src_get_value (glMergeUISrc * src);
66
67 /*======================================================*/
68 /* Merge field selection/definition widget.             */
69 /*======================================================*/
70 #define GL_TYPE_MERGE_UI_FIELD_WS (gl_merge_ui_field_ws_get_type ())
71 #define GL_MERGE_UI_FIELD_WS(obj) \
72         (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_FIELD_WS, glMergeUIFieldWS ))
73 #define GL_MERGE_UI_FIELD_WS_CLASS(klass) \
74         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_FIELD_WS, glMergeUIFieldWSClass))
75 #define GL_IS_MERGE_UI_FIELD_WS(obj) \
76         (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_FIELD_WS))
77 #define GL_IS_MERGE_UI_FIELD_WS_CLASS(klass) \
78         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_FIELD_WS))
79
80 typedef struct _glMergeUIFieldWS glMergeUIFieldWS;
81 typedef struct _glMergeUIFieldWSClass glMergeUIFieldWSClass;
82
83 struct _glMergeUIFieldWS {
84         GtkVBox parent_widget;
85
86         glMergeType type;
87         gchar *src;
88         GtkWidget *backend_widget;
89 };
90
91 struct _glMergeUIFieldWSClass {
92         GtkVBoxClass parent_class;
93
94         void (*changed) (glMergeUIFieldWS * field_ws, gpointer user_data);
95 };
96
97 extern guint gl_merge_ui_field_ws_get_type (void);
98 extern GtkWidget *gl_merge_ui_field_ws_new (void);
99 extern void gl_merge_ui_field_ws_set_type_src (glMergeUIFieldWS * field_ws,
100                                                glMergeType type,
101                                                gchar * src);
102 extern void gl_merge_ui_field_ws_set_field_defs (glMergeUIFieldWS * field_ws,
103                                                  GList * field_defs);
104 extern GList *gl_merge_ui_field_ws_get_field_defs (glMergeUIFieldWS * field_ws);
105
106 #endif