remove Tui suffixes

This commit is contained in:
🪞👃🪞 2025-01-06 21:10:36 +01:00
parent 8d519c53dc
commit 795d91abd8
14 changed files with 47 additions and 47 deletions

View file

@ -14,7 +14,7 @@ mod arranger_v_io; pub(crate) use self::arranger_v_io::*;
mod arranger_v_sep; pub(crate) use self::arranger_v_sep::*;
/// Root view for standalone `tek_arranger`
pub struct ArrangerTui {
pub struct Arranger {
jack: Arc<RwLock<JackConnection>>,
pub clock: Clock,
pub pool: PoolModel,
@ -30,7 +30,7 @@ pub struct ArrangerTui {
pub editor: MidiEditor,
pub perf: PerfModel,
}
impl ArrangerTui {
impl Arranger {
pub fn selected (&self) -> ArrangerSelection {
self.selected
}
@ -73,7 +73,7 @@ impl ArrangerTui {
}
}
}
from_jack!(|jack| ArrangerTui {
from_jack!(|jack| Arranger {
let clock = Clock::from(jack);
let phrase = Arc::new(RwLock::new(MidiClip::new(
"Clip", true, 4 * clock.timebase.ppq.get() as usize,
@ -96,7 +96,7 @@ from_jack!(|jack| ArrangerTui {
jack: jack.clone(),
}
});
impl ArrangerTui {
impl Arranger {
fn render_mode (state: &Self) -> impl Content<TuiOut> + use<'_> {
match state.mode {
ArrangerMode::H => todo!("horizontal arranger"),
@ -104,7 +104,7 @@ impl ArrangerTui {
}
}
}
render!(TuiOut: (self: ArrangerTui) => {
render!(TuiOut: (self: Arranger) => {
let pool_size = if self.pool.visible { self.splits[1] } else { 0 };
let with_pool = |x|Bsp::w(Fixed::x(pool_size, PoolView(self.pool.visible, &self.pool)), x);
let status = ArrangerStatus::from(self);
@ -125,7 +125,7 @@ render!(TuiOut: (self: ArrangerTui) => {
Fill::xy(&self.editor),
)))))
});
audio!(|self: ArrangerTui, client, scope|{
audio!(|self: Arranger, client, scope|{
// Start profiling cycle
let t0 = self.perf.get_t0();
// Update transport clock
@ -161,7 +161,7 @@ audio!(|self: ArrangerTui, client, scope|{
self.perf.update(t0, scope);
return Control::Continue
});
has_clock!(|self: ArrangerTui|&self.clock);
has_phrases!(|self: ArrangerTui|self.pool.phrases);
has_editor!(|self: ArrangerTui|self.editor);
handle!(TuiIn: |self: ArrangerTui, input|ArrangerCommand::execute_with_state(self, input.event()));
has_clock!(|self: Arranger|&self.clock);
has_phrases!(|self: Arranger|self.pool.phrases);
has_editor!(|self: Arranger|self.editor);
handle!(TuiIn: |self: Arranger, input|ArrangerCommand::execute_with_state(self, input.event()));