type=list layout elements

append_items, replace_all_items, insert_items, and replace_items

<layout type="list" id="option-list">

  <!-- ... -->

  <append_items>
    <items>
      <label>Option 1</label>
      <label>Option 2</label>
    </items>
  </append_items>

  <replace_all_items>
    <items>
      <label>Option 1</label>
      <label>Option 2</label>
    </items>
  </replace_all_items>

  <insert_items>
    <position>1</position>
    <items>
      <label>Option 2(a)</label>
    </items>
  </insert_items>

  <replace_items>
    <position>2</position>
    <items>
      <label>Option 2(b)</label>
    </items>
  </replace_items>
  <!-- ... -->

</layout>

append_items, replace_all_items, insert_items, and replace_items invoke the corresponding list layout manager methods that add new items to the list. The position value specifies the insert or replacement position (for insert_items and replace_items). The items element contains the x::w::list_item_param values list which defines the new list items.

remove_item and remove_items

<layout type="list" id="option-list">

  <!-- ... -->

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

  <remove_items>
    <position>1</position>
    <count>2</count>
  </remove_items>

  <!-- ... -->

</layout>

remove_item and remove_items invoke the corresponding list layout manager methods that remove items from an existing list. The position value specifies the position index of the element to remove; or the first element to remove, with remove_items, and a count giving the number of elements to remove.

autoselect

<layout type="list" id="option-list">

  <!-- ... -->

  <autoselect>
    <position>0</position>
  </autoselect>

  <!-- ... -->

</layout>

autoselect invokes the list layout manager's autoselect() method, with the value of the position element giving its parameter.

append_copy_cut_paste

<layout type="list" id="option-list">

  <!-- ... -->

  <append_copy_cut_paste>
    <parent>main</parent>
  </appdn_copy_cut_paste>

  <!-- ... -->

</layout>

append_copy_cut_paste invokes the list layout manager's append_copy_cut_paste() method, with the value of the parent element giving the value of the append_copy_cut_paste()'s parent element parameter.

parent's value is a name of an existing element in the element factory object that gets passed to generate(). uigenerator6.C gives an example of a typical implementation that stores the main window widget in the element factory object as the main element, and then specifying main for the parent element.

uigenerator6.C gives an example of retrieving the resulting x::w::copy_cut_paste_menu_items object and installing a status update for the File menu, where the menu items appear, to update() their status each time the menu gets shown.