W3C home > Mailing lists > Public > www-svg@w3.org > July 2004

Re: Grid In 1.2?

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Thu, 8 Jul 2004 18:05:09 +1000
To: www-svg@w3.org
Message-ID: <20040708080509.GB14968@mcc.id.au>

Doug Schepers:
> There has been much talk in the comunity about the need for some sort of
> table or grid layout mechanism in SVG. FlowText is great, and I think that
> allowing images in it will be a fascinating feature, but I don't think that
> it alone will satisfy most authors' needs for a relative layout system.

+1 grids

A simple example of where a grid would be useful is a simple form layout
with text labels and text entry boxes, like this:
             _____________
  E-mail:   |_____________|
             _____________
  Password: |_____________|

You want the text entry boxes (assume they are just rects for
simplicity) to have the same x coordinates.  This x coordinate should be
just to the right of the widest text label.  You also want each label
to be centered vertically with respect to its text field.

I can imagine grid cells working as flow regions.

  <grid vertical-align="middle">
    <gridRow>
      <gridCell>
        <flowPara>E-mail:</flowPara>
      </gridCell>
      <gridCell>
        <flowPara>
          <flowImage>
            <rect width="20em" height="1.5em"/>
          </flowPara>
        </flowLine>
      </gridCell>
    </gridRow>
    <gridRow>
      <gridCell>
        <flowPara>E-mail:</flowPara>
      </gridCell>
      <gridCell>
        <flowImage>
          <rect width="20em" height="1.5em"/>
        </flowPara>
      </gridCell>
    </gridRow>
  </grid>

(Maybe some of those flow* elements are redundant; I haven't looked at
them closely enough to know which ones are required and which ones can
directly contain content.)

I don't see any real impediment to using an HTML-style algorithm for
cell width determination.

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922
Received on Thursday, 8 July 2004 04:05:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:54 UTC