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.
None _manage(self)
Arrange the child widgets of this canvas widget.
list of int _tags(self)
Return a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
None _update(self, child)
Update this canvas widget in response to a change in one of its children.
  _xalign(self, left, right)
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, _add_child_widget, _remove_child_widget
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Instance Variable Summary
Inherited from CanvasWidget: __callbacks, __canvas, __children, __drag_x, __drag_y, __draggable, __parent, __press, __updating

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)

_manage(self)

Arrange the child widgets of this canvas widget. This method is called when the canvas widget is initially created. It is also called if the user calls the manage method on this canvas widget or any of its ancestors.
Returns:
None
Overrides:
nltk_lite.draw.CanvasWidget._manage (inherited documentation)

_tags(self)

Returns:
a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
           (type=list of int)
Overrides:
nltk_lite.draw.CanvasWidget._tags (inherited documentation)

_update(self, child)

Update this canvas widget in response to a change in one of its children.
Parameters:
child - The child that changed.
           (type=CanvasWidget)
Returns:
None
Overrides:
nltk_lite.draw.CanvasWidget._update (inherited documentation)

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