mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
TokenIter -> SourceIter, reuse logic in operators, and now it renders correctly!
This commit is contained in:
parent
266f59085e
commit
b8726de78f
13 changed files with 203 additions and 154 deletions
|
|
@ -32,7 +32,7 @@ pub trait HasEditor {
|
|||
pub struct MidiEditor {
|
||||
pub mode: PianoHorizontal,
|
||||
pub size: Measure<TuiOut>,
|
||||
keys: TokenIter<'static>
|
||||
keys: SourceIter<'static>
|
||||
}
|
||||
has_size!(<TuiOut>|self: MidiEditor|&self.size);
|
||||
content!(TuiOut: |self: MidiEditor| {
|
||||
|
|
@ -92,7 +92,7 @@ impl Default for MidiEditor {
|
|||
Self {
|
||||
mode: PianoHorizontal::new(None),
|
||||
size: Measure::new(),
|
||||
keys: TokenIter(KEYS_EDIT),
|
||||
keys: SourceIter(KEYS_EDIT),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ pub struct MidiPool {
|
|||
/// Mode switch
|
||||
pub mode: Option<PoolMode>,
|
||||
|
||||
keys: TokenIter<'static>,
|
||||
keys_rename: TokenIter<'static>,
|
||||
keys_length: TokenIter<'static>,
|
||||
keys_file: TokenIter<'static>,
|
||||
keys: SourceIter<'static>,
|
||||
keys_rename: SourceIter<'static>,
|
||||
keys_length: SourceIter<'static>,
|
||||
keys_file: SourceIter<'static>,
|
||||
}
|
||||
/// Modes for clip pool
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -55,10 +55,10 @@ impl Default for MidiPool {
|
|||
clips: Arc::from(RwLock::from(vec![])),
|
||||
clip: 0.into(),
|
||||
mode: None,
|
||||
keys: TokenIter(KEYS_POOL),
|
||||
keys_rename: TokenIter(KEYS_RENAME),
|
||||
keys_length: TokenIter(KEYS_LENGTH),
|
||||
keys_file: TokenIter(KEYS_FILE),
|
||||
keys: SourceIter(KEYS_POOL),
|
||||
keys_rename: SourceIter(KEYS_RENAME),
|
||||
keys_length: SourceIter(KEYS_LENGTH),
|
||||
keys_file: SourceIter(KEYS_FILE),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue