mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
wip(p60,e90): impl macros
This commit is contained in:
parent
f4a4b08c8a
commit
9d4fcaa32b
17 changed files with 748 additions and 1083 deletions
|
|
@ -52,6 +52,29 @@ impl Content for SequencerTui {
|
|||
}
|
||||
}
|
||||
|
||||
/// Display mode of arranger
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub enum ArrangerMode {
|
||||
/// Tracks are rows
|
||||
Horizontal,
|
||||
/// Tracks are columns
|
||||
Vertical(usize),
|
||||
}
|
||||
|
||||
/// Arranger display mode can be cycled
|
||||
impl ArrangerMode {
|
||||
/// Cycle arranger display mode
|
||||
pub fn to_next (&mut self) {
|
||||
*self = match self {
|
||||
Self::Horizontal => Self::Vertical(1),
|
||||
Self::Vertical(1) => Self::Vertical(2),
|
||||
Self::Vertical(2) => Self::Vertical(2),
|
||||
Self::Vertical(0) => Self::Horizontal,
|
||||
Self::Vertical(_) => Self::Vertical(0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Layout for standalone arranger app.
|
||||
impl Content for ArrangerTui {
|
||||
type Engine = Tui;
|
||||
|
|
@ -59,7 +82,7 @@ impl Content for ArrangerTui {
|
|||
let arranger_focused = self.arranger_focused();
|
||||
Split::up(
|
||||
1,
|
||||
widget(&TransportView(self)),
|
||||
TransportView(self),
|
||||
Split::down(
|
||||
self.splits[0],
|
||||
lay!(
|
||||
|
|
@ -87,8 +110,8 @@ impl Content for ArrangerTui {
|
|||
),
|
||||
Split::right(
|
||||
self.splits[1],
|
||||
widget(&PhrasesView(self)),
|
||||
widget(&PhraseView(self)),
|
||||
PhrasesView(self),
|
||||
PhraseView(self),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue