2 * Copyright (C) 2006 Robert Gibbs <bgibbs@users.sourceforge.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
27 #define CR_TYPE_TEXT (cr_text_get_type())
29 #define CR_TEXT(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
31 CR_TYPE_TEXT, CrText))
33 #define CR_TEXT_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST ((klass), \
35 CR_TYPE_TEXT, CrTextClass))
37 #define CR_IS_TEXT(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CR_TYPE_TEXT))
40 #define CR_IS_TEXT_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE ((klass), CR_TYPE_TEXT))
43 #define CR_TEXT_GET_CLASS(obj) \
44 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
45 CR_TYPE_TEXT, CrTextClass))
47 typedef struct _CrText CrText
;
48 typedef struct _CrTextClass CrTextClass
;
54 PangoFontDescription
*font_desc
;
57 double width
, x_offset
, y_offset
;
59 guint fill_color_rgba
;
64 CrItemClass parent_class
;
68 CR_TEXT_SCALEABLE
= 1 << 0,
69 CR_TEXT_FILL_COLOR_RGBA
= 1 << 1,
70 CR_TEXT_USE_MARKUP
= 1 << 2
73 GType
cr_text_get_type(void);
75 CrItem
*cr_text_new(CrItem
*parent
, double x
, double y
,
76 const char *text
, const gchar
*first_arg_name
, ...);
81 #endif /* _CR_TEXT_H_ */