type=item layout elements

append_item and insert_item

<layout type="item" id="main-table">

  <!-- ... -->

  <append_item>
    <item>
      <element>
	<label type='theme_text'>Lorem</label>
      </element>
    </item>
  </append_item>

  <insert_item>
    <position>1</position>
    <item>
      <element>
	<label type='theme_text'>Ipsum</label>
      </element>
    </item>
  </insert_item>

  </layout>

append_item and insert_item invoke the corresponding item layout manager methods that add new items to the. The position value specifies the insert position (for insert_item). The item element contains a single theme widget, typically a label, which defines the new item.

Custom new item appearance

append_item and insert_item have an optional appearance that sets a non-default appearance for the new item:

<append_item>
  <item>
    <element>
      <label type='theme_text'>Lorem</label>
    </element>
  </item>
  <appearance>custom-item</appearance>
</append_item>

<!-- ... -->

<appearance id="custom-item" type="item_button">

  <!-- ... -->

</appearance>

The value of the element specifies an appearance object of type=item_button. This is equivalent to passing this optional parameter to append_item() or insert_item().

remove_item

<remove_item>
  <position>0</position>
</remove_item>

remove_item invokes the corresponding item layout manager method that removes an an item. The position value specifies the position index of the item to remove.