<div dir="auto">I also like BoxMorph better than BoxedMorph now, as (I think) Hilaire proposed long ago.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 9, 2024 at 04:43 Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Hi Bernhard,<br>
<br>
(below)<br>
<br>
On 9/8/2024 2:32 PM, Bernhard Pieber via Cuis-dev wrote:<br>
> Hi Juan,<br>
><br>
> Hmm, as padding is defined as the inner distance between the border and the content shown inside that border I don't understand why padding should not make sense if a border makes sense? Why should AutoCompleterMorph, ProgressBarMorph, and PasteUpMorph for example not have a padding? AutoCompleterMorph and ProgressBarMorph might even look better with a bit of it.<br>
><br>
> I agree for DraggingGuideMorph, LayoutAdjustingMorph, HandMorph and HaloMorph, but then that's because a border does not make much sense. Hmm, why do they subclass BoxedMorph in the first place? I tried setting borders to LayoutAdjustingMorph, HandMorph and HaloMorph but none were shown. Is it because they need the extent ivar? If yes, how about the following hierarchy?<br>
><br>
> PlacedMorph: location, layoutSpec<br>
>      MorphWithExtent: extent<br>
>          BorderedMorph: color, borderWith, borderColor, padding<br>
><br>
> Cheers,<br>
> Bernhard<br>
<br>
This is a very good proposal. I'd just rename MorphWithExtent -> <br>
BoxMorph. So, we could have:<br>
<br>
PlacedMorph: location, layoutSpec<br>
     BoxMorph: extent<br>
         BorderedBoxMorph: color, borderWith, borderColor, padding<br>
<br>
And the hierarchy would be:<br>
<br>
BoxMorph subclasses (besides BorderedMorph):<br>
#(#DraggingGuideMorph #HaloHandleMorph #HaloMorph #HandMorph <br>
#InnerPluggableMorph #LayoutAdjustingMorph #MenuLineMorph #PasteUpMorph <br>
#ResizeMorph) .<br>
<br>
BorderedBoxMorph subclasses:<br>
  #(#AutoCompleterMorph #ImageMorph #LabelMorph #PluggableMorph <br>
#ProgressBarMorph #TextParagraphMorph #TileResizeMorph #TranscriptMorph) .<br>
<br>
Additional BorderedBoxMorph subclasses, with borderWidth typically zero, <br>
but possibly non-zero padding:<br>
#(#HoverHelpMorph #LayoutMorph #MenuMorph)<br>
<br>
I like it.<br>
<br>
The migration would have to be gradual, picking one of the existing <br>
BoxedMorph subclasses, and either ensuring no use of 'border', and make <br>
it subclass BoxMorph, or make it subclass of BorderedBoxMorph, making it <br>
also use 'padding'.<br>
<br>
Thanks,<br>
<br>
><br>
>> Am 07.09.2024 um 22:49 schrieb Juan Vuletich<<a href="mailto:juan@cuis.st" target="_blank">juan@cuis.st</a>>:<br>
>><br>
>> On 9/6/2024 11:47 AM, ken.dickey--- via Cuis-dev wrote:<br>
>>> And for the rest of us, here is the 3 combined ChangeSets into one.<br>
>>><br>
>>> I think I have now reconstituted all the code I lost.<br>
>>><br>
>>> Again, sorry for the lost fileout.<br>
>>><br>
>>> Please test&  feedback.<br>
>>><br>
>>> Cheers,<br>
>>> -KenD<br>
>> Hi Ken,<br>
>><br>
>> I think this is useful. But I'm not really happy with adding the ivar to<br>
>> BoxedMorph. I reviewed the immediate subclasses of BoxedMorph, and on a<br>
>> quick look...<br>
>><br>
>> Classes where 'padding' makes sense:<br>
>> HoverHelpMorph<br>
>> ImageMorph<br>
>> LabelMorph<br>
>> LayoutMorph<br>
>> MenuMorph<br>
>> PluggableMorph<br>
>> TextParagraphMorph<br>
>> TranscriptMorph<br>
>><br>
>> Classes where 'padding' doesn't make sense:<br>
>> AutoCompleterMorph<br>
>> DraggingGuideMorph<br>
>> HaloHandleMorph<br>
>> HaloMorph<br>
>> HandMorph<br>
>> InnerPluggableMorph<br>
>> LayoutAdjustingMorph<br>
>> MenuLineMorph<br>
>> PasteUpMorph<br>
>> ProgressBarMorph<br>
>><br>
>> So, I think it would be better to add PaddedMorph as subclass of<br>
>> BoxedMorph, with ivar 'padding'. Then we could (pehaps gradually) change<br>
>> the superclass of classes where we see the advantage, starting with your<br>
>> code to enable the feature.<br>
>><br>
>> Thoughts?<br>
>><br>
>> Thanks,<br>
>><br>
>> --<br>
>> Juan Vuletich<br>
>> <a href="http://cuis.st" rel="noreferrer" target="_blank">cuis.st</a><br>
>> <a href="http://github.com/jvuletich" rel="noreferrer" target="_blank">github.com/jvuletich</a><br>
>> <a href="http://researchgate.net/profile/Juan-Vuletich" rel="noreferrer" target="_blank">researchgate.net/profile/Juan-Vuletich</a><br>
>> <a href="http://independent.academia.edu/JuanVuletich" rel="noreferrer" target="_blank">independent.academia.edu/JuanVuletich</a><br>
>> <a href="http://patents.justia.com/inventor/juan-manuel-vuletich" rel="noreferrer" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a><br>
>> <a href="http://linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a><br>
>> <a href="http://twitter.com/JuanVuletich" rel="noreferrer" target="_blank">twitter.com/JuanVuletich</a><br>
>><br>
><br>
<br>
<br>
-- <br>
Juan Vuletich<br>
<a href="http://cuis.st" rel="noreferrer" target="_blank">cuis.st</a><br>
<a href="http://github.com/jvuletich" rel="noreferrer" target="_blank">github.com/jvuletich</a><br>
<a href="http://researchgate.net/profile/Juan-Vuletich" rel="noreferrer" target="_blank">researchgate.net/profile/Juan-Vuletich</a><br>
<a href="http://independent.academia.edu/JuanVuletich" rel="noreferrer" target="_blank">independent.academia.edu/JuanVuletich</a><br>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" rel="noreferrer" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a><br>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a><br>
<a href="http://twitter.com/JuanVuletich" rel="noreferrer" target="_blank">twitter.com/JuanVuletich</a><br>
<br>
</blockquote></div></div>