<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.15 -->
  <template class="GbViewStack" parent="GtkBin">
    <child>
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <property name="visible">true</property>
        <child>
          <object class="GtkBox">
            <property name="orientation">horizontal</property>
            <property name="visible">true</property>
            <style>
              <class name="notebook"/>
              <class name="header"/>
            </style>
            <child>
              <object class="GtkEventBox" id="header_event_box">
                <property name="above-child">false</property>
                <property name="visible-window">false</property>
                <property name="visible">true</property>
                <child>
                  <object class="GtkBox">
                    <property name="orientation">horizontal</property>
                    <property name="hexpand">true</property>
                    <property name="visible">true</property>
                    <property name="margin-bottom">3</property>
                    <property name="margin-end">7</property>
                    <property name="margin-start">6</property>
                    <property name="margin-top">3</property>
                    <child>
                      <object class="GtkMenuButton" id="views_button">
                        <property name="visible">true</property>
                        <property name="focus-on-click">false</property>
                        <property name="popover">views_popover</property>
                        <property name="sensitive">false</property>
                        <style>
                          <class name="image-button"/>
                          <class name="flat"/>
                        </style>
                        <child>
                          <object class="GtkImage">
                            <property name="visible">true</property>
                            <property name="icon-name">view-list-symbolic</property>
                          </object>
                        </child>
                      </object>
                      <packing>
                        <property name="pack-type">start</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkSeparator">
                        <property name="margin-start">3</property>
                        <property name="margin-end">3</property>
                        <property name="margin-top">4</property>
                        <property name="margin-bottom">4</property>
                        <property name="orientation">vertical</property>
                        <property name="visible">true</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkBox">
                        <property name="orientation">horizontal</property>
                        <property name="visible">true</property>
                        <style>
                          <class name="navigation"/>
                        </style>
                        <child>
                          <object class="GtkButton" id="go_backward">
                            <property name="visible">true</property>
                            <property name="action-name">view-stack.go-backward</property>
                            <property name="focus-on-click">false</property>
                            <style>
                              <class name="flat"/>
                              <class name="image-button"/>
                            </style>
                            <child>
                              <object class="GtkImage">
                                <property name="icon-name">go-previous-symbolic</property>
                                <property name="visible">true</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton" id="go_forward">
                            <property name="visible">true</property>
                            <property name="action-name">view-stack.go-forward</property>
                            <property name="focus-on-click">false</property>
                            <style>
                              <class name="flat"/>
                              <class name="image-button"/>
                            </style>
                            <child>
                              <object class="GtkImage">
                                <property name="icon-name">go-next-symbolic</property>
                                <property name="visible">true</property>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkSeparator">
                        <property name="margin-start">3</property>
                        <property name="margin-end">3</property>
                        <property name="margin-top">4</property>
                        <property name="margin-bottom">4</property>
                        <property name="orientation">vertical</property>
                        <property name="visible">true</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkMenuButton" id="document_button">
                        <property name="focus-on-click">false</property>
                        <property name="hexpand">false</property>
                        <property name="popover">popover</property>
                        <!-- Sensitive is not being respected,
                             likely due to popover being set. -->
                        <property name="sensitive">false</property>
                        <property name="visible">true</property>
                        <style>
                          <class name="flat"/>
                          <class name="text-button"/>
                          <class name="document-button"/>
                        </style>
                        <child>
                          <object class="GtkBox">
                            <property name="spacing">6</property>
                            <property name="visible">true</property>
                            <child>
                              <object class="GtkLabel" id="title_label">
                                <property name="hexpand">false</property>
                                <property name="visible">true</property>
                                <property name="ellipsize">start</property>
                                <property name="valign">baseline</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkLabel" id="modified_label">
                                <property name="halign">fill</property>
                                <property name="hexpand">true</property>
                                <property name="xalign">1.0</property>
                                <property name="label">•</property>
                                <property name="valign">baseline</property>
                                <property name="visible">false</property>
                              </object>
                              <packing>
                                <property name="pack-type">end</property>
                                <property name="position">1</property>
                              </packing>
                            </child>
                            <child>
                              <object class="GtkArrow">
                                <property name="arrow-type">down</property>
                                <property name="margin-top">2</property>
                                <property name="valign">baseline</property>
                                <property name="visible">true</property>
                              </object>
                              <packing>
                                <property name="pack-type">end</property>
                                <property name="position">0</property>
                              </packing>
                            </child>
                          </object>
                        </child>
                      </object>
                      <packing>
                        <property name="padding">6</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkButton" id="close_button">
                        <property name="action-name">view-stack.close</property>
                        <property name="visible">true</property>
                        <property name="focus-on-click">false</property>
                        <style>
                          <class name="image-button"/>
                          <class name="flat"/>
                          <class name="small-button"/>
                        </style>
                        <child>
                          <object class="GtkImage">
                            <property name="visible">true</property>
                            <property name="icon-name">window-close-symbolic</property>
                          </object>
                        </child>
                      </object>
                      <packing>
                        <property name="pack-type">end</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkSeparator">
                        <property name="margin-start">3</property>
                        <property name="margin-end">3</property>
                        <property name="margin-top">4</property>
                        <property name="margin-bottom">4</property>
                        <property name="orientation">vertical</property>
                        <property name="visible">true</property>
                      </object>
                      <packing>
                        <!--
                            this padding is to make things line up with header bar.
                            unfortunately, this was annoying to get right with css.
                            feel free to come fix it.
                        -->
                        <property name="padding">1</property>
                        <property name="pack-type">end</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkBox" id="controls">
                        <property name="visible">true</property>
                      </object>
                      <packing>
                        <property name="pack-type">end</property>
                      </packing>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="GtkStack" id="stack">
            <property name="homogeneous">false</property>
            <property name="hexpand">true</property>
            <property name="visible">true</property>
          </object>
        </child>
      </object>
    </child>
  </template>
  <object class="GtkPopover" id="popover">
  </object>
  <object class="GtkPopover" id="views_popover">
    <child>
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <property name="visible">true</property>
        <child>
          <object class="GbScrolledWindow">
            <property name="max-content-height">400</property>
            <property name="min-content-height">30</property>
            <property name="min-content-width">100</property>
            <property name="max-content-width">600</property>
            <property name="visible">true</property>
            <child>
              <object class="GtkListBox" id="views_listbox">
                <property name="visible">true</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>
