Title:   GNUe Forms Definition - XML Structure
Status:  Current 
Created: 2006-03-27
Revised: 2006-03-27


Overview
--------

<form>
  <options>
    <title/>
    <name/>
    <version/>
    <author/>
    <description/>
  </options>
  <parameter/>
  <menu>
    <menuitem>
  </menu>
  <connection/>
  <datasource/>
  <logic>
    <block>
      <field/>
    </block>
  </logic>
  <layout>
    <page>
      <hbox>
        <vbox>
          <entry/>
          <image/>
          <component/>
          <grid>
            <column/>
          </grid>
          <button/>
        </vbox>
      </hbox>
    </page>
  </layout>
  <trigger/>
  <dialog/>
</form>


<hbox>
------

New. Aligns all children horizontally, from left to right. If it has a "label"
attribute, it is drawn as a visible box, and the label is used as a caption.


<vbox>
------

New. Aligns all children vertically, from top to bottom. If it has a "label"
attribute, it is drawn as a visible box, and the label is used as a caption.
Actually, it is a 2-column table, where the right column is reserved for
entries, and the left column is reserved for their labels, so all entries and
all labels will be aligned within this box. Children like checkboxes, buttons
etc. will just span both columns.
<page>, <vbox>, and <hbox> can be assigned a block, which means the mouse
scroll wheel within this region will move to prev/next record of this block.


<grid>
------

New. A grid for data entry. Can (and usually will) contain several <column>
children. Bound to a block. Can have a minimum number of rows, will expand to
use available space.


<column>
--------

New. A column for a grid. Has a "label" attribute that will be used as the
title for this column.
A column can contain one or more <entry> or <label> children, which will be
placed from top to bottom (multi line grids).

We need some idea how to define multi line grids with different colspan, like

 Number  Account       Account Name           Debit     Credit
[------] [-----] [-----------------------] [--------] [--------]
Comment: [-----------------------------------------------------]
[------] [-----] [-----------------------] [--------] [--------]
Comment: [-----------------------------------------------------]
[------] [-----] [-----------------------] [--------] [--------]
Comment: [-----------------------------------------------------]

<grid block="foo">
  <gridline>
      <entry name="number" label="Number" field="bar"/>
      <entry name="account" label="Accout" />
      <entry name="name" label="Account Name" />
      <entry name="debit" label="Debit" />
  </gridline>
  <gridline>
      <label text="Comment:"/>
      <entry name="Comment" Sizer:span="4"/>
  </gridline>
</grid>
