<div dir="ltr"><div dir="ltr">On Thu, Aug 15, 2024 at 8:34 AM Mark Volkmann <<a href="mailto:r.mark.volkmann@gmail.com">r.mark.volkmann@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">I was somewhat surprised to learn that LayoutMorph does not implement a drawOn: method that sends #drawOn: to each of its submorphs. What is it that triggers the submorphs to be drawn? I had assumed that any morph can have submorphs, but most morphs (like LabelMorph) do not draw their submorphs. Now I'm questioning that assumption.</div></blockquote><div><br></div>It's more complicated than I had imagined.</div><div class="gmail_quote">Here is my attempt to answer the question ...</div><div class="gmail_quote">How does the message `#drawOn:` get sent to each currently visible morph?<br><br>The abstract class `MorphicCanvas` defines the method `drawCurrentAndSubmorphs`<br>as `subclassResponsibility`.<br>The subclasses of `MorphicCanvas` which include<br>`BitBltCanvas`, `BoundsFinderCanvas`, `HybridCanvas`, and `VectorCanvas`.<br>all implement the `drawCurrentAndSubmorphs` method.<br><br>The `MorphicCanvas` method `fullDraw:`<br>sends the message `#drawCurrentAndSubmorphs` to<br>an instance of one of these `MorphicCanvas` subclasses.<br>The `drawCurrentAndSubmorphs` method<br>sends the message `#drawOn:` to the current morph and<br>sends the message `#fullDraw` to each submorph.<br><br>The sequence of message sends that lead to the first call to `fullDraw:` is:<br><br>- `UISupervisor class newUIProcess`<br>- `UISupervisor class spawnNewMorphicProcessFor:`<br>- `WorldMorph runProcess`<br>- `WorldMorph mainLoop`<br>- `WorldMorph displayWorldOn:`<br>- `MorphicCanvas drawWorld:repair: calls`<br>- `MorphicCanvas drawRoots:rootsDamage:backgroundDamage:`<br><div>- `MorphicCanvas fullDraw:` </div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div>