Skip to content

Commit

Permalink
add 'Inline' button and dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningTreeC committed Aug 25, 2021
1 parent da78421 commit 9c49790
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ musicsheets-f: Show the F notes
musicsheets-g: Show the G notes
musicsheets-clefs: Show the clefs
musicsheets-decorations: Show the musical decorations
musicsheets-inline: Show the inline dropdown
musicsheets-note-heads: Show the note heads
musicsheets-note-values: Show the note values (lengths)
musicsheets-rests: Insert a rest
Expand Down
3 changes: 3 additions & 0 deletions plugins/musicsheets/config/inline-shortcut.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: $:/config/shortcuts/musicsheets-inline

alt-shift-M
2 changes: 1 addition & 1 deletion plugins/musicsheets/config/tune-body-shortcut.tid
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: $:/config/shortcuts/musicsheets-tune-body

alt-shift-B
alt-shift-L
3 changes: 3 additions & 0 deletions plugins/musicsheets/images/inline.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: $:/plugins/BTC/musicsheets/images/inline

Inline
2 changes: 1 addition & 1 deletion plugins/musicsheets/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"title": "$:/plugins/BTC/musicsheets",
"description": "Music scores in abc notation for TiddlyWiki5",
"author": "Simon Huber",
"version": "0.0.17",
"version": "0.0.18",
"list": "readme usage license"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
title: $:/plugins/BTC/musicsheets/ui/EditorToolbar/dropdown/inline

<$list filter="[all[shadows+tiddlers]tag[$:/tags/MusicSheets/Inline]!is[draft]each[category]]">

<div class="tc-dropdown-item">
<$text text={{!!category}}/>
</div>

<$macrocall $name="list-tagged-draggable" tag="$:/tags/MusicSheets/Inline" subFilter="!is[draft]category{!!category}" itemTemplate="$:/plugins/BTC/musicsheets/ui/Templates/toolbar-item-template-symbols"/>

</$list>

----

<$button tag="a">

<$action-sendmessage
$message="tm-new-tiddler"
tags="$:/tags/MusicSheets/Inline"
caption="this is shown in the menu"
text="this is inserted when clicking the button"
category="'Inline' or a category you like"
/>

<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>

<em>

<$text text="new entry"/>

</em>

</$button>
9 changes: 9 additions & 0 deletions plugins/musicsheets/ui/Buttons/editor-button-inline.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: $:/plugins/BTC/musicsheets/ui/EditorToolbar/inline
tags: $:/tags/EditorToolbar
icon: $:/plugins/BTC/musicsheets/images/inline
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]match[text/vnd.tiddlywiki]] +[first[]]
dropdown: $:/plugins/BTC/musicsheets/ui/EditorToolbar/dropdown/inline
description: inline
shortcuts: ((musicsheets-inline))
caption: Inline
button-classes: tc-musicsheets-toolbar-button
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneBody/macro.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/macro
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: m: Macro
category: Tune Header and Body
category: Tune Header, Body and Inline
description: use m: (macro) to create your own macros

m:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneBody/remark.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/remark
tags: $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: [r: remark] - (wrap selection)
category: Tune Body
category: Tune Body and Inline
wrap-selection: true
description: you can use the syntax [r:remark] to write a remark in the middle of a line of music.
prefix: [r:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/NoteLength
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: L: (Default) Note Length
category: Tune Header and Body
category: Tune Header, Body and Inline
description: The L: field specifies the unit note length - the length of a note as represented by a single letter in abc

L:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Information
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
caption: I: Information
category: Tune Header and Body
title: $:/plugins/BTC/musicsheets/ui/Symbols/Instruction
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: I: Instruction
category: Tune Header, Body and Inline
description: The I:(instruction) field is used for an extended set of instruction directives concerned with how the abc code is to be interpreted.

I:
2 changes: 1 addition & 1 deletion plugins/musicsheets/ui/Symbols/TuneHeader/key.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Key
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
caption: K: Key
category: Tune Header and Body
category: Tune Header, Body and Inline
description: Note that the first occurrence of the K: field, which must appear in every tune, finishes the tune header. All following lines are considered to be part of the tune body. The key signature should be specified with a capital letter (A-G) which may be followed by a # or b for sharp or flat respectively. In addition the mode should be specified (when no mode is indicated, major is assumed).

K:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/meter.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Meter
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: M: Meter
category: Tune Header and Body
category: Tune Header, Body and Inline
description: The M: field indicates the meter. Apart from standard meters, e.g. M:6/8 or M:4/4, the symbols M:C and M:C| give common time (4/4) and cut time (2/2) respectively. The symbol M:none omits the meter entirely (free meter). It is also possible to specify a complex meter, e.g. M:(2+3+2)/8, to make explicit which beats should be accented. The parentheses around the numerator are optional.

M:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/notes.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Notes
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: N: Notes
category: Tune Header and Body
category: Tune Header, Body and Inline
description: Contains general annotations, such as references to other tunes which are similar, details on how the original notation of the tune was converted to abc, etc.

N:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/parts.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Parts
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: P: Parts
category: Tune Header and Body
category: Tune Header, Body and Inline
description: The P: field can be used in the tune header to state the order in which the tune parts are played, i.e. P:ABABCDCD, and then inside the tune body to mark each part, i.e. P:A or P:B. (In this context part refers to a section of the tune, rather than a voice in multi-voice music.)

P:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/rhythm.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Rhythm
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: R: Rhythm
category: Tune Header and Body
category: Tune Header, Body and Inline
description: Contains an indication of the type of tune (e.g. hornpipe, double jig, single jig, 48-bar polka, etc). This gives the musician some indication of how a tune should be interpreted as well as being useful for database applications.

R:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/tempo.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Tempo
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: Q: Tempo
category: Tune Header and Body
category: Tune Header, Body and Inline
description: The Q: field defines the tempo in terms of a number of beats per minute, e.g. Q:1/2=120 means 120 half-note beats per minute.

Q:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/user-defined.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/UserDefined
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: U: User defined
category: Tune Header and Body
category: Tune Header, Body and Inline
description: As a short cut to writing symbols which avoids the !symbol! syntax, the letters H-W and h-w and the symbol ~ can be assigned with the U: field.

U:
4 changes: 2 additions & 2 deletions plugins/musicsheets/ui/Symbols/TuneHeader/voices.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: $:/plugins/BTC/musicsheets/ui/Symbols/Voices
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody
tags: $:/tags/MusicSheets/TuneHeader $:/tags/MusicSheets/TuneBody $:/tags/MusicSheets/Inline
caption: V: Voices
category: Tune Header and Body
category: Tune Header, Body and Inline
description: The V: field allows the writing of multi-voice music. In multi-voice abc tunes, the tune body is divided into several voices, each beginning with a V: field. All the notes following such a V: field, up to the next V: field or the end of the tune body, belong to the voice.

V:

0 comments on commit 9c49790

Please sign in to comment.