James Henstridge wrote:
> With such a canvas, all dia objects would probably be subclassed from some
> special dia canvas item type, rather than the base canvas item.
> 

I agree here. In our project, we are currently using the CanvasWidget in
several different ways, providing the functionality in our child
classes. The hierarchy you propose would also allow current code to
remain mostly compatible with the base CanvasWidget class. Additional
functionality can come through inherited classes and could allow for
several divergent child inheritance paths.

In fact, a child class could be developed that would include all the
features of the current CanvasWidget.

> I have gotten rid of the idea of layers, as they are really just groups
> that are children of the root canvas item (I am not saying that dia should
> get rid of its layers concept -- just that they don't need to be in the
> base canvas implementation).

Very good point. That allows for child branches with and without layers.
There are other features, such as the grapples/handles that could be
included/excluded in derived children. The main point is that the base
class doesn't impose either upon the programmer.

-- 

Rick L. Vinyard, Jr.

Reply via email to