type=book factorys

<factory type="book" id="settings">

  <add>
    <label>general-label</label>
    <layout>options</layout>
  </add>

</factory>

The contents of a factorys of type=book specify the methods invoked on a book page factory.

halign

<factory type="book" id="settings">

  <!-- ... -->

  <halign>right</halign>

  <!-- ... -->

</factory>

halign invokes the book page factory's halign() method. The halign element contains an x::w::halign value.

valign

<factory type="book" id="settings">

  <!-- ... -->

  <valign>middle</valign>

  <!-- ... -->

</factory>

valign invokes the book page factory's valign() method. The valign element contains an x::w::valign value.

set_appearance

<factory type="book" id="settings">

  <!-- ... -->

  <set_appearance>
    <appearance>booksettings</appearance>
  </set_appearance>
</factory>

<!-- ... -->

<appearance id="booksettings" type="bookpage" from="theme">
</appearance>

set_appearance invokes the book page factory's set_appearance() method. The appearance value gives the id of a type=bookpage appearance object.

add

<factory type="book" id="settings">

  <!-- ... -->

  <add>
    <tab>
      <element>
        <label type='theme_text'>${context:settings-dialog}${decoration:underline}G${decoration:none}eneral settings</label>
      </element>
    </tab>
    <shortcut type='theme_text'>${context:settings-dialog}Alt-G</shortcut>
    <page>
      <container>
        <type>grid</type>
        <name>general-settings</name>
      </container>
    </page>
  </add>
</factory>

<layout type="grid" id="general-settings">

</layout>

add invokes the book page factory's add() method, creating a new tab and a page in the book container.

The tab element creates the page's tab, and must have exactly one theme widget or container. It's usually a plain label.

The page element creates the page itself, and must have exactly one theme widget or container. It is usually a theme container.

An optional shortcut element contains the page's keyboard x::w::shortcut value.