wip: start replacing EdnViewData with EdnProvide

This commit is contained in:
🪞👃🪞 2025-01-12 15:26:37 +01:00
parent fc06fb863b
commit 1ff35baea9
8 changed files with 151 additions and 113 deletions

View file

@ -12,9 +12,13 @@ edn_provide!(usize: |self: MidiEditor|{
":time-zoom" => self.time_zoom().get(),
});
edn_command!(MidiEditCommand: |state: MidiEditor| {
("note/put" [a: bool] Self::PutNote)
("note/del" [a: bool] Self::PutNote)
("note/dur" [a: usize] Self::SetNoteCursor(a))
("note/put" [a: bool] Self::PutNote)
("note/del" [a: bool] Self::PutNote)
("note/pos" [a: usize] Self::SetNoteCursor(a.expect("no note cursor")))
("note/len" [a: usize] Self::SetNoteLength(a.expect("no note length")))
("time/pos" [a: usize] Self::SetTimeCursor(a.expect("no time cursor")))
("time/zoom" [a: usize] Self::SetTimeZoom(a.expect("no time zoom")))
("time/lock" [a: bool] Self::SetTimeLock(a.expect("no time lock")))
});
//impl EdnCommand<MidiEditor> for MidiEditCommand {
//fn from_edn <'a> (state: &MidiEditor, head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {