]> git.sur5r.net Git - glabels/blob - glabels2/src/wdgt-text-entry.h
New document merge API.
[glabels] / glabels2 / src / wdgt-text-entry.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  wdgt_text_entry.h:  text entry widget module header file
5  *
6  *  Copyright (C) 2001-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 __WDGT_TEXT_ENTRY_H__
24 #define __WDGT_TEXT_ENTRY_H__
25
26 #include <gnome.h>
27 #include "merge.h"
28 #include "hig.h"
29
30 G_BEGIN_DECLS
31
32 #define GL_TYPE_WDGT_TEXT_ENTRY (gl_wdgt_text_entry_get_type ())
33 #define GL_WDGT_TEXT_ENTRY(obj) \
34         (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_TEXT_ENTRY, glWdgtTextEntry ))
35 #define GL_WDGT_TEXT_ENTRY_CLASS(klass) \
36         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_TEXT_ENTRY, glWdgtTextEntryClass))
37 #define GL_IS_WDGT_TEXT_ENTRY(obj) \
38         (GTK_CHECK_TYPE ((obj), GL_TYPE_WDGT_TEXT_ENTRY))
39 #define GL_IS_WDGT_TEXT_ENTRY_CLASS(klass) \
40         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_TEXT_ENTRY))
41
42 typedef struct _glWdgtTextEntry glWdgtTextEntry;
43 typedef struct _glWdgtTextEntryClass glWdgtTextEntryClass;
44
45 struct _glWdgtTextEntry {
46         glHigVBox      parent_widget;
47
48         GtkWidget     *edit_label;
49         GtkWidget     *text_entry;
50
51         GtkWidget     *key_label;
52         GtkWidget     *key_combo;
53         GtkWidget     *key_entry;
54         GtkWidget     *insert_button;
55
56         GtkTextBuffer *text_buffer;
57 };
58
59 struct _glWdgtTextEntryClass {
60         glHigVBoxClass parent_class;
61
62         void (*changed) (glWdgtTextEntry * text_entry, gpointer user_data);
63 };
64
65 guint      gl_wdgt_text_entry_get_type       (void);
66
67 GtkWidget *gl_wdgt_text_entry_new            (glMerge         *merge);
68
69 void       gl_wdgt_text_entry_set_field_defs (glWdgtTextEntry *text_entry,
70                                               glMerge         *merge);
71
72 GList     *gl_wdgt_text_entry_get_text       (glWdgtTextEntry *text_entry);
73
74 void       gl_wdgt_text_entry_set_text       (glWdgtTextEntry *text_entry,
75                                               gboolean         merge_flag,
76                                               GList           *lines);
77
78 void       gl_wdgt_text_entry_set_label_size_group (glWdgtTextEntry *text_entry,
79                                                     GtkSizeGroup    *label_size_group);
80
81 G_END_DECLS
82
83 #endif