[Cuis-dev] [RFC][Proposal] A possible refactor of the Morph hierarchy

Juan Vuletich juan at jvuletich.org
Tue Oct 13 13:09:08 PDT 2020


On 10/13/2020 12:21 PM, ken.dickey--- via Cuis-dev wrote:
> On 2020-10-13 07:43, Juan Vuletich via Cuis-dev wrote:
> ..
>> - Add a new subclass of Morph, called WidgetMorph that essentially
>> includes all of RectangleLikeMorph and BorderedRectMorph.
>> - Make all subclasses of BorderedRectMorph (except for EllipseMorph
>> and PasteUpMorph) to be subclasses of WidgetMorph
>> - Make all subclasses of RectangleLikeMorph (except for
>> BorderedRectMorph, HaloMorph, HaloHandleMorph and HandMorph) be
>> subclasses of WidgetMorph, with a defaultBorderWidth of zero
>>
>> In this way, all Widget morphs will be in the WidgetMorph hierarchy,
>> improving consistency and making it easier to explain and remember.
>>
>> - RectangleLikeMorph and BorderedRectMorph might get deleted.
>
> For depricated, just orphan RectangleLikeMorph and BorderedRectMorph 
> and make them subclasses of WidgetMorph.
>
>> Thoughts? Suggestions for improving this sketch?
>
> I think the above good ideas.
>
> Pandora's idea: refactor Morphic-Widgets-Extras and Morphic-Misc1 to 
> separate out the tool-like things (radio buttons, value entry, window 
> title)

Good idea. These should be subclasses of Widget, as they are the kind of 
thing included in most GUI widget kits.

> from play-like things (mangnifier, line, bordered image).  I could go 
> either way on PickA*Pallet's.

These shouldn't be in Widget, as they are a bit less ubiquitous.

>
> I think we could use Layout{Morph,Spec}EditPanel(s) as examples in the 
> book.

Yes, I agree.

>
> $002,
> -KenD

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list