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 and remove_items

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


<remove_items>
  <position>0</position>
  <count>4</count>
</remove_items>

remove_item and remove_items invoke the corresponding item layout manager methods that remove items from the container. The position value specifies the position index of the first item to remove.