use gui to build gui

Paul Dufresne dufrp@oricom.ca
Thu, 1 Jul 1999 13:16:02 -0400


hum, I am editing this message in the MTA so I am running for trouble.
I guess it is time that I find the right program to use under Linux
rather than mail.

About the resizing problem...

My best ideas come from others and this one is no exception.
It mainly came from this paper: Building user interface by direct
manipulation, by Luca Cardelli
http://www.luca.demon.co.uk/Bibliography.html (near the end)
http://research.microsoft.com/Users/luca/Papers/Toolkit.ps or .pdf

This paper (that describe a dialog editor that have been implemented
in Obliq programming language, which is distributed with Modula3,
about 100Mb (Modula3)) describes a way to control what happens
when you resize a dialog (dialogs have a minimum size, the one
they have in the editor).

Each actor (widget) have four edges (sides). For each side, there is an
attachment point that you can put where you want (on a vertical line
passing by the center of the actor for the horizontal edges, along
an horizontal line passing through the center of the actor for the
vertical edges).

As a dialog stretches from a minimal size, all the attachments points
move proportionnally.
Also while stretching, the distance between an attachment point and
it's interactor edge remains constant.

This means that if the upper edge of an actor is attached on the upper
side of the dialog while the bottom edge of the actor is attached on
the bottom of the dialog, then when the height of the dialog grow,
the height of the actor grow too.

On the other hand if both upper and lower edge of the actor were
attached on the same side of the dialog (let's say the bottom),
then when the height of the dialog grow, the actor will remains
the same height and at the same distance from the bottom of the
dialog.

I had to read it many times in the paper to understand this and
so I guess you should read the paper too, that speaks of much
more aspects, like registering functions to events, have the
editor let you change the attributes of actors without knowing
the internal of the actor, etc.