[Cuis-dev] Renaming several fundamental Morph classes
Hilaire Fernandes
hilaire at drgeo.eu
Mon Dec 27 00:58:03 PST 2021
> I haven't implemented any yet, but I was thinking, for example, on a
> morph that is a function, in a FunctionGraphMorph. The graph sets the
> space (the coordinate system) for the functions it shows. Each
> function can't and shouldn't be moved. If you move the sin(x) function
> 1 upwards, it becomes sin(x)+1, and that's a different function. So it
> is for morphs that can't be moved at all.
In DrGeo, geometric item views are direct subclasses of Morph, because
you are not expected to drag these morphs around. The view is only
positioned according to its math model. So this is an additional show
case for a Morph without location attribute.
Le 26/12/2021 à 20:30, Juan Vuletich a écrit :
> This is my current suggestion, that tries to follow consensus:
>
> Morph
> LocatedMorph (location) [today’s MovableMorph]
> RectMorph (extent, color) [to replace KernelMorph and part of
> WidgetMorph]
> BorderedRectMorph (borderWidth, borderColor) [rest of
> today’s WidgetMorph]
> PasteUpMorph [no change]
> WorlddMorph [no change]
> PluggableMorph [no change]
User may understand Rectangle when she will read RectMorph, but it can
be many shapes in a rectangle extent (ellipse, disc, star, right
triangle, diamond). BoxMorph and BorderedBoxMorph will reduce this
confusion.
In the other hand, most subclasses of RectMorph are expected to be
rectangular shape and Juan want it to be clear.
An EllipseMorph will be a subclass of RectMorph/BorderRectMorph, this
look odd, but understandable though.
So likely *RectMorph* and *BorderedRectMorph* are very good compromise.
Regarding LocatedMorph and MoveableMorph, I found the latter inelegant
and the former not really better. A more simple *MobileMorph* is so
easier to pronounce, meaningful and elegant.
For the better to all of you.
Hilaire
--
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211227/f5d0e892/attachment.htm>
More information about the Cuis-dev
mailing list