mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
flatten workspace into 1 crate
This commit is contained in:
parent
7c4e1e2166
commit
d926422c67
147 changed files with 66 additions and 126 deletions
26
src/arranger/arranger_mode.rs
Normal file
26
src/arranger/arranger_mode.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use crate::*;
|
||||
/// Display mode of arranger
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub enum ArrangerMode {
|
||||
/// Tracks are columns
|
||||
V(usize),
|
||||
/// Tracks are rows
|
||||
H,
|
||||
}
|
||||
render!(<Tui>|self: ArrangerMode|{});
|
||||
/// Arranger display mode can be cycled
|
||||
impl ArrangerMode {
|
||||
/// Cycle arranger display mode
|
||||
pub fn next (&mut self) {
|
||||
*self = match self {
|
||||
Self::H => Self::V(1),
|
||||
Self::V(1) => Self::V(2),
|
||||
Self::V(2) => Self::V(2),
|
||||
Self::V(0) => Self::H,
|
||||
Self::V(_) => Self::V(0),
|
||||
}
|
||||
}
|
||||
}
|
||||
fn any_size <E: Engine> (_: E::Size) -> Perhaps<E::Size>{
|
||||
Ok(Some([0.into(),0.into()].into()))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue