wip: refactor pt.30: 74 errors

This commit is contained in:
🪞👃🪞 2024-11-14 22:34:44 +01:00
parent ab85a86b6b
commit 28e15d3f56
12 changed files with 631 additions and 622 deletions

View file

@ -35,21 +35,21 @@ submod! {
pub struct AppView<E, A, C, S>
where
E: Engine,
A: Widget<Engine = E> + Handle<E> + Audio,
C: Command<A>,
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, A, C>>,
pub menu_bar: Option<MenuBar<E, Self, C>>,
pub status_bar: Option<S>,
pub history: Vec<C>,
pub size: Measure<E>,
}
#[derive(Debug, Copy, Clone)]
pub enum AppViewCommand<T: Debug + Copy + Clone> {
#[derive(Debug, Clone)]
pub enum AppViewCommand<T: Debug + Clone> {
Focus(FocusCommand),
Undo,
Redo,
@ -65,13 +65,13 @@ pub enum AppViewFocus<F: Debug + Copy + Clone + PartialEq> {
impl<E, A, C, S> AppView<E, A, C, S>
where
E: Engine,
A: Widget<Engine = E> + Handle<E> + Audio,
C: Command<A>,
A: Widget<Engine = E> + Audio,
C: Command<Self>,
S: StatusBar
{
pub fn new (
app: A,
menu_bar: Option<MenuBar<E, A, C>>,
menu_bar: Option<MenuBar<E, Self, C>>,
status_bar: Option<S>,
) -> Self {
Self {
@ -88,8 +88,8 @@ where
impl<A, C, S> Content for AppView<Tui, A, C, S>
where
A: Widget<Engine = Tui> + Handle<Tui> + Audio,
C: Command<A>,
A: Widget<Engine = Tui> + Audio,
C: Command<Self>,
S: StatusBar,
{
type Engine = Tui;