mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: p.44, e=135, removing E generic
This commit is contained in:
parent
a7998860b1
commit
260736f31d
20 changed files with 848 additions and 838 deletions
|
|
@ -15,6 +15,7 @@ submod! {
|
|||
tui_arranger
|
||||
tui_arranger_cmd
|
||||
tui_arranger_focus
|
||||
tui_arranger_jack
|
||||
tui_arranger_scene
|
||||
tui_arranger_select
|
||||
tui_arranger_status
|
||||
|
|
@ -29,6 +30,7 @@ submod! {
|
|||
//tui_plugin_vst2
|
||||
//tui_plugin_vst3
|
||||
tui_pool
|
||||
tui_pool_view
|
||||
//tui_sampler // TODO
|
||||
//tui_sampler_cmd
|
||||
tui_sequencer
|
||||
|
|
@ -37,61 +39,61 @@ submod! {
|
|||
tui_theme
|
||||
tui_transport
|
||||
tui_transport_cmd
|
||||
tui_transport_focus
|
||||
tui_transport_jack
|
||||
tui_transport_view
|
||||
}
|
||||
|
||||
pub struct AppView<E, A, C, S>
|
||||
where
|
||||
E: Engine,
|
||||
A: Widget<Engine = E> + Audio,
|
||||
C: Command<Self>,
|
||||
S: StatusBar,
|
||||
{
|
||||
pub app: A,
|
||||
pub cursor: (usize, usize),
|
||||
pub entered: bool,
|
||||
pub menu_bar: Option<MenuBar<E, Self, C>>,
|
||||
pub status_bar: Option<S>,
|
||||
pub history: Vec<C>,
|
||||
pub size: Measure<E>,
|
||||
}
|
||||
//pub struct AppView<E, A, C, S>
|
||||
//where
|
||||
//E: Engine,
|
||||
//A: Widget<Engine = E> + Audio,
|
||||
//C: Command<Self>,
|
||||
//S: StatusBar,
|
||||
//{
|
||||
//pub app: A,
|
||||
//pub cursor: (usize, usize),
|
||||
//pub entered: bool,
|
||||
//pub menu_bar: Option<MenuBar<E, Self, C>>,
|
||||
//pub status_bar: Option<S>,
|
||||
//pub history: Vec<C>,
|
||||
//pub size: Measure<E>,
|
||||
//}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AppViewCommand<T: Debug + Clone> {
|
||||
Focus(FocusCommand),
|
||||
Undo,
|
||||
Redo,
|
||||
App(T)
|
||||
}
|
||||
//#[derive(Debug, Clone)]
|
||||
//pub enum AppViewCommand<T: Debug + Clone> {
|
||||
//App(T)
|
||||
//}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub enum AppViewFocus<F: Debug + Copy + Clone + PartialEq> {
|
||||
Menu,
|
||||
Content(F),
|
||||
}
|
||||
//#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
//pub enum AppViewFocus<F: Debug + Copy + Clone + PartialEq> {
|
||||
//Menu,
|
||||
//Content(F),
|
||||
//}
|
||||
|
||||
impl<E, A, C, S> AppView<E, A, C, S>
|
||||
where
|
||||
E: Engine,
|
||||
A: Widget<Engine = E> + Audio,
|
||||
C: Command<Self>,
|
||||
S: StatusBar
|
||||
{
|
||||
pub fn new (
|
||||
app: A,
|
||||
menu_bar: Option<MenuBar<E, Self, C>>,
|
||||
status_bar: Option<S>,
|
||||
) -> Self {
|
||||
Self {
|
||||
app,
|
||||
cursor: (0, 0),
|
||||
entered: false,
|
||||
history: vec![],
|
||||
size: Measure::new(),
|
||||
menu_bar,
|
||||
status_bar,
|
||||
}
|
||||
}
|
||||
}
|
||||
//impl<E, A, C, S> AppView<E, A, C, S>
|
||||
//where
|
||||
//E: Engine,
|
||||
//A: Widget<Engine = E> + Audio,
|
||||
//C: Command<Self>,
|
||||
//S: StatusBar
|
||||
//{
|
||||
//pub fn new (
|
||||
//app: A,
|
||||
//menu_bar: Option<MenuBar<E, Self, C>>,
|
||||
//status_bar: Option<S>,
|
||||
//) -> Self {
|
||||
//Self {
|
||||
//app,
|
||||
//cursor: (0, 0),
|
||||
//entered: false,
|
||||
//history: vec![],
|
||||
//size: Measure::new(),
|
||||
//menu_bar,
|
||||
//status_bar,
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
impl<A, C, S> Content for AppView<Tui, A, C, S>
|
||||
where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue