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

Type ScrollWatcherWidget

  object --+    
           |    
CanvasWidget --+
               |
              ScrollWatcherWidget


A special canvas widget that adjusts its Canvas's scrollregion to always include the bounding boxes of all of its children. The scroll-watcher widget will only increase the size of the Canvas's scrollregion; it will never decrease it.
Method Summary
  __init__(self, canvas, *children, **attribs)
Create a new scroll-watcher widget.
None add_child(self, canvaswidget)
Add a new canvas widget to the scroll-watcher.
None remove_child(self, canvaswidget)
Remove a canvas widget from the scroll-watcher.
  _adjust_scrollregion(self)
Adjust the scrollregion of this scroll-watcher's Canvas to include the bounding boxes of all of its children.
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.
Inherited from CanvasWidget: __getitem__, __repr__, __setitem__, 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, _manage, _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 scroll-watcher widget.
Parameters:
canvas - This canvas widget's canvas.
           (type=Tkinter.Canvas)
children - The canvas widgets watched by the scroll-watcher. The scroll-watcher will ensure that these canvas widgets are always contained in their canvas's scrollregion.
           (type=list of CanvasWidget)
attribs - The new canvas widget's attributes.
Overrides:
nltk_lite.draw.CanvasWidget.__init__

add_child(self, canvaswidget)

Add a new canvas widget to the scroll-watcher. The scroll-watcher will ensure that the new canvas widget is always contained in its canvas's scrollregion.
Parameters:
canvaswidget - The new canvas widget.
           (type=CanvasWidget)
Returns:
None

remove_child(self, canvaswidget)

Remove a canvas widget from the scroll-watcher. The scroll-watcher will no longer ensure that the new canvas widget is always contained in its canvas's scrollregion.
Parameters:
canvaswidget - The canvas widget to remove.
           (type=CanvasWidget)
Returns:
None

_adjust_scrollregion(self)

Adjust the scrollregion of this scroll-watcher's Canvas to include the bounding boxes of all of its children.

_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:22 2006 http://epydoc.sf.net