1 /* Editable GnomeCanvas text item based on GtkTextLayout, borrowed heavily
4 * Copyright (c) 2000 Red Hat, Inc.
5 * Copyright (c) 2001 Joe Shaw
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef GNOME_CANVAS_RICH_TEXT_H
24 #define GNOME_CANVAS_RICH_TEXT_H
26 #include <libgnomecanvas/gnome-canvas.h>
31 #define GNOME_TYPE_CANVAS_RICH_TEXT (gnome_canvas_rich_text_get_type ())
32 #define GNOME_CANVAS_RICH_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichText))
33 #define GNOME_CANVAS_RICH_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichTextClass))
34 #define GNOME_IS_CANVAS_RICH_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_RICH_TEXT))
35 #define GNOME_IS_CANVAS_RICH_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RICH_TEXT))
36 #define GNOME_CANVAS_RICH_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichTextClass))
38 typedef struct _GnomeCanvasRichText GnomeCanvasRichText;
39 typedef struct _GnomeCanvasRichTextPrivate GnomeCanvasRichTextPrivate;
40 typedef struct _GnomeCanvasRichTextClass GnomeCanvasRichTextClass;
42 struct _GnomeCanvasRichText {
45 GnomeCanvasRichTextPrivate *_priv;
48 struct _GnomeCanvasRichTextClass {
49 GnomeCanvasItemClass parent_class;
51 void (* tag_changed)(GnomeCanvasRichText *text,
55 GType gnome_canvas_rich_text_get_type(void) G_GNUC_CONST;
57 void gnome_canvas_rich_text_cut_clipboard(GnomeCanvasRichText *text);
59 void gnome_canvas_rich_text_copy_clipboard(GnomeCanvasRichText *text);
61 void gnome_canvas_rich_text_paste_clipboard(GnomeCanvasRichText *text);
63 void gnome_canvas_rich_text_set_buffer(GnomeCanvasRichText *text,
64 GtkTextBuffer *buffer);
66 GtkTextBuffer *gnome_canvas_rich_text_get_buffer(GnomeCanvasRichText *text);
68 gnome_canvas_rich_text_get_iter_location (GnomeCanvasRichText *text,
69 const GtkTextIter *iter,
70 GdkRectangle *location);
72 gnome_canvas_rich_text_get_iter_at_location (GnomeCanvasRichText *text,
79 #endif /* GNOME_CANVAS_RICH_TEXT_H */