mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +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"),
|
":nil" => Box::new("nil"),
|
||||||
":transport" => self.view_transport().boxed(),
|
":transport" => self.view_transport().boxed(),
|
||||||
":arranger" => ArrangerView::new(self).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(),
|
":sample" => ().boxed(),//self.view_sample(self.is_editing()).boxed(),
|
||||||
":sampler" => ().boxed(),//self.view_sampler(self.is_editing(), &self.editor).boxed(),
|
":sampler" => ().boxed(),//self.view_sampler(self.is_editing(), &self.editor).boxed(),
|
||||||
":status" => self.view_status().boxed(),
|
":status" => self.view_status().boxed(),
|
||||||
|
|
|
||||||
|
|
@ -50,17 +50,17 @@ mod model_select; pub use self::model_select::*;
|
||||||
/// Port handles
|
/// Port handles
|
||||||
pub ports: std::collections::BTreeMap<u32, Port<Unowned>>,
|
pub ports: std::collections::BTreeMap<u32, Port<Unowned>>,
|
||||||
/// View definition
|
/// View definition
|
||||||
pub view: SourceIter<'static>,
|
pub view: SourceIter<'static>,
|
||||||
// Input definitions
|
// Input definitions
|
||||||
pub keys: SourceIter<'static>,
|
pub keys: SourceIter<'static>,
|
||||||
// Input definitions when a clip is focused
|
// Input definitions when a clip is focused
|
||||||
pub keys_clip: SourceIter<'static>,
|
pub keys_clip: SourceIter<'static>,
|
||||||
// Input definitions when a track is focused
|
// Input definitions when a track is focused
|
||||||
pub keys_track: SourceIter<'static>,
|
pub keys_track: SourceIter<'static>,
|
||||||
// Input definitions when a scene is focused
|
// Input definitions when a scene is focused
|
||||||
pub keys_scene: SourceIter<'static>,
|
pub keys_scene: SourceIter<'static>,
|
||||||
// Input definitions when the mix is focused
|
// Input definitions when the mix is focused
|
||||||
pub keys_mix: SourceIter<'static>,
|
pub keys_mix: SourceIter<'static>,
|
||||||
// Cache of formatted strings
|
// Cache of formatted strings
|
||||||
pub view_cache: Arc<RwLock<ViewCache>>,
|
pub view_cache: Arc<RwLock<ViewCache>>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -289,9 +289,7 @@ impl Tek {
|
||||||
.map(|(_, _, _, y)|y as u16).unwrap_or(0)
|
.map(|(_, _, _, y)|y as u16).unwrap_or(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn inputs_with_sizes (&self)
|
pub(crate) fn inputs_with_sizes (&self) -> impl PortsSizes<'_> {
|
||||||
-> impl PortsSizes<'_>
|
|
||||||
{
|
|
||||||
let mut y = 0;
|
let mut y = 0;
|
||||||
self.midi_ins.iter().enumerate().map(move|(i, input)|{
|
self.midi_ins.iter().enumerate().map(move|(i, input)|{
|
||||||
let height = 1 + input.conn().len();
|
let height = 1 + input.conn().len();
|
||||||
|
|
@ -301,9 +299,7 @@ impl Tek {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn outputs_with_sizes (&self)
|
pub(crate) fn outputs_with_sizes (&self) -> impl PortsSizes<'_> {
|
||||||
-> impl PortsSizes<'_>
|
|
||||||
{
|
|
||||||
let mut y = 0;
|
let mut y = 0;
|
||||||
self.midi_outs.iter().enumerate().map(move|(i, output)|{
|
self.midi_outs.iter().enumerate().map(move|(i, output)|{
|
||||||
let height = 1 + output.conn().len();
|
let height = 1 + output.conn().len();
|
||||||
|
|
@ -313,9 +309,7 @@ impl Tek {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tracks_with_sizes (&self)
|
pub(crate) fn tracks_with_sizes (&self) -> impl TracksSizes<'_> {
|
||||||
-> impl TracksSizes<'_>
|
|
||||||
{
|
|
||||||
let mut x = 0;
|
let mut x = 0;
|
||||||
let editing = self.is_editing();
|
let editing = self.is_editing();
|
||||||
let active = match self.selected() {
|
let active = match self.selected() {
|
||||||
|
|
@ -352,13 +346,11 @@ impl Tek {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Define a type alias for iterators of sized items (columns).
|
/// Define a type alias for iterators of sized items (columns).
|
||||||
macro_rules! def_sizes_iter {
|
macro_rules! def_sizes_iter {
|
||||||
($Type:ident => $($Item:ty),+) => {
|
($Type:ident => $($Item:ty),+) => {
|
||||||
pub(crate) trait $Type<'a> =
|
pub(crate) trait $Type<'a> =
|
||||||
Iterator<Item=(usize, $(&'a $Item,)+ usize, usize)> + Send + Sync + 'a;}}
|
Iterator<Item=(usize, $(&'a $Item,)+ usize, usize)> + Send + Sync + 'a;}}
|
||||||
|
|
||||||
def_sizes_iter!(ScenesSizes => Scene);
|
def_sizes_iter!(ScenesSizes => Scene);
|
||||||
def_sizes_iter!(TracksSizes => Track);
|
def_sizes_iter!(TracksSizes => Track);
|
||||||
def_sizes_iter!(InputsSizes => JackMidiIn);
|
def_sizes_iter!(InputsSizes => JackMidiIn);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
(bsp/s (fixed/y 1 :transport)
|
(bsp/s (fixed/y 1 :transport)
|
||||||
(bsp/n (fixed/y 1 :status)
|
(bsp/n (fixed/y 1 :status)
|
||||||
(bsp/w (fixed/x :w-sidebar :pool)
|
(fill/xy (bsp/a
|
||||||
(fill/y :editor))))
|
(fill/xy (align/e :pool))
|
||||||
|
:editor))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue