Gtk.TextTagTable¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted every time a new tag is added in the |
|
Emitted every time a tag in the |
|
Emitted every time a tag is removed from the |
Fields¶
- Inherited:
Class Details¶
- class Gtk.TextTagTable(**kwargs)¶
- Bases:
- Abstract:
No
The collection of tags in a
GtkTextBuffer
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.
- GtkTextTagTables as
Gtk.Buildable
The
GtkTextTagTable
implementation of theGtkBuildable
interface supports adding tags by specifying “tag” as the “type” attribute of a<child>
element.An example of a UI definition fragment specifying tags: ``xml <object class=”GtkTextTagTable”>
- <child type=”tag”>
<object class=”GtkTextTag”/>
</child>
</object> ``
- classmethod new()[source]¶
- Returns:
a new
GtkTextTagTable
- Return type:
Creates a new
GtkTextTagTable
.The table contains no tags by default.
- add(tag)[source]¶
- Parameters:
tag (
Gtk.TextTag
) – aGtkTextTag
- Returns:
True
on success.- Return type:
Add a tag to the table.
The tag is assigned the highest priority in the table.
tag must not be in a tag table already, and may not have the same name as an already-added tag.
- foreach(func, *data)[source]¶
- Parameters:
func (
Gtk.TextTagTableForeach
) – a function to call on each tag
Calls func on each tag in self, with user data data.
Note that the table may not be modified while iterating over it (you can’t add/remove tags).
- get_size()[source]¶
- Returns:
number of tags in self
- Return type:
Returns the size of the table (number of tags)
- lookup(name)[source]¶
- Parameters:
name (
str
) – name of a tag- Returns:
The tag
- Return type:
Gtk.TextTag
orNone
Look up a named tag.
- remove(tag)[source]¶
- Parameters:
tag (
Gtk.TextTag
) – aGtkTextTag
Remove a tag from the table.
If a
GtkTextBuffer
has self as its tag table, the tag is removed from the buffer. The table’s reference to the tag is removed, so the tag will end up destroyed if you don’t have a reference to it.
Signal Details¶
- Gtk.TextTagTable.signals.tag_added(text_tag_table, tag)¶
- Signal Name:
tag-added
- Flags:
- Parameters:
text_tag_table (
Gtk.TextTagTable
) – The object which received the signaltag (
Gtk.TextTag
) – the added tag.
Emitted every time a new tag is added in the
GtkTextTagTable
.
- Gtk.TextTagTable.signals.tag_changed(text_tag_table, tag, size_changed)¶
- Signal Name:
tag-changed
- Flags:
- Parameters:
text_tag_table (
Gtk.TextTagTable
) – The object which received the signaltag (
Gtk.TextTag
) – the changed tag.size_changed (
bool
) – whether the change affects theGtkTextView
layout.
Emitted every time a tag in the
GtkTextTagTable
changes.
- Gtk.TextTagTable.signals.tag_removed(text_tag_table, tag)¶
- Signal Name:
tag-removed
- Flags:
- Parameters:
text_tag_table (
Gtk.TextTagTable
) – The object which received the signaltag (
Gtk.TextTag
) – the removed tag.
Emitted every time a tag is removed from the
GtkTextTagTable
.The tag is still valid by the time the signal is emitted, but it is not associated with a tag table any more.