whew: all 3 mini-apps launch again

This commit is contained in:
🪞👃🪞 2024-11-23 15:38:37 +01:00
parent 6f5c28f671
commit 95dd61811e
4 changed files with 11 additions and 11 deletions

View file

@ -13,7 +13,7 @@ pub trait HasPhrase: ClockApi {
fn phrase (&self)
-> &Option<(Instant, Option<Arc<RwLock<Phrase>>>)>;
fn phrase_mut (&self)
fn phrase_mut (&mut self)
-> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)>;
fn next_phrase (&self)

View file

@ -80,7 +80,7 @@ impl Content for ArrangerTui {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
let arranger_focused = self.arranger_focused();
Split::up(
Split::down(
1,
TransportView(self),
Split::down(

View file

@ -58,16 +58,16 @@ macro_rules! impl_midi_player {
&mut self$(.$field)*.reset
}
fn phrase (&self) -> &Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!("phrase")
&self$(.$field)*.play_phrase
}
fn phrase_mut (&self) -> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!("phrase_mut")
fn phrase_mut (&mut self) -> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
&mut self$(.$field)*.play_phrase
}
fn next_phrase (&self) -> &Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!("next_phrase")
&self$(.$field)*.next_phrase
}
fn next_phrase_mut (&mut self) -> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!("next_phrase_mut")
&mut self$(.$field)*.next_phrase
}
}
impl MidiInputApi for $Struct {

View file

@ -64,7 +64,7 @@ impl ArrangerViewState for ArrangerTui {
pub trait PhrasesViewState: Send + Sync {
fn phrases_focused (&self) -> bool;
fn phrases_entered (&self) -> bool;
fn phrases (&self) -> Vec<Arc<RwLock<Phrase>>>;
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>>;
fn phrase_index (&self) -> usize;
fn phrase_mode (&self) -> &Option<PhrasesMode>;
}
@ -77,11 +77,11 @@ macro_rules! impl_phrases_view_state {
fn phrases_entered (&$self2) -> bool {
$enter
}
fn phrases (&self) -> Vec<Arc<RwLock<Phrase>>> {
todo!()
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>> {
&self$(.$field)*.phrases
}
fn phrase_index (&self) -> usize {
todo!()
self$(.$field)*.phrase.load(Ordering::Relaxed)
}
fn phrase_mode (&self) -> &Option<PhrasesMode> {
&self$(.$field)*.mode