<?xml version="1.0" encoding="UTF-8"?>
<interface domain="easyeffects">
    <template class="EqualizerBandBox" parent="GtkBox">
        <property name="margin-start">6</property>
        <property name="margin-end">6</property>
        <property name="margin-top">6</property>
        <property name="margin-bottom">6</property>
        <property name="spacing">6</property>
        <property name="orientation">vertical</property>
        <child>
            <object class="GtkMenuButton">
                <property name="margin-bottom">6</property>
                <property name="halign">center</property>
                <property name="popover">popover_menu</property>
                <property name="icon-name">emblem-system-symbolic</property>
            </object>
        </child>

        <child>
            <object class="GtkLabel" id="band_label">
                <property name="width-chars">8</property>
                <property name="label">band</property>

                <binding name="label">
                    <closure type="gchararray" function="set_band_label">
                        <lookup name="value">band_frequency</lookup>
                    </closure>
                </binding>

                <style>
                    <class name="dim-label" />
                </style>
            </object>
        </child>

        <child>
            <object class="GtkLabel" id="band_quality_label">
                <property name="width-chars">8</property>
                <property name="label">Q</property>

                <binding name="label">
                    <closure type="gchararray" function="set_band_quality_label">
                        <lookup name="value">band_quality</lookup>
                    </closure>
                </binding>

                <style>
                    <class name="dim-label" />
                </style>
            </object>
        </child>

        <child>
            <object class="GtkScale" id="band_scale">
                <property name="vexpand">1</property>
                <property name="halign">center</property>
                <property name="orientation">vertical</property>
                <property name="inverted">1</property>
                <property name="draw-value">1</property>
                <property name="digits">2</property>
                <property name="value-pos">bottom</property>

                <binding name="sensitive">
                    <closure type="gboolean" function="set_band_scale_sensitive">
                        <lookup name="active-id">band_type</lookup>
                    </closure>
                </binding>

                <property name="adjustment">
                    <object class="GtkAdjustment">
                        <property name="lower">-35</property>
                        <property name="upper">35</property>
                        <property name="step-increment">0.01</property>
                        <property name="page-increment">1.0</property>
                    </object>
                </property>

                <accessibility>
                    <relation name="labelled-by">band_label</relation>
                </accessibility>
            </object>
        </child>
    </template>

    <object class="GtkPopover" id="popover_menu">
        <child>
            <object class="GtkBox">
                <property name="margin-start">6</property>
                <property name="margin-end">6</property>
                <property name="margin-top">6</property>
                <property name="margin-bottom">6</property>
                <property name="spacing">12</property>
                <property name="orientation">vertical</property>
                <child>
                    <object class="GtkGrid">
                        <property name="halign">center</property>
                        <property name="row-spacing">6</property>
                        <property name="column-spacing">12</property>
                        <property name="column-homogeneous">1</property>
                        <child>
                            <object class="GtkLabel">
                                <property name="label" translatable="yes">Type</property>
                                <layout>
                                    <property name="column">0</property>
                                    <property name="row">0</property>
                                </layout>
                            </object>
                        </child>
                        <child>
                            <object class="GtkComboBoxText" id="band_type">
                                <items>
                                    <item translatable="yes" id="Off">Off</item>
                                    <item translatable="yes" id="Bell">Bell</item>
                                    <item translatable="yes" id="Hi-pass">High Pass</item>
                                    <item translatable="yes" id="Hi-shelf">High Shelf</item>
                                    <item translatable="yes" id="Lo-pass">Low Pass</item>
                                    <item translatable="yes" id="Lo-shelf">Low Shelf</item>
                                    <item translatable="yes" id="Notch">Notch</item>
                                    <item translatable="yes" id="Resonance">Resonance</item>
                                    <item translatable="yes" id="Allpass">All Pass</item>
                                </items>
                                <layout>
                                    <property name="column">0</property>
                                    <property name="row">1</property>
                                </layout>
                                <accessibility>
                                    <property name="label" translatable="yes">Band Type</property>
                                </accessibility>
                            </object>
                        </child>

                        <child>
                            <object class="GtkLabel">
                                <property name="label" translatable="yes">Mode</property>
                                <layout>
                                    <property name="column">1</property>
                                    <property name="row">0</property>
                                </layout>
                            </object>
                        </child>
                        <child>
                            <object class="GtkComboBoxText" id="band_mode">
                                <items>
                                    <item id="RLC (BT)">RLC (BT)</item>
                                    <item id="RLC (MT)">RLC (MT)</item>
                                    <item id="BWC (BT)">BWC (BT)</item>
                                    <item id="BWC (MT)">BWC (MT)</item>
                                    <item id="LRX (BT)">LRX (BT)</item>
                                    <item id="LRX (MT)">LRX (MT)</item>
                                    <item id="APO (DR)">APO (DR)</item>
                                </items>
                                <layout>
                                    <property name="column">1</property>
                                    <property name="row">1</property>
                                </layout>
                                <accessibility>
                                    <property name="label" translatable="yes">Band Mode</property>
                                </accessibility>
                            </object>
                        </child>

                        <child>
                            <object class="GtkLabel">
                                <property name="label" translatable="yes">Slope</property>
                                <layout>
                                    <property name="column">2</property>
                                    <property name="row">0</property>
                                </layout>
                            </object>
                        </child>
                        <child>
                            <object class="GtkComboBoxText" id="band_slope">
                                <items>
                                    <item id="x1">x1</item>
                                    <item id="x2">x2</item>
                                    <item id="x3">x3</item>
                                    <item id="x4">x4</item>
                                </items>
                                <layout>
                                    <property name="column">2</property>
                                    <property name="row">1</property>
                                </layout>
                                <accessibility>
                                    <property name="label" translatable="yes">Band Slope</property>
                                </accessibility>
                            </object>
                        </child>
                    </object>
                </child>

                <child>
                    <object class="GtkBox">
                        <property name="halign">center</property>
                        <property name="spacing">12</property>
                        <child>
                            <object class="GtkBox">
                                <property name="spacing">6</property>
                                <property name="orientation">vertical</property>
                                <child>
                                    <object class="GtkLabel" id="band_frequency_label">
                                        <property name="label" translatable="yes">Frequency</property>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkSpinButton" id="band_frequency">
                                        <property name="digits">0</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="orientation">vertical</property>
                                        <property name="width-chars">10</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="lower">10</property>
                                                <property name="upper">24000</property>
                                                <property name="step-increment">1</property>
                                                <property name="page-increment">100</property>
                                            </object>
                                        </property>
                                        <accessibility>
                                            <relation name="labelled-by">band_frequency_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkButton" id="reset_frequency">
                                        <property name="label" translatable="yes">Reset</property>
                                        <property name="halign">center</property>
                                        <signal name="clicked" handler="on_reset_frequency" object="EqualizerBandBox" />
                                        <accessibility>
                                            <relation name="labelled-by">band_frequency_label</relation>
                                        </accessibility>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="halign">center</property>
                                <property name="valign">center</property>
                                <property name="spacing">6</property>
                                <property name="orientation">vertical</property>
                                <child>
                                    <object class="GtkLabel">
                                        <property name="label" translatable="yes">Width</property>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkLabel" id="band_width">
                                        <binding name="label">
                                            <closure type="gchararray" function="set_band_width_label">
                                                <lookup name="value">band_quality</lookup>
                                                <lookup name="value">band_frequency</lookup>
                                            </closure>
                                        </binding>

                                        <style>
                                            <class name="dim-label" />
                                        </style>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="spacing">6</property>
                                <property name="orientation">vertical</property>
                                <child>
                                    <object class="GtkLabel" id="band_quality_spinbutton_label">
                                        <property name="label" translatable="yes">Quality</property>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkSpinButton" id="band_quality">
                                        <property name="digits">2</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="orientation">vertical</property>
                                        <property name="width-chars">10</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="upper">100</property>
                                                <property name="step-increment">0.01</property>
                                                <property name="page-increment">0.1</property>
                                            </object>
                                        </property>
                                        <accessibility>
                                            <relation name="labelled-by">band_quality_spinbutton_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkButton" id="reset_quality">
                                        <property name="label" translatable="yes">Reset</property>
                                        <property name="halign">center</property>
                                        <signal name="clicked" handler="on_reset_quality" object="EqualizerBandBox" />
                                        <accessibility>
                                            <relation name="labelled-by">band_quality_spinbutton_label</relation>
                                        </accessibility>
                                    </object>
                                </child>
                            </object>
                        </child>
                    </object>
                </child>

                <child>
                    <object class="GtkBox">
                        <property name="margin-top">6</property>
                        <property name="halign">center</property>
                        <property name="spacing">24</property>
                        <child>
                            <object class="GtkToggleButton" id="band_solo">
                                <property name="label" translatable="yes">Solo</property>
                            </object>
                        </child>

                        <child>
                            <object class="GtkToggleButton" id="band_mute">
                                <property name="label" translatable="yes">Mute</property>
                            </object>
                        </child>
                    </object>
                </child>
            </object>
        </child>
    </object>
</interface>