Package teamwork :: Package widgets :: Module bigwidgets :: Class AbstractContainerWidget
[hide private]
[frames] | no frames]

Class AbstractContainerWidget

source code

CanvasWidget --+
               |
              AbstractContainerWidget
Known Subclasses:

An abstract class for canvas widgets that contain a single child, such as CanvasBox and CanvasOval. Subclasses must define a constructor, which should create any new graphical elements and then call the AbstractCanvasContainer constructor. Subclasses must also define the _update method and the _tags method; and any subclasses that define attributes should define __setitem__ and __getitem__.

Instance Methods [hide private]
 
__init__(self, canvas, child, **attribs)
Create a new container widget.
source code
None
_manage(self)
Arrange the child widgets of this canvas widget.
source code
CanvasWidget
child(self)
Returns: The child widget contained by this container widget.
source code
None
set_child(self, child)
Change the child widget contained by this container widget.
source code
string
__repr__(self)
Returns: a string representation of this canvas widget.
source code

Inherited from CanvasWidget: __getitem__, __setitem__, bbox, bind_click, bind_drag, canvas, child_widgets, destroy, height, hidden, hide, manage, move, parent, show, tags, unbind_click, unbind_drag, update, width

Method Details [hide private]

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

source code 

Create a new container widget. This constructor should only be called by subclass constructors.

Parameters:
  • canvas (Tkinter.Canvas) - This canvas widget's canvas.
  • child (CanvasWidget) - The container's child widget. child must not have a parent.
  • attribs - The new canvas widget's attributes.
Overrides: CanvasWidget.__init__

_manage(self)

source code 

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: CanvasWidget._manage
(inherited documentation)

child(self)

source code 
Returns: CanvasWidget
The child widget contained by this container widget.

set_child(self, child)

source code 

Change the child widget contained by this container widget.

Parameters:
  • child (CanvasWidget) - The new child widget. child must not have a parent.
Returns: None

__repr__(self)
(Representation operator)

source code 
Returns: string
a string representation of this canvas widget.
Overrides: CanvasWidget.__repr__
(inherited documentation)