mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
add getter/setters to note cursor traits
This commit is contained in:
parent
a6100ab1d6
commit
a8be2e9dad
8 changed files with 214 additions and 188 deletions
|
|
@ -93,13 +93,19 @@ impl NoteRange for Sampler {
|
|||
}
|
||||
|
||||
impl NotePoint for Sampler {
|
||||
fn note_len (&self) -> usize {
|
||||
0 /*TODO?*/
|
||||
fn note_len (&self) -> &AtomicUsize {
|
||||
unreachable!();
|
||||
}
|
||||
fn get_note_len (&self) -> usize {
|
||||
0
|
||||
}
|
||||
fn set_note_len (&self, x: usize) -> usize {
|
||||
0 /*TODO?*/
|
||||
}
|
||||
fn note_pos (&self) -> usize {
|
||||
fn note_pos (&self) -> &AtomicUsize {
|
||||
&self.note_pt
|
||||
}
|
||||
fn get_note_pos (&self) -> usize {
|
||||
self.note_pt.load(Relaxed)
|
||||
}
|
||||
fn set_note_pos (&self, x: usize) -> usize {
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ impl Sampler {
|
|||
pub fn view_list <'a, T: NotePoint + NoteRange> (
|
||||
&'a self, compact: bool, editor: &T
|
||||
) -> impl Content<TuiOut> + 'a {
|
||||
let note_lo = editor.note_lo().load(Relaxed);
|
||||
let note_pt = editor.note_pos();
|
||||
let note_hi = editor.note_hi();
|
||||
let note_lo = editor.get_note_lo();
|
||||
let note_pt = editor.get_note_pos();
|
||||
let note_hi = editor.get_note_hi();
|
||||
Fixed::x(12, Map::south(
|
||||
1,
|
||||
move||(note_lo..=note_hi).rev(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue