<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Done and merged into Trunk.<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 26.10.2020 07:47:02 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style='font-family:Arial,Helvetica,sans-serif'><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Christoph!<div><br></div><div>This is great news! I will take a look at it and test it for the Windows platform.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 23.10.2020 14:11:28 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style='font-family:Arial,Helvetica,sans-serif'>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<p></p>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>Hi all! :-) I'm glad to officially submit my dropFiles changeset today, finally. It enhances the integration of drag'n'drop (DnD) events delivered by the VM from the host operating system to the image, following one of Marcel's ideas: Instead of generating separate
 DropFilesEvent instances, every DnD event from the VM is translated into a TransferMorph that can be dragged into every morph or tool like every other Morph of TransferMorph, too.</p>
<p><br>
</p>
<p><img size="133740" contenttype="image/png" id="img149849" style="user-select: none;" aria-expanded="false" contextid="img249452" aria-haspopup="true" aria-owns="_ariaId_448" aria-flowto="_ariaId_448" height="180" width="289" sizeoption="small" tabindex="0" src="cid:9eca4e4e-37b5-47f0-baa1-8223bba9ae2b"></img><br>
</p>
<p><br>
</p>
<p><b>What is the goal of this changeset?</b></p>
<p>This design change entails two key advantages: First, every dragged host element is represented by a first-class object (which is a TransferMorph) instance. Second, as a consequence, applications do no longer need to implement a separate protocol <span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">for </span><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">handling </span><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">host </span><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">DnDs</span> (which was #dropFiles:/#wantsDropFiles:)
 but only need to provide one single proper implementation of #<span>acceptDroppingMorph:event:/#<span>wantsDroppedTransferMorph:. In particular, this also enables developers who use the ToolBuilder(Spec) framework to handle contents dropped from the host system
 since the old dropFiles protocol was never forwarded to the ToolBuilder framework.</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span><b>How does it work?</b></span></span></p>
<p><span><span>There have already been complete implementations of the DropPlugin on the VM side for all important platforms (Windows, Linux, and macOS) for a long time (almost 20 years ...) which record </span></span><span style="font-size: 12pt">four different
 types of drag events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, until now, only the last of them, #dragDrop, has been handled on the image side (see <span>HandMorph >> #generateDropFilesEvent:). The main work of this changeset can
 be found in just this method where I added support for the other drag types in order to create, move, and release a TransferMorph accordingly. Other changes include:</span></span></p>
<p></p>
<ul style="margin-bottom:0px; margin-top:0px">
<li><span style="font-size: 12pt"><span>Deprecated, but kept working the old DropFilesEvent protocol (these events are still processed, but a DeprecationWarning is signaled if any morph actually handles them).</span></span></li><li><span style="font-size: 12pt"><span>
<div>Migrated the only implementation of the old dropFiles protocol, which is PasteUpMorph, to the unified TransferMorph protocol.</div>
</span></span></li><li>
<div><span style="font-size: 12pt">Introduced a new event class + protocol for SystemLaunchEvent (aka #launchDrop) which is generated
</span><span style="font-size: 12pt">by a singleton VM when it has been invoked with a new image file (see class comment). That #launchDrop is a curious hack on the VM side to reuse the DnD protocol but has completely different semantics that now are separated
 on the image side.</span></div>
</li><li>Implemented the SystemLaunchEvent protocol on PasteUpMorph.</li></ul>
<div>Besides the changeset, I have also fixed a few minor inconsistencies with several VM-specific implementations in the OpenSmalltalk-VM repository (see
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508" class="OWAAutoLink">
#508</a>, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514" class="OWAAutoLink">
#514</a>, and <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/518" class="OWAAutoLink">#518</a>) that have already been merged (thanks to all reviewers!).</div>
<div><br>
</div>
<div><b>What's the current state of the changeset?</b></div>
<div>I have <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;font-size: 16px">successfully </span>tested the changeset on Windows (Win
 2004) and Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. However, I do not have any possibility to test it on the <span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">O</span><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size: 16px">SVM
 implementations for </span>macOS and iOS, so your help and feedback especially for these platforms will be greatly appreciated!</div>
<div>Please see the attached demo video on how to test the changeset: Simply drag some files into an inspector field or a workspace and you should receive a list of FileStreams and/or FileDirectories. Also, aborting a drag operation should not fail, i.e. drag
 a file over the image but then drop the file in another window.</div>
<div><br>
</div>
<div><b>What's next?</b></div>
<div>There is much more potential for a comfortable host DnD integration! Concretely, I am having two downstream goals in mind: First, dropping other content types besides files and/or directories in your image, such as texts or images (currently, the DropPlugin
 implementations that I could try out are restricted to the former two types). Second, dragging objects out of the VM to save them as a file, or even better, to drop them in a second image! Vanessa
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655021654" class="OWAAutoLink">
has told me</a> that this was even possible in the past for certain platforms, but unfortunately, the relevant code appears to be dead nowadays. Nevertheless, I have stumbled upon a lot of stubs for both features in the DropPlugin and HandMorph code, and I'm
 looking forward to reviving them in some interesting follow-up projects!</div>
<div><br>
</div>
<div><b>Which related contributions/discussions are there else?</b></div>
<div>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>System-ct.1156 (Inbox, <span>fixes double prompt for handling a dropped file when the first dialog was canceled; </span>not included in the changeset)<b></b><br>
</li><li><a href="http://forum.world.st/Please-try-out-Inspector-Refactoring-tp5114974p5116422.html" class="OWAAutoLink">[squeak-dev] <span id="ms-rterangepaste-start"></span><span>Re: Please try out | Inspector Refactoring =)</span></a> (the thread contains some
 interesting brainstorming about MIME type support for dragging inside the image)<br>
</li></ul>
</div>
<div><br>
</div>
<div>Please test and review! And many thanks to Marcel for his helpful tips!</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
<p></p>
</div>
<p></p>
</div>
</div></blockquote>
                                        </div></div></blockquote>
                                        </div></body>