Package nltk_lite :: Package draw :: Class StackWidget
[show private | hide private]
[frames | no frames]

Type StackWidget

  object --+    
           |    
CanvasWidget --+
               |
              StackWidget


A canvas widget that keeps a list of canvas widgets in a vertical line.

Attributes:
Method Summary
  __init__(self, canvas, *children, **attribs)
Create a new stack widget.
(any) __getitem__(self, attr)
Return the value of the attribute attr.
string __repr__(self)
Return a string representation of this canvas widget.
None __setitem__(self, attr, value)
Set the value of the attribute attr to value.
list of CanvasWidget children(self)
Return a list of the hierarchical children of this canvas widget.
  insert_child(self, index, child)
Insert a child canvas widget before a given index.
  remove_child(self, child)
Remove the given child canvas widget.
  replace_child(self, oldchild, newchild)
Replace the child canvas widget oldchild with newchild.
Inherited from CanvasWidget: bbox, bind_click, bind_drag, canvas, child_widgets, destroy, height, hidden, hide, manage, move, moveto, parent, show, tags, unbind_click, unbind_drag, update, width
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Method Details

__init__(self, canvas, *children, **attribs)
(Constructor)

Create a new stack widget.
Parameters:
canvas - This canvas widget's canvas.
           (type=Tkinter.Canvas)
children - The widgets that should be aligned vertically. Each child must not have a parent.
           (type=list of CanvasWidget)
attribs - The new canvas widget's attributes.
Overrides:
nltk_lite.draw.CanvasWidget.__init__

__getitem__(self, attr)
(Indexing operator)

Returns:
the value of the attribute attr. See the class documentation for a list of attributes supported by this canvas widget.
           (type=(any))
Overrides:
nltk_lite.draw.CanvasWidget.__getitem__ (inherited documentation)

__repr__(self)
(Representation operator)

Returns:
a string representation of this canvas widget.
           (type=string)
Overrides:
nltk_lite.draw.CanvasWidget.__repr__ (inherited documentation)

__setitem__(self, attr, value)
(Index assignment operator)

Set the value of the attribute attr to value. See the class documentation for a list of attributes supported by this canvas widget.
Returns:
None
Overrides:
nltk_lite.draw.CanvasWidget.__setitem__ (inherited documentation)

children(self)

Returns:
A list of the hierarchical children of this canvas widget. These children are considered part of self for purposes of user interaction.
           (type=list of CanvasWidget)

insert_child(self, index, child)

Insert a child canvas widget before a given index.
Parameters:
index - The index where the child widget should be inserted. In particular, the index of child will be index; and the index of any children whose indices were greater than equal to index before child was inserted will be incremented by one.
           (type=int)
child - The canvas widget that should be inserted.
           (type=CanvasWidget)

remove_child(self, child)

Remove the given child canvas widget. child's parent will be set ot None.
Parameters:
child - The child canvas widget to remove.
           (type=CanvasWidget)

replace_child(self, oldchild, newchild)

Replace the child canvas widget oldchild with newchild. newchild must not have a parent. oldchild's parent will be set to None.
Parameters:
oldchild - The child canvas widget to remove.
           (type=CanvasWidget)
newchild - The canvas widget that should replace oldchild.
           (type=CanvasWidget)

Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 http://epydoc.sf.net