mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-04-04 05:10:44 +02:00
separate Input and Output impls
This commit is contained in:
parent
a6efde40f8
commit
0e821e098f
77 changed files with 465 additions and 454 deletions
|
|
@ -24,7 +24,7 @@ pub struct ArrangerTui {
|
|||
pub selected: ArrangerSelection,
|
||||
pub mode: ArrangerMode,
|
||||
pub color: ItemPalette,
|
||||
pub size: Measure<Tui>,
|
||||
pub size: Measure<TuiOut>,
|
||||
pub note_buf: Vec<u8>,
|
||||
pub midi_buf: Vec<Vec<Vec<u8>>>,
|
||||
pub editor: MidiEditor,
|
||||
|
|
@ -97,14 +97,14 @@ from_jack!(|jack| ArrangerTui {
|
|||
}
|
||||
});
|
||||
impl ArrangerTui {
|
||||
fn render_mode (state: &Self) -> impl Content<Tui> + use<'_> {
|
||||
fn render_mode (state: &Self) -> impl Content<TuiOut> + use<'_> {
|
||||
match state.mode {
|
||||
ArrangerMode::H => todo!("horizontal arranger"),
|
||||
ArrangerMode::V(factor) => Self::render_mode_v(state, factor),
|
||||
}
|
||||
}
|
||||
}
|
||||
render!(Tui: (self: ArrangerTui) => {
|
||||
render!(TuiOut: (self: ArrangerTui) => {
|
||||
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);
|
||||
|
|
@ -164,4 +164,4 @@ audio!(|self: ArrangerTui, client, scope|{
|
|||
has_clock!(|self: ArrangerTui|&self.clock);
|
||||
has_phrases!(|self: ArrangerTui|self.pool.phrases);
|
||||
has_editor!(|self: ArrangerTui|self.editor);
|
||||
handle!(<Tui>|self: ArrangerTui, input|ArrangerCommand::execute_with_state(self, input.event()));
|
||||
handle!(TuiIn: |self: ArrangerTui, input|ArrangerCommand::execute_with_state(self, input.event()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue