6 #endif /* __cplusplus */
8 #include <gtk/gtkobject.h>
11 typedef struct _GtkTextIter GtkTextIter;
12 typedef struct _GtkTextBTreeNode GtkTextBTreeNode;
13 typedef struct _GtkTextTagTable GtkTextTagTable;
14 typedef struct _GtkTextTabArray GtkTextTabArray;
22 typedef struct _GtkTextStyleValues GtkTextStyleValues;
24 #define GTK_TYPE_TEXT_TAG (gtk_text_tag_get_type())
25 #define GTK_TEXT_TAG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TEXT_TAG, GtkTextTag))
26 #define GTK_TEXT_TAG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT_TAG, GtkTextTagClass))
27 #define GTK_IS_TEXT_TAG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TEXT_TAG))
28 #define GTK_IS_TEXT_TAG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_TAG))
29 #define GTK_TEXT_TAG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TEXT_TAG, GtkTextTagClass))
31 typedef struct _GtkTextTag GtkTextTag;
32 typedef struct _GtkTextTagClass GtkTextTagClass;
35 GtkObject parent_instance;
37 GtkTextTagTable *table;
39 char *name; /* Name of this tag. This field is actually
40 * a pointer to the key from the entry in
41 * tkxt->tagTable, so it needn't be freed
43 int priority; /* Priority of this tag within widget. 0
44 * means lowest priority. Exactly one tag
45 * has each integer value between 0 and
48 * Information for displaying text with this tag. The information
49 * belows acts as an override on information specified by lower-priority
50 * tags. If no value is specified, then the next-lower-priority tag
51 * on the text determins the value. The text widget itself provides
52 * defaults if no tag specifies an override.
55 GtkTextStyleValues *values;
57 /* tag contains appearance-related options */
58 guint affects_size : 1;
61 Flags for whether a given value is set; if a value is unset, then
62 this tag does not affect it. */
63 guint bg_color_set : 1;
64 guint border_width_set : 1;
66 guint bg_stipple_set : 1;
67 guint fg_color_set : 1;
69 guint fg_stipple_set : 1;
70 guint justify_set : 1;
71 guint left_margin_set : 1;
72 guint left_wrapped_line_margin_set : 1;
74 guint overstrike_set : 1;
75 guint right_margin_set : 1;
76 guint pixels_above_lines_set : 1;
77 guint pixels_below_lines_set : 1;
78 guint pixels_inside_wrap_set : 1;
79 guint tab_array_set : 1;
80 guint underline_set : 1;
81 guint wrap_mode_set : 1;
82 guint bg_full_height_set : 1;
84 guint editable_set : 1;
91 struct _GtkTextTagClass {
92 GtkObjectClass parent_class;
94 gint (* event) (GtkTextTag *tag,
95 GtkObject *event_object, /* widget, canvas item, whatever */
96 GdkEvent *event, /* the event itself */
97 const GtkTextIter *iter); /* location of event in buffer */
100 GtkType gtk_text_tag_get_type (void);
101 GtkTextTag *gtk_text_tag_new (const gchar *name);
102 void gtk_text_tag_set_priority (GtkTextTag *tag,
104 gint gtk_text_tag_event (GtkTextTag *tag,
105 GtkObject *event_object,
107 const GtkTextIter *iter);
111 #endif /* __cplusplus */