Composing UI layout question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Composing UI layout question

Igor Stasenko
Hi folks,

suppose you having a visual UI editing tool, where you can place
morphs/controls and define their position(s).

I have a model in mind, where coordinates can be defined by formal
description, i.e.

morph left: morph parent left + some offset
morph width: morph parent width / 2

etc.

but i wonder, in what way such relations can be represented by UI
editor/design tool.

I want that user could easily specify following:

suppose i placing a button in form, and say that its corner
(bottom/right) should be aligned to its parent corner, with some
negative offset (-5 @ -5).
And button width/height should be calculated by taking a button label
text width & height.
So, user by specifying two ordinates - corner and width & height, is
fully describing a button visual layout.
The problem is that button's label is submorph, and i not sure how to
formally encode such relation i.e. parent width & height (or any other
parent coordinate) depends on its submorph's fixed width/height.

--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Composing UI layout question

Schwab,Wilhelm K
Sig,

I have used two systems that solve this problem: WindowBuilder and Dolphin's ViewComposer.  Dolphin's approach is far the more familiar to me, and is based on a hierarchy of layout manager objects.  IIRC, the layout manager idea was inspired by Java (just giving credit where it is due, and perhaps offering a clue to documentation??).

Parent views each have a layout manager; the particular class one chooses sets the algorithm (proportional is quick and easy, FramingLayout is a little tricky but very flexible) used to position chlid views, and also imposes requirements on the aspects of the child views.  The latter is an alert that aspects of the children must be altered (in general they need to be replaced with objects of suitable type to meet the needs of the manager) any time the parent layout manager type is changed, and suitable values must be created and assigned to a newly added child.

The view composer uses a Published Aspects Inspector (PAI) to allow the user to see and change all of the above.  The PAI is very similar to Pharo's explorer, embedded in the VC of course.

Bill


---
Wilhelm K. Schwab, Ph.D.
bschwab AT anest DOT ufl DOT edu

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
Sent: Thursday, March 19, 2009 5:10 AM
To: The general-purpose Squeak developers list; Pharo Development
Subject: [Pharo-project] Composing UI layout question

Hi folks,

suppose you having a visual UI editing tool, where you can place morphs/controls and define their position(s).

I have a model in mind, where coordinates can be defined by formal description, i.e.

morph left: morph parent left + some offset morph width: morph parent width / 2

etc.

but i wonder, in what way such relations can be represented by UI editor/design tool.

I want that user could easily specify following:

suppose i placing a button in form, and say that its corner
(bottom/right) should be aligned to its parent corner, with some negative offset (-5 @ -5).
And button width/height should be calculated by taking a button label text width & height.
So, user by specifying two ordinates - corner and width & height, is fully describing a button visual layout.
The problem is that button's label is submorph, and i not sure how to formally encode such relation i.e. parent width & height (or any other parent coordinate) depends on its submorph's fixed width/height.

--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project