<div dir="ltr"><div><div><div>Maybe I moved it a bit fast to trunk because it's based on Morphic-bp.1317<br></div>But Morphic-bp.1317 does not work that great for me: <br>After activating Drag To Edges and disabling fastDragWindowForMorphic,<br>windows are effectively resized...<br>But they are kind of bouncing on the edge when I release mouse button <br></div>Well it's not catastrophic, but needs more care.<br></div>I'll wait a bit before merging.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-10 23:03 GMT+01:00  <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-KLC.1318.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>trunk/Morphic-KLC.1318.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-KLC.1318<br>
Author: KLC<br>
Time: 10 March 2017, 3:57:38.932783 pm<br>
UUID: 968604ea-690e-e84d-9905-<wbr>e1ffc9b5dfc2<br>
Ancestors: Morphic-bp.1317<br>
<br>
Update Squeak Swiki link in Morph class comment.<br>
<br>
=============== Diff against Morphic-bp.1316 ===============<br>
<br>
Item was changed:<br>
  Object subclass: #Morph<br>
        instanceVariableNames: 'bounds owner submorphs fullBounds color extension'<br>
        classVariableNames: 'IndicateKeyboardFocus PreferredCornerRadius UseSoftDropShadow'<br>
        poolDictionaries: ''<br>
        category: 'Morphic-Kernel'!<br>
<br>
+ !Morph commentStamp: 'KLC 3/10/2017 15:50' prior: 0!<br>
+ A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at <a href="http://wiki.squeak.org/squeak/30" rel="noreferrer" target="_blank">http://wiki.squeak.org/squeak/<wbr>30</a>.<br>
- !Morph commentStamp: 'efc 2/26/2003 20:01' prior: 0!<br>
- A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at <a href="http://minnow.cc.gatech.edu/squeak/30" rel="noreferrer" target="_blank">http://minnow.cc.gatech.edu/<wbr>squeak/30</a>.<br>
<br>
  Morphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method.<br>
<br>
  The World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain.<br>
<br>
  My instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly.<br>
<br>
  Structure:<br>
  instance var  Type                    Description<br>
  bounds                        Rectangle               A Rectangle indicating my position and a size that will enclose                                                                         me.<br>
  owner                         Morph                   My parent Morph, or nil for the top-level Morph, which is a<br>
                                or nil                  world, typically a PasteUpMorph.<br>
  submorphs             Array                   My child Morphs.<br>
  fullBounds            Rectangle               A Rectangle minimally enclosing me and my submorphs.<br>
  color                         Color                   My primary color. Subclasses can use this in different ways.<br>
  extension             MorphExtension Allows extra properties to be stored without adding a<br>
                                or nil                                  storage burden to all morphs.<br>
<br>
  By default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning.<br>
<br>
  Although Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.!<br>
<br>
Item was changed:<br>
  MorphicModel subclass: #SystemWindow<br>
+       instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox savedBounds'<br>
-       instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox'<br>
        classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand DragToEdges ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows RoundedWindowCorners TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick'<br>
        poolDictionaries: ''<br>
        category: 'Morphic-Windows'!<br>
<br>
  !SystemWindow commentStamp: '<historical>' prior: 0!<br>
  SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing.<br>
<br>
  The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active.  To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.!<br>
<br>
Item was changed:<br>
  ----- Method: SystemWindow>><wbr>handleListenEvent: (in category 'events') -----<br>
  handleListenEvent: aUserInputEvent<br>
        "See #mouseEnterDragging:. Watch for finished drag-and-drop action and lock contents accordingly."<br>
-<br>
        (aUserInputEvent isMouse and: [ aUserInputEvent hand hasSubmorphs not ]) ifTrue:<br>
                [ self isKeyWindow ifFalse: [ self passivateIfNeeded ].<br>
+               aUserInputEvent hand removeMouseListener: self ].<br>
+<br>
+       (aUserInputEvent hand submorphs includes: self) ifTrue: [<br>
+               | clearArea selector |<br>
+               clearArea := ActiveWorld clearArea.<br>
+               (self class dragToEdges and: [(selector := self dragToEdgesSelectorFor: aUserInputEvent cursorPoint in: clearArea) notNil])<br>
+                       ifTrue: [<br>
+                               savedBounds ifNil: [savedBounds := self bounds].<br>
+                               self newBounds: (clearArea perform: selector)]<br>
+                       ifFalse: [<br>
+                               savedBounds ifNotNil: [<br>
+                                       self newBounds: savedBounds.<br>
+                                       savedBounds := nil]]]!<br>
-               aUserInputEvent hand removeMouseListener: self ].!<br>
<br>
Item was changed:<br>
  ----- Method: SystemWindow>>justDroppedInto:<wbr>event: (in category 'geometry') -----<br>
  justDroppedInto: aMorph event: anEvent<br>
+       savedBounds := nil.<br>
-<br>
        isCollapsed<br>
                ifTrue: [self position: ((self position max: 0@0) grid: 8@8).<br>
                                collapsedFrame := self bounds]<br>
                ifFalse: [fullFrame := self bounds].<br>
<br>
        self beKeyWindow.<br>
        self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."<br>
<br>
        aMorph == self world ifTrue: [self assureLabelAreaVisible].<br>
<br>
        (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))<br>
                ifTrue: [<br>
                        self removeProperty: #initialDrop.<br>
                        (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])<br>
                                ifNotNil: [:grip |<br>
                                        grip<br>
                                                referencePoint: anEvent position;<br>
                                                setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".<br>
                                        self hasDropShadow: false.<br>
                                        anEvent hand newMouseFocus: grip]].<br>
<br>
        ^super justDroppedInto: aMorph event: anEvent!<br>
<br>
Item was changed:<br>
  ----- Method: SystemWindow>><wbr>startDragFromLabel: (in category 'events') -----<br>
  startDragFromLabel: evt<br>
        "When label events are active, we need to pass dragging to the window explicitely<br>
         The window only recognizes a drag with an offset of more than 3 pixels"<br>
<br>
        self isSticky ifTrue: [^ self].<br>
        self fastFramingOn<br>
                ifTrue: [self doFastFrameDrag: evt cursorPoint]<br>
                ifFalse: [<br>
                        self hasDropShadow: false.<br>
+                       evt hand grabMorph: self topRendererOrSelf.<br>
+                       evt hand addMouseListener: self]<br>
-                       evt hand grabMorph: self topRendererOrSelf]<br>
  !<br>
<br>
<br>
</blockquote></div><br></div>