gtk.TextTagTable
gtk.TextTagTable — A collection of gtk.TextTag objects
that can be used together
gtk.TextTagTable Signal Prototypes
gobject.GObject Signal Prototypes
"tag-added" | def callback(texttagtable, texttag, user_param1, ...) |
"tag-changed" | def callback(texttagtable, texttag, size_changed, user_param1, ...) |
"tag-removed" | def callback(texttagtable, texttag, user_param1, ...) |
Constructor
Creates a new gtk.TextTagTable.
The table contains no tags by default.
Methods
gtk.TextTagTable.add
The add() method adds a texttag to the
texttagtable. The texttag is assigned the highest priority in the
texttagtable. A ValueError exception is raised if
tag is in a texttag table already, or has the same
name as another texttag in the texttagtable.
gtk.TextTagTable.remove
The remove() method removes a texttag
from the texttagtable.
gtk.TextTagTable.lookup
name : | the name of a texttag |
Returns : | The texttag, or None if none
by that name is in the texttagtable. |
The lookup() method looks in the
texttagtable for a gtk.TextTag with
the name specified by name and returns it if found.
This method returns None if name
does not identify a gtk.TextTag in the
texttagtable.
gtk.TextTagTable.foreach
def foreach(func, data=None)
|
func : | a function to call on each texttag |
data : | user data to pass to
func or
None |
Note
This method is available in PyGTK 2.4 and above.
The foreach() method calls the function
specified by func on each texttag in the text tag
table passing the user data specified by data. The
signature of func is:
def func(texttag, user_data):
|
where texttag is a gtk.TextTag in the
text tag table and user_data is
data.
gtk.TextTagTable.get_size
Returns : | the number of texttags in the
texttagtable |
The get_size() method returns the size
of the texttagtable (number of texttags).
Signals
The "tag-added" gtk.TextTagTable Signal
def callback(texttagtable, texttag, user_param1, ...)
|
texttagtable : | the texttagtable that received the
signal |
texttag : | a gtk.TextTag |
user_param1 : | the first user parameter (if any) specified
with the connect()
method |
... : | additional user parameters (if
any) |
The "tag-added" signal is emitted when the gtk.TextTag
specified by texttag is added to
texttagtable.
The "tag-changed" gtk.TextTagTable Signal
def callback(texttagtable, texttag, size_changed, user_param1, ...)
|
texttagtable : | the texttagtable that received the
signal |
texttag : | a gtk.TextTag |
size_changed : | if TRUE a
texttag property has changed that may affect the size
of the text enclosed by the texttag |
user_param1 : | the first user parameter (if any) specified
with the connect()
method |
... : | additional user parameters (if
any) |
The "tag-changed" signal is emitted when a property of the gtk.TextTag
specified by texttag is changed. If
size_changed is TRUE the text
enclosed by texttag will change size.
The "tag-removed" gtk.TextTagTable Signal
def callback(texttagtable, texttag, user_param1, ...)
|
texttagtable : | the texttagtable that received the
signal |
texttag : | a gtk.TextTag |
user_param1 : | the first user parameter (if any) specified
with the connect()
method |
... : | additional user parameters (if
any) |
The "tag-removed" signal is emitted when the gtk.TextTag
specified by texttag is removed from
texttagtable