Re: New layout language.

Orion Adrian wrote:
> On 7/7/05, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote:
>>[...]
>>Then, I increase my window to 160em x 160em, and region B increases to
>>110em x 30em, correct?
>>
>>My question, and the reason why this model is conceptually broken, is
>>what happens if, when I first load the page, my viewport *is* 160em x
>>160em?  AIUI, region B will be only 100em x 20em, not 110em x 30em as it
>>was when I resized my viewport after loading.
>>
>>The problem is, as I said above, that the initial dimensions are not
>>dependant upon the size of the viewport, yet you expect that resizing
>>will be, which makes your model conceptually broken.
> 
> What was mentioned once or twice and it present and clear in the code
> is that you also provide the canvas as a region (I was calling it a
> viewport, but decided to call it canvas in the code, sorry).

I guess you mean the code defined in
http://w3.org/mid/abd6c80105070617165f3f9813@mail.gmail.com

The fact that CanvasWidth and CanvasHeight are defined outside 
Form1() constructor makes it harder to decipher the fact out of the 
code. Adding a couple of comments wouldn't be too bad.

> The canvas represents the initial values for the canvas to be compared
> against the current size of the viewport. The code is pretty simple.
> Take a look at it.

I'll try to explain this in my own words and we'll see if you agree 
with my interpretation.

All regions are computed as [left|top|width|height]Growth was zero. 
Then a bounding box containing all regions is computed to get canvas 
size (I'd prefer this method to compute the canvas size even though 
you used hardcoded canvas size in your example implementation - this 
guarantees no extra whitespace around the layout). Then the 
*remaining space* (sounds a bit like %%-unit, doesn't it?) is shared 
between different regions according to [left|top|width|height]Growth.

Is this a correct interpretation?

-- 
Mikko

Received on Thursday, 7 July 2005 13:42:07 UTC