[Cuis-dev] BoxedMorph padding
Luciano Notarfrancesco
luchiano at gmail.com
Sun Sep 8 03:22:56 PDT 2024
Interesting. I cannot give a very informed opinion because I don’t program
with Morphic very often, but I have some doubts about using inheritance for
this (and why not for other properties? ColoredMorph, BorderedMorph, etc?).
I wonder if it could be implemented with properties instead (optional
properties, that a morph might have or not), or by composition. The reason
to not use properties and make it an instance variable is for speed?
On Sun, Sep 8, 2024 at 03:49 Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> On 9/6/2024 11:47 AM, ken.dickey--- via Cuis-dev wrote:
> > And for the rest of us, here is the 3 combined ChangeSets into one.
> >
> > I think I have now reconstituted all the code I lost.
> >
> > Again, sorry for the lost fileout.
> >
> > Please test & feedback.
> >
> > Cheers,
> > -KenD
>
> Hi Ken,
>
> I think this is useful. But I'm not really happy with adding the ivar to
> BoxedMorph. I reviewed the immediate subclasses of BoxedMorph, and on a
> quick look...
>
> Classes where 'padding' makes sense:
> HoverHelpMorph
> ImageMorph
> LabelMorph
> LayoutMorph
> MenuMorph
> PluggableMorph
> TextParagraphMorph
> TranscriptMorph
>
> Classes where 'padding' doesn't make sense:
> AutoCompleterMorph
> DraggingGuideMorph
> HaloHandleMorph
> HaloMorph
> HandMorph
> InnerPluggableMorph
> LayoutAdjustingMorph
> MenuLineMorph
> PasteUpMorph
> ProgressBarMorph
>
> So, I think it would be better to add PaddedMorph as subclass of
> BoxedMorph, with ivar 'padding'. Then we could (pehaps gradually) change
> the superclass of classes where we see the advantage, starting with your
> code to enable the feature.
>
> Thoughts?
>
> Thanks,
>
> --
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240908/10dd9dd0/attachment.htm>
More information about the Cuis-dev
mailing list