<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0" />
  <object class="ApostropheTextBuffer" id="buffer">
    <signal name="mark-set" handler="_on_mark_set" />
    <signal name="paste-done" handler="_on_paste_done" />
    <signal name="changed" handler="_on_text_changed" />
  </object>
  <template class="ApostropheTextView" parent="GtkSourceView">
    <property name="wrap-mode">word-char</property>
    <property name="pixels-above-lines">4</property>
    <property name="pixels-below-lines">4</property>
    <property name="pixels-inside-wrap">8</property>
    <property name="indent-on-tab">False</property>
    <property name="buffer">buffer</property>
    <child>
      <object class="GtkGestureClick" id="gesture_controller_context">
        <property name="button">0</property>
        <signal name="pressed" handler="_on_button_pressed_event" swapped="no" />
      </object>
    </child>
    <child>
      <object class="GtkGestureClick" id="gesture_controller">
        <signal name="released" handler="_on_button_release_event" swapped="no" />
      </object>
    </child>
    <child>
      <object class='GtkShortcutController'>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;i</property>
            <property name='action'>action(win.insert-italic)</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;b</property>
            <property name='action'>action(win.insert-bold)</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;r</property>
            <property name='action'>action(win.insert-hrule)</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;u</property>
            <property name='action'>action(win.insert-listitem)</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;&lt;Shift&gt;d</property>
            <property name='action'>action(win.insert-strikethrough)</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;1</property>
            <property name='action'>action(win.insert-header)</property>
            <property name='arguments'>1</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;2</property>
            <property name='action'>action(win.insert-header)</property>
            <property name='arguments'>2</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;3</property>
            <property name='action'>action(win.insert-header)</property>
            <property name='arguments'>3</property>
          </object>
        </child>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>&lt;Control&gt;4</property>
            <property name='action'>action(win.insert-header)</property>
            <property name='arguments'>4</property>
          </object>
        </child>
      </object>
    </child>
    <style>
      <class name="apostrophe-editor" />
    </style>
    <signal name="notify::focus-mode" handler="_on_focus_mode_update" />
    <signal name="notify::spellcheck" handler="_on_spellcheck_update" />
    <signal name="notify::bigger-text" handler="update_font_size" />
  </template>
</interface>