use crate::*; #[derive(Debug, Copy, Clone)] pub enum AppContainerCommand { Focus(FocusCommand), App(T) } #[derive(Debug, Copy, Clone, PartialEq)] pub enum AppContainerFocus { Menu, Content(F), } impl FocusGrid for AppContainer where T: Send + Sync, C: Command, U: From>> + Widget + Handle + FocusGrid, A: From>> + Audio, S: From>> + StatusBar { type Item = AppContainerFocus<::Item>; fn cursor (&self) -> (usize, usize) { self.cursor } fn cursor_mut (&mut self) -> &mut (usize, usize) { &mut self.cursor } fn focus_enter (&mut self) { let focused = self.focused(); if !self.entered { self.entered = true; // TODO } } fn focus_exit (&mut self) { if self.entered { self.entered = false; // TODO } } fn entered (&self) -> Option { if self.entered { Some(self.focused()) } else { None } } fn layout (&self) -> &[&[Self::Item]] { &[ &[AppContainerFocus::Menu], FocusGrid::layout(&self.ui) //&[AppContainerFocus::Content(())], ] } fn update_focus (&mut self) { // TODO } }