mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
cool so entering notes is available again
This commit is contained in:
parent
3c32b0fef4
commit
a20b8e5518
3 changed files with 7 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ impl From<(usize, bool)> for MidiRangeModel {
|
|||
}
|
||||
pub trait MidiRange {
|
||||
fn time_zoom (&self) -> usize;
|
||||
fn set_time_zoom (&self, x: usize);
|
||||
fn set_time_zoom (&mut self, x: usize);
|
||||
fn time_lock (&self) -> bool;
|
||||
fn set_time_lock (&self, x: bool);
|
||||
fn time_start (&self) -> usize;
|
||||
|
|
@ -62,7 +62,7 @@ pub trait MidiRange {
|
|||
}
|
||||
impl MidiRange for MidiRangeModel {
|
||||
fn time_zoom (&self) -> usize { self.time_zoom.load(Relaxed) }
|
||||
fn set_time_zoom (&self, x: usize) { self.time_zoom.store(x, Relaxed); }
|
||||
fn set_time_zoom (&mut self, x: usize) { self.time_zoom.store(x, Relaxed); }
|
||||
fn time_lock (&self) -> bool { self.time_lock.load(Relaxed) }
|
||||
fn set_time_lock (&self, x: bool) { self.time_lock.store(x, Relaxed); }
|
||||
fn time_start (&self) -> usize { self.time_start.load(Relaxed) }
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ impl MidiViewport<Tui> for PhraseEditorModel {}
|
|||
|
||||
impl MidiRange for PhraseEditorModel {
|
||||
fn time_zoom (&self) -> usize { self.mode.time_zoom() }
|
||||
fn set_time_zoom (&self, x: usize) { self.mode.set_time_zoom(x); }
|
||||
fn set_time_zoom (&mut self, x: usize) { self.mode.set_time_zoom(x); }
|
||||
fn time_lock (&self) -> bool { self.mode.time_lock() }
|
||||
fn set_time_lock (&self, x: bool) { self.mode.set_time_lock(x); }
|
||||
fn time_start (&self) -> usize { self.mode.time_start() }
|
||||
|
|
|
|||
|
|
@ -257,7 +257,10 @@ has_size!(<Tui>|self:PianoHorizontal|&self.size);
|
|||
|
||||
impl MidiRange for PianoHorizontal {
|
||||
fn time_zoom (&self) -> usize { self.range.time_zoom() }
|
||||
fn set_time_zoom (&self, x: usize) { self.range.set_time_zoom(x); }
|
||||
fn set_time_zoom (&mut self, x: usize) {
|
||||
self.range.set_time_zoom(x);
|
||||
self.redraw();
|
||||
}
|
||||
fn time_lock (&self) -> bool { self.range.time_lock() }
|
||||
fn set_time_lock (&self, x: bool) { self.range.set_time_lock(x); }
|
||||
fn time_start (&self) -> usize { self.range.time_start() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue