<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>
  <template class="AdwDemoPageCarousel" parent="AdwBin">
    <property name="child">
      <object class="GtkBox" id="box">
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkBox" id="empty_box"/>
        </child>
        <child>
          <object class="AdwCarousel" id="carousel">
            <property name="vexpand">True</property>
            <property name="hexpand">True</property>
            <property name="allow-scroll-wheel" bind-source="scroll_wheel" bind-property="active" bind-flags="sync-create|bidirectional"/>
            <property name="allow-long-swipes" bind-source="long_swipes" bind-property="active" bind-flags="sync-create|bidirectional"/>
            <child>
              <object class="AdwStatusPage">
                <property name="icon-name">widget-carousel-symbolic</property>
                <property name="title" translatable="yes">Carousel</property>
                <property name="description" translatable="yes">A widget for paginated scrolling.</property>
                <property name="vexpand">True</property>
              </object>
            </child>
            <child>
              <object class="AdwClamp">
                <property name="margin-bottom">32</property>
                <property name="margin-start">12</property>
                <property name="margin-end">12</property>
                <property name="maximum-size">400</property>
                <property name="tightening-threshold">300</property>
                <property name="valign">center</property>
                <child>
                  <object class="AdwPreferencesGroup">
                    <child>
                      <object class="AdwComboRow" id="orientation_row">
                        <property name="title" translatable="yes">Orientation</property>
                        <signal name="notify::selected" handler="notify_orientation_cb" swapped="yes"/>
                        <property name="model">
                          <object class="AdwEnumListModel">
                            <property name="enum-type">GtkOrientation</property>
                          </object>
                        </property>
                        <property name="expression">
                          <closure type="gchararray" function="get_orientation_name"/>
                        </property>
                      </object>
                    </child>
                    <child>
                      <object class="AdwComboRow" id="indicators_row">
                        <property name="title" translatable="yes">Page Indicators</property>
                        <signal name="notify::selected" handler="notify_indicators_cb" swapped="yes"/>
                        <property name="model">
                          <object class="GtkStringList">
                            <items>
                              <item>dots</item>
                              <item>lines</item>
                            </items>
                          </object>
                        </property>
                        <property name="expression">
                          <closure type="gchararray" function="get_indicators_name"/>
                        </property>
                      </object>
                    </child>
                    <child>
                      <object class="AdwActionRow">
                        <property name="title" translatable="yes">Scroll Wheel</property>
                        <property name="activatable_widget">scroll_wheel</property>
                        <child>
                          <object class="GtkSwitch" id="scroll_wheel">
                            <property name="valign">center</property>
                            <property name="active">True</property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="AdwActionRow">
                        <property name="title" translatable="yes">Long Swipes</property>
                        <property name="activatable_widget">long_swipes</property>
                        <child>
                          <object class="GtkSwitch" id="long_swipes">
                            <property name="valign">center</property>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="AdwStatusPage">
                <property name="title" translatable="yes">Another Page</property>
                <property name="hexpand">True</property>
                <property name="child">
                  <object class="GtkButton">
                    <property name="label" translatable="yes">_Return to the First Page</property>
                    <property name="use-underline">True</property>
                    <property name="halign">center</property>
                    <property name="action-name">carousel.return</property>
                    <style>
                      <class name="suggested-action"/>
                      <class name="pill"/>
                    </style>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="GtkStack" id="indicators_stack">
            <property name="vhomogeneous">False</property>
            <property name="margin-top">6</property>
            <property name="margin-bottom">6</property>
            <property name="margin-start">6</property>
            <property name="margin-end">6</property>
            <child>
              <object class="GtkStackPage">
                <property name="name">dots</property>
                <property name="child">
                  <object class="AdwCarouselIndicatorDots">
                    <property name="carousel">carousel</property>
                    <property name="orientation" bind-source="carousel" bind-property="orientation" bind-flags="sync-create"/>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="GtkStackPage">
                <property name="name">lines</property>
                <property name="child">
                  <object class="AdwCarouselIndicatorLines">
                    <property name="carousel">carousel</property>
                    <property name="orientation" bind-source="carousel" bind-property="orientation" bind-flags="sync-create"/>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </property>
  </template>
  <object class="GtkSizeGroup">
    <property name="mode">both</property>
    <widgets>
      <widget name="empty_box"/>
      <widget name="indicators_stack"/>
    </widgets>
  </object>
</interface>
