<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font size="4">Hi Stephen,</font></p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 24/11/2022 à 20:09, Stephen Travis
Pope via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:49C2754B-2C5E-4017-BAA5-5E2D10CC2D35@heaveneverywhere.com">
<div><span style="font-family: TimesNewRomanPSMT;"><br>
</span></div>
<span style="font-family: TimesNewRomanPSMT;">Hello colleagues,</span>
<div style="font-family: TimesNewRomanPSMT;"><br>
</div>
<div style="font-family: TimesNewRomanPSMT;">The core of the Siren
music/audio package is running on Cuis, and I'm proceeding to
port the I/O classes and looking for some help with the graphics
back-end.</div>
<div style="font-family: TimesNewRomanPSMT;"><br>
</div>
</blockquote>
<p>Cool and great :-)<br>
</p>
<blockquote type="cite"
cite="mid:49C2754B-2C5E-4017-BAA5-5E2D10CC2D35@heaveneverywhere.com"><br>
<div style="font-family: TimesNewRomanPSMT;">Q: Is there a Morphic
display-list view? In Siren, most of the GUIs are based on a
simple display-list view with 2-D scrolling and zooming (i.e., 4
“scroll” bars) as in these examples,</div>
<div style="font-family: TimesNewRomanPSMT;"><br>
</div>
</blockquote>
<p>Basically, any kind of Morph can be a display-list view. To a
morph you can add morphs, named in this context submorphs, the
parent morph is named the owner. Such submorphs as PlacedMorph are
positioned with the morphPosition message, according to the origin
in the owner morph, which is not always the top-left corner as in
Squeak or Pharo. Cuis Morphic3 really improve the framework
compare to Pharo/Squeak.<br>
</p>
<p>If you use the special LayoutMorph as the owner, you set layout
rules for automatic positioning of the submorphs. I don't think
this is what you want, but may be for the score.<br>
</p>
<p>For DrGeo geometry canvas, a bit like your display-list, I
defined an owner as a kind of BoxedMorph, then defined submorph as
direct subclass of Morph, to reduce the number of attributes and
also because it was not easy to make sense for some geometric
object to have it as PlacedMorph.</p>
<p>I see 3 different several scenarii to design the equivalent of
your display-list. In each scenario, the owner as a Morph then
each type of object you add to your display-list will be defined
as specific Morph class. For each scenario :<br>
</p>
<p>1) owner is a LayoutMorph, then each submorph is added with its
layout rule. It is unlikely what you want.<br>
</p>
<p>2) owner is a PlacedMorph, and submorphs are also kind of
PlacedMorph, you position the submorphs in the owner with the
morphPosition: message. You can also rotate and scale the submoprh
(Read
<a class="moz-txt-link-freetext" href="https://cuis-smalltalk.github.io/TheCuisBook/A-Clock-Morph.html">https://cuis-smalltalk.github.io/TheCuisBook/A-Clock-Morph.html</a>)</p>
<p>3) owner is a PlacedMoprh and submoprh are direct subclasses of
Morph. You can't set the position of a submorph with the
morphPosition: message (there is not such position attributes),
you directly draw the morph according to its model. This is what I
do in DrGeo geometric canvas (Explore its DrGMorph hierarchy)<br>
</p>
<p>Hope this helps<br>
</p>
<p>Hilaire</p>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</body>
</html>