]> git.sur5r.net Git - glabels/blob - glabels2/src/label-text.h
Initial revision
[glabels] / glabels2 / src / label-text.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  label_text.h:  GLabels label text object
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 __LABEL_TEXT_H__
24 #define __LABEL_TEXT_H__
25
26 #include <gtk/gtkenums.h>
27 #include <libgnomeprint/gnome-font.h>
28 #include "text-node.h"
29 #include "label-object.h"
30
31 G_BEGIN_DECLS
32
33
34 #define GL_TYPE_LABEL_TEXT            (gl_label_text_get_type ())
35 #define GL_LABEL_TEXT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_TEXT, glLabelText))
36 #define GL_LABEL_TEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_TEXT, glLabelTextClass))
37 #define GL_IS_LABEL_TEXT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_TEXT))
38 #define GL_IS_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_TEXT))
39
40 typedef struct _glLabelText          glLabelText;
41 typedef struct _glLabelTextClass     glLabelTextClass;
42
43 typedef struct _glLabelTextPrivate   glLabelTextPrivate;
44
45 struct _glLabelText {
46         glLabelObject         object;
47
48         glLabelTextPrivate    *private;
49 };
50
51 struct _glLabelTextClass {
52         glLabelObjectClass    parent_class;
53 };
54
55 extern GType        gl_label_text_get_type     (void);
56
57 extern GObject      *gl_label_text_new         (glLabel *label);
58
59 extern glLabelText *gl_label_text_dup          (glLabelText *ltext,
60                                                 glLabel *label);
61
62 extern void         gl_label_text_set_lines    (glLabelText *ltext,
63                                                 GList *lines);
64 extern void         gl_label_text_set_props    (glLabelText *ltext,
65                                                 gchar *font_family,
66                                                 gdouble font_size,
67                                                 GnomeFontWeight font_weight,
68                                                 gboolean font_italic_flag,
69                                                 guint color,
70                                                 GtkJustification just);
71
72 extern GList        *gl_label_text_get_lines   (glLabelText *ltext);
73 extern void         gl_label_text_get_props    (glLabelText *ltext,
74                                                 gchar **font_family,
75                                                 gdouble *font_size,
76                                                 GnomeFontWeight *font_weight,
77                                                 gboolean *font_italic_flag,
78                                                 guint *color,
79                                                 GtkJustification *just);
80
81 G_END_DECLS
82
83 #endif /* __LABEL_TEXT_H__ */