|
class gtk.TextTagTable( |
def callback( | |
def callback( | |
def callback( |
A gtk.TextTagTable
object holds a set of gtk.TextTag
objects
for use with a gtk.TextBuffer
.
Usually a gtk.TextTagTable
is created automatically when a gtk.TextBuffer
is created but a standalone gtk.TextTagTable
can be created using the gtk.TextTagTable() constructor.
A gtk.TextTagTable
can be passed as an argument to the gtk.TextBuffer() constructor to
associate an existing gtk.TextTagTable
rather than creating a new one. This is useful when several textbuffers need
to use the same texttags.
gtk.TextTagTable()
Returns : | a new gtk.TextTagTable |
Creates a new gtk.TextTagTable
.
The table contains no tags by default.
def add(tag
)
| a gtk.TextTag |
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.
def remove(tag
)
| a gtk.TextTag |
The remove
() method removes a texttag
from the texttagtable.
def 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.
def foreach(func
, data
=None)
| a function to call on each texttag |
| user data to pass to
func or
None |
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
.
Note that the table may not be modified while iterating over it (you can't add/remove tags).
def callback(texttagtable
, texttag
, user_param1
, ...
)
| the texttagtable that received the signal |
| a gtk.TextTag |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "tag-added" signal is emitted when the gtk.TextTag
specified by texttag
is added to
texttagtable
.
def callback(texttagtable
, texttag
, size_changed
, user_param1
, ...
)
| the texttagtable that received the signal |
| a gtk.TextTag |
| if True a
texttag property has changed that may affect the size
of the text enclosed by the texttag |
| the first user parameter (if any) specified
with the connect () |
| 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.
def callback(texttagtable
, texttag
, user_param1
, ...
)
| the texttagtable that received the signal |
| a gtk.TextTag |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "tag-removed" signal is emitted when the gtk.TextTag
specified by texttag
is removed from
texttagtable
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.