[AdgEdges] Added guard against invalid "source" properties
[adg.git] / nodist / AdgText / hippo-canvas-text.h
blobee23612e02c47ae9e849b35b93cd91d60923d3d5
1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2 #ifndef __HIPPO_CANVAS_TEXT_H__
3 #define __HIPPO_CANVAS_TEXT_H__
5 /* A text paragraph canvas item. */
7 #include "hippo-canvas-box.h"
8 #include <cairo.h>
9 #include <pango/pango.h>
11 G_BEGIN_DECLS
13 typedef enum {
14 HIPPO_CANVAS_SIZE_FULL_WIDTH,
15 HIPPO_CANVAS_SIZE_WRAP_WORD,
16 HIPPO_CANVAS_SIZE_ELLIPSIZE_END
17 } HippoCanvasSizeMode;
19 typedef struct _HippoCanvasText HippoCanvasText;
20 typedef struct _HippoCanvasTextClass HippoCanvasTextClass;
22 #define HIPPO_TYPE_CANVAS_TEXT (hippo_canvas_text_get_type ())
23 #define HIPPO_CANVAS_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), HIPPO_TYPE_CANVAS_TEXT, HippoCanvasText))
24 #define HIPPO_CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HIPPO_TYPE_CANVAS_TEXT, HippoCanvasTextClass))
25 #define HIPPO_IS_CANVAS_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), HIPPO_TYPE_CANVAS_TEXT))
26 #define HIPPO_IS_CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HIPPO_TYPE_CANVAS_TEXT))
27 #define HIPPO_CANVAS_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HIPPO_TYPE_CANVAS_TEXT, HippoCanvasTextClass))
29 struct _HippoCanvasText {
30 HippoCanvasBox box;
31 char *text;
32 PangoAttrList *attributes;
33 double font_scale;
34 guint size_mode : 3;
35 guint is_ellipsized : 1;
38 struct _HippoCanvasTextClass {
39 HippoCanvasBoxClass parent_class;
43 GType hippo_canvas_text_get_type (void) G_GNUC_CONST;
45 HippoCanvasItem* hippo_canvas_text_new (void);
48 G_END_DECLS
50 #endif /* __HIPPO_CANVAS_TEXT_H__ */