I fail to see how this prevents having multiple views for a model.

The viewer provides the drawing function and graphics context. The
library just uses what the viewer provides. If the viewer wants one
window to display one representation then the viewer calls draw page
with a particular gc that gets passed along to each of the pages sub
objects.

But the nice thing is ... is that the viewer can be very ignorant of the
internals of the library structures.

Steve Meier

On Thu, 2007-11-01 at 14:02 +0000, Peter TB Brett wrote:
> On Thursday 01 November 2007 13:42:08 Steve Meier wrote:
> > I also think that objects in libgeda should know which application
> > function to call in order to draw them selves.
> >
> > This allows the application to ask the page to draw itself and the page
> > to ask the complex components, segments, arcs, boxes, text etc to draw
> > themselves. Instead of the application having to go through the page and
> > get each item and then do the drawing.
> >
> > When I say an object should draw itself I mean that the object should
> > call the appropriatly registered application function. In my view this
> > way if the library changes the application won't get broken.
> >
> 
> On the other hand, I *don't* like this, because it violates the 
> Model-View-Controller pattern.  I would like it to be possible to have 
> multiple View implementations which can simultaneously use the same Model.
> 
> In my world, each renderer should keep its own look-up table mapping drawable 
> types to rendering functions.
> 
>                                 Peter
> 



_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to