[Cuis-dev] PlacedMorph vs BoxedMorph

Hilaire Fernandes hfern at free.fr
Sat Aug 31 06:56:32 PDT 2024


Hi,

Looking at these two classes, it seems BoxedMorph has too much 
responsibilities and PlacedMorph not enough.

Indeed, PlacedMorph has BoxedMorph as its only heir. Moreover, there is 
no instance of PlacedMorph.

*I am wondering if moving the extent attribute of BoxedMorph to 
PlacedMorph *would be useful.

I have many situation where I am interested by a morph with extent and 
location but without interest to color, border, and friends. But I find 
myself in the situation I have to subclass BoxedMorph ending with a 
class with the unnecessary attributes color, border, etc.

PlacedMorph is the minimum the user can add to a layout morph, because 
of that PlacedMorph have method with extent consideration. So it is a 
bit odd.

Hilaire

-- 
GNU Dr. Geo
http://gnu.org/s/dr-geo/
http://gnu-drgeo.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240831/be4a0301/attachment.htm>


More information about the Cuis-dev mailing list