<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk+" version="3.20"/>
  <requires lib="libhandy" version="0.0"/>
  <template class="HdyFlapDemoWindow" parent="HdyWindow">
    <property name="modal">True</property>
    <property name="window_position">center-on-parent</property>
    <property name="default-width">640</property>
    <property name="default-height">480</property>
    <child>
      <object class="GtkBox">
        <property name="visible">True</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="HdyHeaderBar">
            <property name="visible">True</property>
            <property name="show_close_button">True</property>
            <property name="title">HdyFlap Demo</property>
            <child>
              <object class="GtkToggleButton" id="reveal_btn_start">
                <property name="visible">True</property>
                <property name="active" bind-source="flap" bind-property="reveal-flap" bind-flags="sync-create|bidirectional"/>
                <child>
                  <object class="GtkImage">
                    <property name="visible">True</property>
                    <property name="icon-name">view-sidebar-start-symbolic</property>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkToggleButton" id="reveal_btn_end">
                <property name="visible">False</property>
                <property name="active" bind-source="flap" bind-property="reveal-flap" bind-flags="sync-create|bidirectional"/>
                <child>
                  <object class="GtkImage">
                    <property name="visible">True</property>
                    <property name="icon-name">view-sidebar-end-symbolic</property>
                  </object>
                </child>
              </object>
              <packing>
                <property name="pack-type">end</property>
              </packing>
            </child>
          </object>
        </child>
        <child>
          <object class="HdyFlap" id="flap">
            <property name="visible">True</property>
            <property name="locked" bind-source="locked_switch" bind-property="active" bind-flags="sync-create"/>
            <property name="fold-policy" bind-source="fold_policy_row" bind-property="selected-index"/>
            <property name="transition-type" bind-source="transition_type_row" bind-property="selected-index"/>
            <property name="modal" bind-source="modal_switch" bind-property="active" bind-flags="sync-create"/>
            <property name="swipe-to-open" bind-source="swipe_to_open_switch" bind-property="active" bind-flags="sync-create"/>
            <property name="swipe-to-close" bind-source="swipe_to_close_switch" bind-property="active" bind-flags="sync-create"/>
            <child type="flap">
              <object class="GtkStackSidebar">
                <property name="visible">True</property>
                <property name="stack">stack</property>
                <property name="width-request">200</property>
                <style>
                  <class name="background"/>
                </style>
              </object>
            </child>
            <child type="separator">
              <object class="GtkSeparator">
                <property name="visible">True</property>
                <style>
                  <class name="sidebar"/>
                </style>
              </object>
            </child>
            <child>
              <object class="GtkStack" id="stack">
                <property name="visible">True</property>
                <property name="vexpand">True</property>
                <property name="width-request">360</property>
                <signal name="notify::visible-child" handler="stack_notify_visible_child_cb" swapped="true"/>
                <child>
                  <object class="HdyPreferencesPage">
                    <property name="visible">True</property>
                    <child>
                      <object class="HdyPreferencesGroup">
                        <property name="visible">True</property>
                        <child>
                          <object class="HdyComboRow" id="fold_policy_row">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Fold policy</property>
                          </object>
                        </child>
                        <child>
                          <object class="HdyActionRow">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Locked</property>
                            <property name="subtitle" translatable="yes">Sidebar visibility doesn't change when fold state changes</property>
                            <property name="activatable_widget">locked_switch</property>
                            <child>
                              <object class="GtkSwitch" id="locked_switch">
                                <property name="visible">True</property>
                                <property name="valign">center</property>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                  <packing>
                    <property name="title" translatable="yes">Folding</property>
                  </packing>
                </child>
                <child>
                  <object class="HdyPreferencesPage">
                    <property name="visible">True</property>
                    <child>
                      <object class="HdyPreferencesGroup">
                        <property name="visible">True</property>
                        <child>
                          <object class="HdyActionRow">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Flap position</property>
                            <child>
                              <object class="GtkBox">
                                <property name="visible">True</property>
                                <property name="valign">center</property>
                                <style>
                                  <class name="linked"/>
                                </style>
                                <child>
                                  <object class="GtkRadioButton" id="start_toggle_button">
                                    <property name="label" translatable="yes">Start</property>
                                    <property name="visible">True</property>
                                    <property name="draw-indicator">False</property>
                                    <property name="active">True</property>
                                    <signal name="toggled" handler="start_toggle_button_toggled_cb"/>
                                  </object>
                                </child>
                                <child>
                                  <object class="GtkRadioButton" id="end_toggle_button">
                                    <property name="label" translatable="yes">End</property>
                                    <property name="visible">True</property>
                                    <property name="draw-indicator">False</property>
                                    <property name="group">start_toggle_button</property>
                                  </object>
                                </child>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="HdyComboRow" id="transition_type_row">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Transition type</property>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                  <packing>
                    <property name="title" translatable="yes">Layout</property>
                  </packing>
                </child>
                <child>
                  <object class="HdyPreferencesPage">
                    <property name="visible">True</property>
                    <child>
                      <object class="HdyPreferencesGroup">
                        <property name="visible">True</property>
                        <child>
                          <object class="HdyActionRow">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Modal</property>
                            <property name="subtitle" translatable="yes">Clicking outside the sidebar or pressing Esc will close it when folded</property>
                            <property name="subtitle-lines">2</property>
                            <property name="activatable_widget">modal_switch</property>
                            <child>
                              <object class="GtkSwitch" id="modal_switch">
                                <property name="visible">True</property>
                                <property name="valign">center</property>
                                <property name="active">True</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="HdyActionRow">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Swipe to Open</property>
                            <property name="activatable_widget">swipe_to_open_switch</property>
                            <child>
                              <object class="GtkSwitch" id="swipe_to_open_switch">
                                <property name="visible">True</property>
                                <property name="valign">center</property>
                                <property name="active">True</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="HdyActionRow">
                            <property name="visible">True</property>
                            <property name="title" translatable="yes">Swipe to Close</property>
                            <property name="activatable_widget">swipe_to_close_switch</property>
                            <child>
                              <object class="GtkSwitch" id="swipe_to_close_switch">
                                <property name="visible">True</property>
                                <property name="valign">center</property>
                                <property name="active">True</property>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                  <packing>
                    <property name="title" translatable="yes">Interaction</property>
                  </packing>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
