On 7/13/08, Peter TB Brett <[EMAIL PROTECTED]> wrote: > On Sunday 13 July 2008 05:53:41 Bernd Jendrissek wrote: >> Gschem doesn't need to know where an object's grips are. Only the >> object itself needs to know that. Now that it can publish the location >> of its grips (through grip_foreach_func()), we get something very nice: > > Hmm. In the Model-View-Controller structure, only the View and Controller > should know that grips exist (the View to display them and the Controller to > turn mouse events into manipulations of the Model).
The View should not know where to put the grips, only how to draw them. If you disagree with this, then the conclusion you head towards is that only gschem would know about the different states (ARC, LINE, etc.) of OBJECTs. Otherwise you're spreading the geometrical model between the two. And you can't do that because things like gnetlist depend on libgeda knowing the geometrical significance of abutting lines (they connect). The responsibility falls on the Controller to decide where the grips should be. And that part of the Controller could well be in libgeda, as that is where the meaning of "line", "arc", etc. is defined. Or just define grips or "special places" into the Model. > In a fantasy world where we were using MVC, libgeda wouldn't know > about grips at all -- only gschem would. Presupposes all Controller responsibilities lying with gschem exclusively. _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
