]> git.sur5r.net Git - glabels/blob - glabels2/src/canvas-hacktext.h
Initial revision
[glabels] / glabels2 / src / canvas-hacktext.h
1 #ifndef __GL_CANVAS_HACKTEXT_H__
2 #define __GL_CANVAS_HACKTEXT_H__
3
4 /* Hacktext item type for GnomeCanvas widget
5  *
6  * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
7  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
8  *
9  * Copyright (C) 1998,1999 The Free Software Foundation
10  *
11  * Authors: Federico Mena <federico@nuclecu.unam.mx>
12  *          Raph Levien <raph@acm.org>
13  */
14
15 #include <glib.h>
16
17 G_BEGIN_DECLS
18
19 /* Hacktext item for the canvas.  The API is totally unstable - it needs to be replaced with one
20  * that supports Unicode and the merged GnomeText/GScript API. However, I need a text item now,
21  * and the GnomeText/GScript integration is going to take a bit more effort.
22  *
23  * The following object arguments are available:
24  *
25  * name                 type                    read/write      description
26  * ------------------------------------------------------------------------------------------
27  * text                 char *                  RW              The string of the text item.
28  * glyphlist            GnomeGlyphList *        W               Glyphlist
29  * fill_color           string                  W               X color specification for fill color,
30  *                                                              or NULL pointer for no color (transparent).
31  * fill_color_gdk       GdkColor*               RW              Allocated GdkColor for fill.
32  */
33
34 #define GL_TYPE_CANVAS_HACKTEXT (gl_canvas_hacktext_get_type ())
35 #define GL_CANVAS_HACKTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_CANVAS_HACKTEXT, glCanvasHacktext))
36 #define GL_CANVAS_HACKTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_CANVAS_HACKTEXT, glCanvasHacktextClass))
37 #define GL_IS_CANVAS_HACKTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_CANVAS_HACKTEXT))
38 #define GL_IS_CANVAS_HACKTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_CANVAS_HACKTEXT))
39
40 typedef struct _glCanvasHacktext glCanvasHacktext;
41 typedef struct _glCanvasHacktextPriv glCanvasHacktextPriv;
42 typedef struct _glCanvasHacktextClass glCanvasHacktextClass;
43
44 #include <libgnomecanvas/libgnomecanvas.h>
45
46 struct _glCanvasHacktext {
47         GnomeCanvasItem item;
48
49         char *text;                     /* String of the text item */
50         guint fill_color;               /* Fill color, RGBA */
51         gulong fill_pixel;              /* Color for fill */
52         guint fill_set : 1;             /* Is fill color set? */
53
54         double size;                    /* size in user units */
55         double x, y;                    /* x, y coords of text origin */
56         /* Antialiased specific stuff follows */
57         guint32 fill_rgba;              /* RGBA color for filling */
58         glCanvasHacktextPriv *priv;     /* Private data */
59 };
60
61 struct _glCanvasHacktextClass {
62         GnomeCanvasItemClass parent_class;
63 };
64
65
66 GType gl_canvas_hacktext_get_type (void);
67
68
69 G_END_DECLS
70
71 #endif