type=table layouts

<layout type="table" id="option-table">
  <append_items>

    <!-- ... -->

  </append_items>
</layout>

The contents of a layouts with type=table specify the table layout manager methods that get invoked to generate() its contents.

Creating type=table layouts

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

Initializing x::w::new_tablelayoutmanager

<container>
  <name>option-table</name>
  <type>table</type>
  <style>highlight</style>
  <config>
    <columns>2</columns>
  </config>
  <header>
    <element>
      <label type='theme_text'>Name</label>
    </element>
  </header>
  <header>
    <element>
      <label type='theme_text'>Value</label>
    </element>
  </header>
</container>

The optional style's value is highlight (default) or bullet.

The config element initializes the x::w::new_tablelayoutmanager that creates the container:

table_width

Sets the x::w::new_tablelayoutmanager's table_width value:

<config>
  <table_width>40</table_width>
</config>
maximum_table_width

Sets the x::w::new_tablelayoutmanager's maximum_table_width value:

<config>
  <maximum_table_width>40</maximum_table_width>
</config>
<unlimited_table_width/>

Invokes x::w::new_tablelayoutmanager's unlimited_table_width() method.

<adjustable_column_widths/>

This element sets x::w::new_tablelayoutmanager's adjustable_column_widths to true.

extra_table_appearance

Sets the x::w::new_tablelayoutmanager's extra_table_appearance value:

<config>
  <extra_table_appearance>main-table</extra_table_appearance>
</config>

<!-- ... -->

<appearance id="main-table" type="table">

  <!-- ... -->

</appearance>

The value of the element specifies an appearance object of type=table.

restore

Calls x::w::new_tablelayoutmanager's restore() method. The x::w::uigenerator must get constructed with a x::w::const_screen_positions parameter with preserved window positions.

<config>
  <restore>table-settings</restore>
</config>

The value of the element specifies the table's unique label that gets passed to its restore() method.

Inherited list layout manager initialization configuration

x::w::new_tablelayoutmanager inherits from x::w::new_listlayoutmanager, and all config values that initialize x::w::new_listlayoutmanagers also appear in a type=table container's config.

Of particular importance is the columns value that sets the number of columns in the table.

A list of header values defines the contents of the table's header row. The internally-constructed x::w::new_tablelayoutmanager's header_factory uses the headers to create the table's header widgets.

The number of header values must be equal to the table's columns value. Each header should create one theme widget. The usual table header theme widget is a plain label.