[Goodie] FrameMatrixes for layout and resizing RE: [NEWBIE] GUI/
user input
Torsten.Bergmann at phaidros.com
Torsten.Bergmann at phaidros.com
Wed Jul 19 12:46:41 UTC 2000
Hi Michael,
Maybe you will have a look at the following sample code and image. It was
the starting
point for morphic-windows totally build from morphs. File in the code in a
2.8/2.9alpha
image and evaluate:
1. SampleWindow example
2. DocumentMorph new openInWorld
The layout of both examples is defined using Frame matrixes - an easy way to
define
how child's will behave if you resize a window. If you wanna create a GUI
Builder
you should use this concept - it is flexible and easy maintainable.
A frame matrix has a scale array and an offset array. If the scale array
contains
zeros the layout is fixed and the offset array represents the position in
client
coordinates.
(FrameMatrix scale: #(0 0 0 0 ) offset: #(1 1 20 20 )).
The scale is given in percent, for instance
(FrameMatrix scale: #(0 0 1000 0 ) offset: #(2 1 -1 20 )).
means the child's top corner is x=2, y=1. The bottom is fixed at: 20 and it
scales for 100% with the left side of the owner.
Hope the FM code (or some of the morphs) is usefull for someone.
Bye
Torsten
BTW: Don't get confused by the name of the changeset. ;)
============================================================================
======================
-----Original Message-----
From: Michael Rueger [mailto:m.rueger at acm.org]
Sent: Mittwoch, 19. Juli 2000 09:22
To: squeak at cs.uiuc.edu
Subject: Re: [NEWBIE] GUI/ user input
Mr Package wrote:
>
> What is a nice'n'simple way to query user input/ build a GUI a la
> WindowBuilder (Smalltalk/V)?
Anytime now, a first draft of some documentation is at:
http://ifsl.mb.uni-magdeburg.de/~michael/gui/index.htm
I hope to work out most of the issues tomorrow and also release the
code.
Michael
--
"To improve is to change, to be perfect is to change often."
Winston Churchill
+------------------------------------------------------------+
| Michael Rueger m.rueger at acm.org ++1 (310) 937 7196 |
+------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqueakOffice.2.cs
Type: application/octet-stream
Size: 13707 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000719/ce130046/SqueakOffice.2.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.gif
Type: image/gif
Size: 17132 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000719/ce130046/example.gif
More information about the Squeak-dev
mailing list
|