Top | ![]() |
![]() |
![]() |
![]() |
GtkTextTag * | gtk_text_tag_new () |
gint | gtk_text_tag_get_priority () |
void | gtk_text_tag_set_priority () |
gboolean | gtk_text_tag_event () |
void | gtk_text_tag_changed () |
You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.
Tags should be in the GtkTextTagTable for a given GtkTextBuffer before using them with that buffer.
gtk_text_buffer_create_tag() is the best way to create tags. See “gtk3-demo” for numerous examples.
For each property of GtkTextTag, there is a “set” property, e.g. “font-set” corresponds to “font”. These “set” properties reflect whether a property has been set or not. They are maintained by GTK+ and you should not set them independently.
GtkTextTag *
gtk_text_tag_new (const gchar *name
);
Creates a GtkTextTag. Configure the tag using object arguments,
i.e. using g_object_set()
.
gint
gtk_text_tag_get_priority (GtkTextTag *tag
);
Get the tag priority.
void gtk_text_tag_set_priority (GtkTextTag *tag
,gint priority
);
Sets the priority of a GtkTextTag. Valid priorities
start at 0 and go to one less than gtk_text_tag_table_get_size()
.
Each tag in a table has a unique priority; setting the priority
of one tag shifts the priorities of all the other tags in the
table to maintain a unique priority for each tag. Higher priority
tags “win” if two tags both set the same text attribute. When adding
a tag to a tag table, it will be assigned the highest priority in
the table by default; so normally the precedence of a set of tags
is the order in which they were added to the table, or created with
gtk_text_buffer_create_tag()
, which adds the tag to the buffer’s table
automatically.
gboolean gtk_text_tag_event (GtkTextTag *tag
,GObject *event_object
,GdkEvent *event
,const GtkTextIter *iter
);
Emits the “event” signal on the GtkTextTag.
void gtk_text_tag_changed (GtkTextTag *tag
,gboolean size_changed
);
Emits the “tag-changed” signal on the GtkTextTagTable where the tag is included.
The signal is already emitted when setting a GtkTextTag property. This function is useful for a GtkTextTag subclass.
Since: 3.20