type=grid layouts

<dim id="extra-padding">2.0</dim>

<layout type="grid" id="main-window-grid">

  <halign>
    <col>0</col>
    <halign>left</halign>
  </halign>

  <valign>
    <row>0</row>
    <valign>middle</valign>
  </valign>

  <padding>
    <row>0</row>
    <side>left</side>
    <padding>extra-padding</padding>
  </padding>
</layout>

<!-- in some factory... -->
<container>
  <name>main-window-grid</name>
  <type>grid</type>
</container>

x::w::gridlayoutmanager glm=container->get_layoutmanager();

glm->generate("main-window-grid", generator, elements);

The contents of a layouts of type=grid specify the methods invoked by grid layout manager's generate().

Creating type=grid layouts

A container with a type=grid creates a container that uses the grid layout manager.