reenable editor in standalone sequencer/groovebox

This commit is contained in:
🪞👃🪞 2025-04-24 00:36:12 +03:00
parent 4b998eaae0
commit ab37e2e7d4
4 changed files with 13 additions and 18 deletions

View file

@ -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(),

View file

@ -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>>,
}

View file

@ -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);

View file

@ -1,4 +1,5 @@
(bsp/s (fixed/y 1 :transport)
(bsp/n (fixed/y 1 :status)
(bsp/w (fixed/x :w-sidebar :pool)
(fill/y :editor))))
(fill/xy (bsp/a
(fill/xy (align/e :pool))
:editor))))