mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
81 lines
2.5 KiB
Rust
81 lines
2.5 KiB
Rust
pub mod chain;
|
|
pub mod arranger;
|
|
pub mod layout;
|
|
pub mod sampler;
|
|
pub mod sequencer;
|
|
pub mod transport;
|
|
pub mod plugin;
|
|
pub mod border;
|
|
pub mod split;
|
|
|
|
pub use self::border::*;
|
|
pub use self::layout::*;
|
|
pub use self::split::*;
|
|
pub use self::transport::TransportView;
|
|
pub use self::arranger::*;
|
|
pub use self::chain::ChainView;
|
|
pub use self::sequencer::SequencerView;
|
|
|
|
use crate::{render, App, AppSection, core::*};
|
|
|
|
render!(App |self, buf, area| {
|
|
let track = self.track_cursor;
|
|
Split::down([
|
|
&TransportView::new(self),
|
|
&Split::down([
|
|
&ArrangerView::new(&self, !self.arranger_mode),
|
|
&If(track > 0, &Split::right([
|
|
&ChainView::vertical(&self),
|
|
&SequencerView::new(&self),
|
|
]))
|
|
])
|
|
]).render(buf, area)?;
|
|
if let Some(ref modal) = self.modal {
|
|
modal.render(buf, area)?;
|
|
}
|
|
Ok(area)
|
|
|
|
//let transport = transport.render(buf, area)?;
|
|
//let y = y + transport.height;
|
|
|
|
//let arranger = arranger.render(buf, Rect { x, y, width, height })?;
|
|
//let style_entered = if self.entered {
|
|
//Style::default().green()
|
|
//} else {
|
|
//Style::default().green().dim()
|
|
//};
|
|
//if self.section == AppSection::Arranger {
|
|
//QuarterV(style_entered).draw(buf, arranger)
|
|
//}
|
|
//let y = y + arranger.height;
|
|
//if self.track_cursor > 0 {
|
|
//let chain = ChainView::new(&self, false);
|
|
//let phrase = SequencerView::new(&self);
|
|
|
|
//let chain = chain.render(buf, chain_area)?;
|
|
//if self.section == AppSection::Chain {
|
|
//QuarterV(style_entered).draw(buf, Rect { width, ..chain })
|
|
//}
|
|
//let phrase = phrase.render(buf, Rect {
|
|
//x, y, width, height: height - height / 3
|
|
//})?;
|
|
//if self.section == AppSection::Sequencer {
|
|
//QuarterV(style_entered).draw(buf, phrase)
|
|
//}
|
|
//} else {
|
|
//let area = Rect { x, y, width, height };
|
|
//let mut x = area.x;
|
|
//for track in self.tracks.iter() {
|
|
//let chain = ChainView {
|
|
//focused: self.section == AppSection::Chain,
|
|
//track: Some(track),
|
|
//vertical: true,
|
|
//};
|
|
//track.name.blit(buf, x + 1, area.y, Some(Style::default().white().bold()));
|
|
//let chain = chain.render(buf, Rect {
|
|
//x, y: area.y + 1, width: width, height: height - y - 1
|
|
//})?;
|
|
//x = x + chain.width.max(track.name.len() as u16);
|
|
//}
|
|
//};
|
|
});
|