type=grid layout elements

background_color

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

  <!-- ... -->

  <background_color>
    <color>bgcolor</color>
  </background>

  <!-- ... -->

</layout>

background_color invokes the grid layout manager's set_background_color() method.

remove_background_color

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

  <!-- ... -->

  <remove_background_color />

  <!-- ... -->

</layout>

remove_background_color invokes the grid layout manager's remove_background_color() method.

halign

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

  <!-- ... -->

  <halign>
    <col>0</col>
    <halign>centered</halign>
  </halign>

  <!-- ... -->

</layout>

halign invokes the grid layout manager's col_alignment() method. The halign element contains an x::w::halign value.

valign

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

  <!-- ... -->

  <valign>
    <row>0</row>
    <valign>bottom</valign>
  </valign>

  <!-- ... -->

</layout>

valign invokes the grid layout manager's row_alignment() method. The valign element contains an x::w::valign value.

padding

<dim id="cell-padding">4.0</dim>

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

  <!-- ... -->

  <padding>
    <side>top</side>
    <row>0</row>
    <padding>cell-padding</padding>
  </padding>

  <padding>
    <side>bottom</side>
    <row>0</row>
    <padding>cell-padding</padding>
  </padding>

  <padding>
    <side>left</side>
    <col>0</col>
    <padding>cell-padding</padding>
  </padding>

  <padding>
    <side>right</side>
    <col>0</col>
    <padding>cell-padding</padding>
  </padding>

  <!-- ... -->

</layout>

padding invokes the grid layout manager's row_top_padding(), row_bottom_padding(), col_left_padding(), or col_right_padding() method.

default_col_border and default_row_border

<border id="thick">

  <!-- .. -->

</border>

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

  <!-- ... -->

  <default_col_border>
    <col>1</col>
    <border>thick</border>
  </default_col_border>

  <default_row_border>
    <row>1</row>
    <border>thick</border>
  </default_row_border>

  <!-- ... -->

</layout>

These elements invoke the grid layout manager's default_col_border()() or default_row_border()() method.

percent

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

  <!-- ... -->

  <percent>
    <col>0</col>
    <percentage>50</percentage>
  </percent>

  <percent>
    <row>0</row>
    <percentage>50</percentage>
  </percent>

  <!-- ... -->

</layout>

percent invokes the grid layout manager's requested_col_width() or requested_row_height() method.

remove_col_defaults and remove_row_defaults

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

  <!-- ... -->

  <remove_col_defaults>
    <col>0</col>
  </remove_col_defaults>

  <remove_row_defaults>
    <row>0</row>
  </remove_row_defaults>


  <!-- ... -->

</layout>

These elements invoke the grid layout manager's remove_col_defaults() and remove_row_defaults() methods.

remove_all, remove_row, remove_rows, and remove_cell

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

  <!-- ... -->

  <remove_all />

  <remove_row>
    <row>0</row>
  </remove_row>

  <remove_rows>
    <row>0</row>
    <count>4</count>
  </remove_rows>

  <remove_cell>
    <row>0</row>
    <col>0</col>
  </remove_cell>
  <!-- ... -->

</layout>

These elements invoke the grid layout manager overloaded methods that remove all existing contents, a single row, or a single cell.

append_row, insert_row, append_columns, insert_columns, replace_row, and replace_cell

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

  <!-- ... -->

  <append_row>
    <name>statusbar</name>
  </append_row>

  <insert_row>
    <row>1</row>
    <name>statusbar</name>
  </insert_row>

  <append_columns>
    <row>1</row>
    <name>statusbar</name>
  </append_columns>

  <insert_columns>
    <row>1</row>
    <col>0</col>
    <name>statusbar</name>
  </insert_columns>

  <replace_row>
    <row>1</row>
    <name>statusbar</name>
  </replace_row>

  <replace_cell>
    <row>1</row>
    <col>1</col>
    <name>statusbar</name>
  </replace_cell>

  <!-- ... -->

</layout>

<!-- ... -->

<factory type="grid" id="statusbar">

  <!-- ... -->

</factory>

These methods create a new grid factory using the corresponding grid layout manager method; then use the referenced type=grid factory element to create new elements in the grid layout manager's container using the new grid factory.