TextTagTable
-
class TextTagTable(**properties: Any)
Superclasses: Object
Implemented Interfaces: Buildable
- Constructors:
TextTagTable(**properties)
new() -> Gtk.TextTagTable
Constructors
-
class TextTagTable
-
classmethod new() → TextTagTable
Creates a new GtkTextTagTable
.
The table contains no tags by default.
Methods
-
class TextTagTable
-
add(tag: TextTag) → 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.
- Parameters:
tag – a GtkTextTag
-
foreach(func: Callable[[...], None], *data: Any) → None
Calls func
on each tag in table
, with user data data
.
Note that the table may not be modified while iterating
over it (you can’t add/remove tags).
- Parameters:
-
-
get_size() → int
Returns the size of the table (number of tags)
-
lookup(name: str) → TextTag | None
Look up a named tag.
- Parameters:
name – name of a tag
-
remove(tag: TextTag) → None
Remove a tag from the table.
If a GtkTextBuffer
has table
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.
- Parameters:
tag – a GtkTextTag
Signals
-
class TextTagTable.signals
-
tag_added(tag: TextTag) → None
Emitted every time a new tag is added in the GtkTextTagTable
.
- Parameters:
tag – the added tag.
-
tag_changed(tag: TextTag, size_changed: bool) → None
Emitted every time a tag in the GtkTextTagTable
changes.
- Parameters:
-
-
tag_removed(tag: TextTag) → None
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.
- Parameters:
tag – the removed tag.