]> git.sur5r.net Git - glabels/blob - glabels2/src/label-text.h
Text box refinement.
[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 #define GL_LABEL_TEXT_MARGIN 3.0
34
35
36 #define GL_TYPE_LABEL_TEXT            (gl_label_text_get_type ())
37 #define GL_LABEL_TEXT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_TEXT, glLabelText))
38 #define GL_LABEL_TEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_TEXT, glLabelTextClass))
39 #define GL_IS_LABEL_TEXT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_TEXT))
40 #define GL_IS_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_TEXT))
41
42 typedef struct _glLabelText          glLabelText;
43 typedef struct _glLabelTextClass     glLabelTextClass;
44
45 typedef struct _glLabelTextPrivate   glLabelTextPrivate;
46
47 struct _glLabelText {
48         glLabelObject         object;
49
50         glLabelTextPrivate   *private;
51 };
52
53 struct _glLabelTextClass {
54         glLabelObjectClass    parent_class;
55 };
56
57 GType          gl_label_text_get_type     (void);
58
59 GObject       *gl_label_text_new          (glLabel          *label);
60
61 void           gl_label_text_set_lines    (glLabelText      *ltext,
62                                            GList            *lines);
63 void           gl_label_text_set_props    (glLabelText      *ltext,
64                                            gchar            *font_family,
65                                            gdouble           font_size,
66                                            GnomeFontWeight   font_weight,
67                                            gboolean          font_italic_flag,
68                                            guint             color,
69                                            GtkJustification  just);
70
71 GtkTextBuffer *gl_label_text_get_buffer   (glLabelText      *ltext);
72 GList         *gl_label_text_get_lines    (glLabelText      *ltext);
73 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 void           gl_label_text_get_box      (glLabelText      *ltext,
81                                            gdouble          *w,
82                                            gdouble          *h);
83
84 G_END_DECLS
85
86 #endif /* __LABEL_TEXT_H__ */