use crate::{
impl_as_any, impl_cast, keymap::KeymapManager, listbox, pane::Pane, snapshot::Snapshot, text,
text_editor,
};
pub struct Renderer {
pub keymap: KeymapManager<Self>,
pub title_snapshot: Snapshot<text::Renderer>,
pub text_editor_snapshot: Snapshot<text_editor::Renderer>,
pub listbox_snapshot: Snapshot<listbox::Renderer>,
}
impl_as_any!(Renderer);
impl_cast!(Renderer);
impl crate::Renderer for Renderer {
fn create_panes(&self, width: u16) -> Vec<Pane> {
let mut panes = Vec::new();
panes.extend(self.title_snapshot.create_panes(width));
panes.extend(self.text_editor_snapshot.create_panes(width));
panes.extend(self.listbox_snapshot.create_panes(width));
panes
}
}