Class
GtkTextTag
Description [src]
class Gtk.TextTag : GObject.Object
{
priv: GtkTextTagPrivate*
}
You may wish to begin by reading the [text widget conceptual overview][TextWidget] 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.
Constructors
gtk_text_tag_new
Creates a GtkTextTag
. Configure the tag using object arguments,
i.e. using g_object_set().
Instance methods
gtk_text_tag_changed
Emits the GtkTextTagTable::tag-changed
signal on the GtkTextTagTable
where
the tag is included.
since: 3.20
gtk_text_tag_set_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.
Properties
Gtk.TextTag:language
The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used.
Gtk.TextTag:paragraph-background-gdk
The paragraph background color as a GdkColor
.
deprecated: 3.4 since: 2.8
Gtk.TextTag:strikethrough-rgba
This property modifies the color of strikeouts. If not set, strikeouts will use the forground color.
since: 3.16
Gtk.TextTag:strikethrough-rgba-set
If the GtkTextTag:strikethrough-rgba
property has been set.
since: 3.16
Gtk.TextTag:underline-rgba
This property modifies the color of underlines. If not set, underlines will use the forground color.
since: 3.16
Signals
Gtk.TextTag::event
The ::event signal is emitted when an event occurs on a region of the buffer marked with this tag.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct GtkTextTagClass {
GObjectClass parent_class;
gboolean (* event) (
GtkTextTag* tag,
GObject* event_object,
GdkEvent* event,
const GtkTextIter* iter
);
void (* _gtk_reserved1) (
void
);
void (* _gtk_reserved2) (
void
);
void (* _gtk_reserved3) (
void
);
void (* _gtk_reserved4) (
void
);
}
Class members
parent_class: GObjectClass
- No description available.
event: gboolean (* event) ( GtkTextTag* tag, GObject* event_object, GdkEvent* event, const GtkTextIter* iter )
- No description available.
_gtk_reserved1: void (* _gtk_reserved1) ( void )
- No description available.
_gtk_reserved2: void (* _gtk_reserved2) ( void )
- No description available.
_gtk_reserved3: void (* _gtk_reserved3) ( void )
- No description available.
_gtk_reserved4: void (* _gtk_reserved4) ( void )
- No description available.