The little yellow dot -- SystemWindow resizing

Joern Eyrich Joern.Eyrich at brokat.com
Mon Jul 16 18:40:11 UTC 2001


Jim Benson wrote:
> 
> Here's a first look at a simple design for window frame resizing. This is a
> case of take away as much fluff as possible, take a look and see what it
> looks like, so that we can later add back more fluff than possibly
> imaginable.
> 
> http://people.we.mediaone.net/trade/Zurgle/YellowDot.htm
> 
> Take a look, and tell me what you think.

Looks a lot like what, for example, Windows does, and I guess many people like that (I do).

One thing I particularly like is that you don't get that annoying effect that you click to resize, don't actually move the mouse, release the button, and the window is resized all the same, because the new bounds are based on cursor *location*, not *movement*

I would prefer the corner handles to be L-shaped, too, rather than rectangle-shaped, so you can have a, say, 2-pixel border but have the "corner" extend 16 pixels along the edges.
How to do that best I don't know. Make the WindowBorderMorph transparent for the not-border part and propagate events to the contained morph(s)? make the corner consist of two morphs (one horizontal, one vertical) that both have corner-resize behaviour?

However, in the tradition of tackling the hardest parts first (ahem...), I have attached a changeset that makes the diagonal cursors roughly the same size as the horizontal/vertical ones.

One other tiny problem: if you resize and one dimension reaches its minimal limit, and you move the cursor further, *off* the bordermorph, the cursor is not reset to normal when you release the button. Looks like a "Cursor normal beCursor" in "mouseUp:" (like there already is in "mouseLeave:") takes care of that.

Finally, there should eventually be support for the fastDragWindowForMorphic preference...
-------------- next part --------------
'From Squeak3.1alpha of 30 April 2001 [latest update: #4173] on 16 July 2001 at 7:34:03 pm'!

!Cursor class methodsFor: 'constants' stamp: 'je 7/16/2001 19:31'!
originResize
	^ (Cursor
	extent: 16 at 16
	fromArray: #(
		2r000000000000000
		2r000000000000000
		2r000000000000000
		2r001111100000000
		2r001111000000000
		2r001110000000000
		2r001101000000000
		2r001000100000000
		2r000000010001000
		2r000000001011000
		2r000000000111000
		2r000000001111000
		2r000000011111000
		2r000000000000000
		2r000000000000000
		2r000000000000000)
	offset: -7 at -7)
withMask! !

!Cursor class methodsFor: 'constants' stamp: 'je 7/16/2001 19:28'!
topRightResize
	^ (Cursor
	extent: 16 at 16
	fromArray: #(
		2r000000000000000
		2r000000000000000
		2r000000000000000
		2r000000011111000
		2r000000001111000
		2r000000000111000
		2r000000001011000
		2r000000010001000
		2r001000100000000
		2r001101000000000
		2r001110000000000
		2r001111000000000
		2r001111100000000
		2r000000000000000
		2r000000000000000
		2r000000000000000)
	offset: -7 at -7)
withMask! !



More information about the Squeak-dev mailing list