<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>
  <template class="PpsSidebarLinks" parent="PpsSidebarPage">
    <property name="child">
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child type="start">
          <object class="GtkScrolledWindow">
            <property name="halign">fill</property>
            <property name="hexpand">True</property>
            <property name="vexpand">True</property>
            <property name="child">
              <object class="GtkListView" id="list_view">
                <property name="model">
                  <object class="GtkSingleSelection" id="selection_model">
                    <property name="autoselect">False</property>
                    <signal name="selection-changed" handler="list_view_selection_changed" swapped="yes" />
                  </object>
                </property>
                <property name="factory">
                  <object class="GtkSignalListItemFactory">
                    <signal name="setup" handler="list_view_factory_setup" swapped="yes" />
                    <signal name="bind" handler="list_view_factory_bind" swapped="yes" />
                    <signal name="unbind" handler="list_view_factory_unbind" swapped="yes" />
                  </object>
                </property>
                <style>
                  <class name="navigation-sidebar" />
                </style>
              </object>
            </property>
          </object>
        </child>
        <child>
          <object class="GtkPopoverMenu" id="popup">
            <property name="has-arrow">False</property>
            <property name="halign">start</property>
            <property name="menu-model">links-menu</property>
          </object>
        </child>
      </object>
    </property>
  </template>

  <object class="GSimpleActionGroup" id="action_group" />

  <menu id="links-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">Collapse all tree</attribute>
        <attribute name="action">links.collapse-all</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Expand all tree</attribute>
        <attribute name="action">links.expand-all</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Expand all under this element</attribute>
        <attribute name="action">links.expand-all-under</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Print this section…</attribute>
        <attribute name="action">links.print-section</attribute>
      </item>
    </section>
  </menu>
</interface>
