Gtk.TextTagTable¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gtk.TextTagTable(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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
Gtk.TextTagTable
implementation of theGtk.Buildable
interface supports adding tags by specifying “tag” as the “type” attribute of a<child>
element.An example of a UI definition fragment specifying tags:
<object class="GtkTextTagTable"> <child type="tag"> <object class="GtkTextTag"/> </child> </object>
- classmethod new()[source]¶
- Returns:
a new
Gtk.TextTagTable
- Return type:
Creates a new
Gtk.TextTagTable
. The table contains no tags by default.
- add(tag)[source]¶
- Parameters:
tag (
Gtk.TextTag
) – aGtk.TextTag
- 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, or
None
if none by that name is in the table.- Return type:
Gtk.TextTag
orNone
Look up a named tag.
- remove(tag)[source]¶
- Parameters:
tag (
Gtk.TextTag
) – aGtk.TextTag
Remove a tag from the table. If a
Gtk.TextBuffer
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.
- do_tag_added(tag) virtual¶
- Parameters:
tag (
Gtk.TextTag
) –
- do_tag_changed(tag, size_changed) virtual¶
- Parameters:
tag (
Gtk.TextTag
) –size_changed (
bool
) –
- do_tag_removed(tag) virtual¶
- Parameters:
tag (
Gtk.TextTag
) –
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.
- 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 theGtk.TextView
layout.
- 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.