mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
phrase list select and append/insert
This commit is contained in:
parent
333e8bf98a
commit
dc3edc86ff
2 changed files with 27 additions and 4 deletions
|
|
@ -22,6 +22,10 @@ pub enum SequencerFocus { Transport, PhrasePool, PhraseEditor }
|
|||
/// Contains all phrases in a project
|
||||
pub struct PhrasePool<E: Engine> {
|
||||
_engine: PhantomData<E>,
|
||||
/// Scroll offset
|
||||
pub scroll: usize,
|
||||
/// Highlighted phrase
|
||||
pub phrase: usize,
|
||||
/// Phrases in the pool
|
||||
pub phrases: Vec<Arc<RwLock<Option<Phrase>>>>,
|
||||
/// Whether this widget is focused
|
||||
|
|
@ -120,6 +124,8 @@ impl<E: Engine> PhrasePool<E> {
|
|||
pub fn new () -> Self {
|
||||
Self {
|
||||
_engine: Default::default(),
|
||||
scroll: 0,
|
||||
phrase: 0,
|
||||
phrases: vec![Arc::new(RwLock::new(Some(Phrase::default())))],
|
||||
focused: false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue