'Create a new canvas widget.  This constructor should only be
called by subclass constructors; and it should be called only
"after" the subclass has constructed all graphical canvas
objects and registered all child widgets.
:param canvas: This canvas widget\'s canvas.
:type canvas: Tkinter.Canvas
:param parent: This canvas widget\'s hierarchical parent.
:type parent: CanvasWidget
:param attribs: The new canvas widget\'s attributes.'

def __init__(self, canvas, parent=None, **attribs):

    if (self.__class__ == CanvasWidget):
        raise TypeError('CanvasWidget    is    an    abstract    base    class')
    if (not isinstance(canvas, Canvas)):
        raise TypeError('Expected    a    canvas!')
    self.__canvas = canvas
    self.__parent = parent
    if (not hasattr(self, '_CanvasWidget__children')):
        self.__children = []
    self.__hidden = 0
    self.__updating = 0
    self.__press = None
    self.__drag_x = self.__drag_y = 0
    self.__callbacks = {}
    self.__draggable = 0
    for (attr, value) in list(attribs.items()):
        self[attr] = value
    self._manage()
    for tag in self._tags():
        self.__canvas.tag_bind(tag, '<ButtonPress-1>', self.__press_cb)
        self.__canvas.tag_bind(tag, '<ButtonPress-2>', self.__press_cb)
        self.__canvas.tag_bind(tag, '<ButtonPress-3>', self.__press_cb)
