<?xml version="1.0" encoding="UTF-8"?>
<interface domain="drawing">

  <!-- For the menubar of any selection tool -->
  <!-- (the optionsbar uses a different model, in optionsbar-selection.ui) -->
  <menu id="options-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">Select all</attribute>
        <attribute name="action">win.select_all</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Unselect</attribute>
        <attribute name="action">win.unselect</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Invert selection</attribute>
        <attribute name="action">win.selection_invert</attribute>
        <attribute name="hidden-when">action-missing</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Close selection</attribute>
        <attribute name="action">win.selection_close</attribute>
      </item>
    </section>
    <section>

      <submenu>
        <attribute name="label" translatable="yes">Transform</attribute>
        <!-- XXX inconsistent with the idea of additional tools -->
        <item>
          <attribute name="label" translatable="yes">Crop</attribute>
          <attribute name="action">win.active_tool</attribute>
          <attribute name="target">crop</attribute>
          <attribute name="verb-icon">tool-crop-symbolic</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Scale</attribute>
          <attribute name="action">win.active_tool</attribute>
          <attribute name="target">scale</attribute>
          <attribute name="verb-icon">tool-scale-symbolic</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Rotate</attribute>
          <attribute name="action">win.active_tool</attribute>
          <attribute name="target">rotate</attribute>
          <attribute name="verb-icon">tool-rotate-symbolic</attribute>
        </item>
        <!-- <item> -->
        <!--   <attribute name="label" translatable="yes">Skew</attribute> -->
        <!--   <attribute name="action">win.active_tool</attribute> -->
        <!--   <attribute name="target">skew</attribute> -->
        <!--   <attribute name="verb-icon">tool-skew-symbolic</attribute> -->
        <!-- </item> -->
        <item>
          <attribute name="label" translatable="yes">Filters</attribute>
          <attribute name="action">win.active_tool</attribute>
          <attribute name="target">filters</attribute>
          <attribute name="verb-icon">tool-filters-symbolic</attribute>
        </item>
      </submenu>

      <submenu>
        <attribute name="label" translatable="yes">More actions</attribute>
        <section>
          <item>
            <attribute name="label" translatable="yes">Delete</attribute>
            <attribute name="action">win.selection_delete</attribute>
            <attribute name="verb-icon">edit-delete-symbolic</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Cut</attribute>
            <attribute name="action">win.selection_cut</attribute>
            <attribute name="verb-icon">edit-cut-symbolic</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Copy</attribute>
            <attribute name="action">win.selection_copy</attribute>
            <attribute name="verb-icon">edit-copy-symbolic</attribute>
          </item>
        </section>
        <section>
          <item>
            <attribute name="label" translatable="yes">Define as current image</attribute>
            <attribute name="action">win.selection-replace-canvas</attribute>
            <attribute name="hidden-when">action-missing</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Expand image to fit</attribute>
            <attribute name="action">win.selection-expand-canvas</attribute>
            <attribute name="hidden-when">action-missing</attribute>
          </item>
        </section>
        <section>
          <item>
            <attribute name="label" translatable="yes">Open As New Image</attribute>
            <attribute name="action">win.new_tab_selection</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Export as…</attribute>
            <attribute name="action">win.selection_export</attribute>
          </item>
        </section>
      </submenu>

    </section>
    <section>
      <attribute name="label" translatable="yes">Replace with…</attribute>
      <item>
        <attribute name="label" translatable="yes">Transparency</attribute>
        <attribute name="action">win.selection-color</attribute>
        <attribute name="target">alpha</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Default color</attribute>
        <attribute name="action">win.selection-color</attribute>
        <attribute name="target">initial</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Secondary color</attribute>
        <attribute name="action">win.selection-color</attribute>
        <attribute name="target">secondary</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Extract from this color</attribute>
        <attribute name="action">win.selection-extract</attribute>
      </item>
    </section>
  </menu>

</interface>

