<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <action>TextAbove</action>
        <scheme>;;TextAbove
(let ((text #f) (tag "TextAbove")(markup #f)(current #f))
	(set! current (d-DirectiveGet-chord-display tag))
	(if (not current)
		(set! current "Tutti"))
	(set! text (d-GetUserInputWithSnippets (_ "Text") (_ "Give text to appear above music: ") current))
	(if text 
	  (begin
	  	(set! markup (cdr text))
	  	(set! text (car text))
		(d-DirectivePut-chord-display tag  text )
		(d-DirectivePut-chord-postfix tag  (string-append "^\\markup { \\override  #'(line-width . 40) " markup "}"))
		(d-DirectivePut-chord-minpixels  tag 20)
		(d-SetSaved #f))
	  (begin
	  	(let ((confirm (d-GetUserInput (d-DirectiveGet-chord-display tag) (_ "Delete this text?") (_ "y"))))
	  	 (if (and confirm (equal? confirm (_ "y")))
	  		(begin
	  			(d-DirectiveDelete-chord tag)
	  			(d-SetSaved #f))
			(d-InfoDialog (_ "Cancelled")))))))
		</scheme>
        <label>Arbitrary Text</label>
        <tooltip>Prints your text above the music at this point</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
