mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
reenable editor in standalone sequencer/groovebox
This commit is contained in:
parent
4b998eaae0
commit
ab37e2e7d4
4 changed files with 13 additions and 18 deletions
|
|
@ -9,7 +9,9 @@ view!(TuiOut: |self: Tek| self.size.of(View(self, self.view)); {
|
|||
":nil" => Box::new("nil"),
|
||||
":transport" => self.view_transport().boxed(),
|
||||
":arranger" => ArrangerView::new(self).boxed(),
|
||||
":editor" => self.editor.as_ref().map(|e|Bsp::e(e.clip_status(), e.edit_status())).boxed(),
|
||||
":editor" => self.editor.as_ref()
|
||||
.map(|e|Bsp::s(Bsp::e(e.clip_status(), e.edit_status()), e))
|
||||
.boxed(),
|
||||
":sample" => ().boxed(),//self.view_sample(self.is_editing()).boxed(),
|
||||
":sampler" => ().boxed(),//self.view_sampler(self.is_editing(), &self.editor).boxed(),
|
||||
":status" => self.view_status().boxed(),
|
||||
|
|
|
|||
|
|
@ -50,17 +50,17 @@ mod model_select; pub use self::model_select::*;
|
|||
/// Port handles
|
||||
pub ports: std::collections::BTreeMap<u32, Port<Unowned>>,
|
||||
/// View definition
|
||||
pub view: SourceIter<'static>,
|
||||
pub view: SourceIter<'static>,
|
||||
// Input definitions
|
||||
pub keys: SourceIter<'static>,
|
||||
pub keys: SourceIter<'static>,
|
||||
// Input definitions when a clip is focused
|
||||
pub keys_clip: SourceIter<'static>,
|
||||
pub keys_clip: SourceIter<'static>,
|
||||
// Input definitions when a track is focused
|
||||
pub keys_track: SourceIter<'static>,
|
||||
// Input definitions when a scene is focused
|
||||
pub keys_scene: SourceIter<'static>,
|
||||
// Input definitions when the mix is focused
|
||||
pub keys_mix: SourceIter<'static>,
|
||||
pub keys_mix: SourceIter<'static>,
|
||||
// Cache of formatted strings
|
||||
pub view_cache: Arc<RwLock<ViewCache>>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,9 +289,7 @@ impl Tek {
|
|||
.map(|(_, _, _, y)|y as u16).unwrap_or(0)
|
||||
}
|
||||
|
||||
pub(crate) fn inputs_with_sizes (&self)
|
||||
-> impl PortsSizes<'_>
|
||||
{
|
||||
pub(crate) fn inputs_with_sizes (&self) -> impl PortsSizes<'_> {
|
||||
let mut y = 0;
|
||||
self.midi_ins.iter().enumerate().map(move|(i, input)|{
|
||||
let height = 1 + input.conn().len();
|
||||
|
|
@ -301,9 +299,7 @@ impl Tek {
|
|||
})
|
||||
}
|
||||
|
||||
pub(crate) fn outputs_with_sizes (&self)
|
||||
-> impl PortsSizes<'_>
|
||||
{
|
||||
pub(crate) fn outputs_with_sizes (&self) -> impl PortsSizes<'_> {
|
||||
let mut y = 0;
|
||||
self.midi_outs.iter().enumerate().map(move|(i, output)|{
|
||||
let height = 1 + output.conn().len();
|
||||
|
|
@ -313,9 +309,7 @@ impl Tek {
|
|||
})
|
||||
}
|
||||
|
||||
pub(crate) fn tracks_with_sizes (&self)
|
||||
-> impl TracksSizes<'_>
|
||||
{
|
||||
pub(crate) fn tracks_with_sizes (&self) -> impl TracksSizes<'_> {
|
||||
let mut x = 0;
|
||||
let editing = self.is_editing();
|
||||
let active = match self.selected() {
|
||||
|
|
@ -352,13 +346,11 @@ impl Tek {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/// Define a type alias for iterators of sized items (columns).
|
||||
macro_rules! def_sizes_iter {
|
||||
($Type:ident => $($Item:ty),+) => {
|
||||
pub(crate) trait $Type<'a> =
|
||||
Iterator<Item=(usize, $(&'a $Item,)+ usize, usize)> + Send + Sync + 'a;}}
|
||||
|
||||
def_sizes_iter!(ScenesSizes => Scene);
|
||||
def_sizes_iter!(TracksSizes => Track);
|
||||
def_sizes_iter!(InputsSizes => JackMidiIn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue