Gtk.TextTagTable¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37), Gtk.Buildable (10) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| add(tag) | |
| foreach(func, *data) | |
| get_size() | |
| lookup(name) | |
| remove(tag) | 
Virtual Methods¶
| Inherited: | GObject.Object (7), Gtk.Buildable (10) | 
|---|
| do_tag_added(tag) | |
| do_tag_changed(tag, size_changed) | |
| do_tag_removed(tag) | 
Properties¶
None
Class Details¶
- 
class Gtk.TextTagTable(**kwargs)¶
- Bases: - GObject.Object,- Gtk.Buildable- Abstract: - No - Structure: - Gtk.TextTagTableClass- 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.TextTagTableimplementation of the- Gtk.Buildableinterface 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: - Gtk.TextTagTable- Creates a new - Gtk.TextTagTable. The table contains no tags by default.
 - 
add(tag)[source]¶
- Parameters: - tag ( - Gtk.TextTag) – a- Gtk.TextTag- Returns: - Trueon success.- Return type: - bool- 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
- data (objectorNone) – user data
 - 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). 
- func (
 - 
get_size()[source]¶
- Returns: - number of tags in self - Return type: - int- Returns the size of the table (number of tags) 
 - 
lookup(name)[source]¶
- Parameters: - name ( - str) – name of a tag- Returns: - The tag, or - Noneif none by that name is in the table.- Return type: - Gtk.TextTagor- None- Look up a named tag. 
 - 
remove(tag)[source]¶
- Parameters: - tag ( - Gtk.TextTag) – a- Gtk.TextTag- Remove a tag from the table. If a - Gtk.TextBufferhas 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) –
 
- tag (
 - 
do_tag_removed(tag) virtual¶
- Parameters: - tag ( - Gtk.TextTag) –
 
- GtkTextTagTables as 
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 signal
- tag (Gtk.TextTag) – the added tag.
 
- text_tag_table (
- 
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 signal
- tag (Gtk.TextTag) – the changed tag.
- size_changed (bool) – whether the change affects theGtk.TextViewlayout.
 
- text_tag_table (
- 
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 signal
- tag (Gtk.TextTag) – the removed tag.
 
- text_tag_table (