Home | Trees | Index | Help |
|
---|
Package nltk_lite :: Package draw :: Class ColorizedList |
|
object
--+
|
ColorizedList
EdgeList
,
ProductionList
_init_colortags
, which sets up Text
color tags that will be used by the list.
_item_repr
, which returns a list of
(text,colortag) tuples that make up the colorized representation of
the item.
Note: Typically, you will want to register a callback for
'select'
that calls mark
on the given item.
Method Summary | |
---|---|
Construct a new list. | |
Register a callback function with the list. | |
focus(self)
| |
Return a list of the items contained by this list. | |
grid(self,
cnf,
**kw)
| |
Highlight the given item. | |
Remove any current highlighting, and mark the given item. | |
pack(self,
cnf,
**kw)
| |
Deregister a callback function. | |
Modify the list of items contained by this list. | |
Remove highlighting from the given item; or from every item, if no item is given. | |
Adjust the view such that the given item is visible. | |
_buttonpress(self,
event)
| |
_fire_callback(self,
event,
itemnum)
| |
Set up any colortags that will be used by this colorized list. | |
_init_itemframe(self,
options)
| |
Return a list of (text, colortag) tuples that make up the colorized representation of the item. | |
_keypress(self,
event)
| |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Method Details |
---|
__init__(self,
parent,
items=[],
**options)
Construct a new list.
|
add_callback(self, event, func)Register a callback function with the list. This function will be called whenever the given event occurs.
|
get(self, index=None)
|
mark(self, item)Highlight the given item.
|
markonly(self, item)Remove any current highlighting, and mark the given item.
|
remove_callback(self, event, func=None)Deregister a callback function. Iffunc is none, then
all callbacks are removed for the given event.
|
set(self, items)Modify the list of items contained by this list. |
unmark(self, item=None)Remove highlighting from the given item; or from every item, if no item is given.
|
view(self, item)Adjust the view such that the given item is visible. If the item is already visible, then do nothing. |
_init_colortags(self, textwidget, options)Set up any colortags that will be used by this colorized list. E.g.:
>>> textwidget.tag_config('terminal', foreground='black')
|
_item_repr(self, item)Return a list of (text, colortag) tuples that make up the colorized representation of the item. Colorized representations may not span multiple lines. I.e., the text strings returned may not contain newline characters. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 | http://epydoc.sf.net |