diff --git a/nested/src/tree/node.rs b/nested/src/tree/node.rs index 4e67186..f4b3ca3 100644 --- a/nested/src/tree/node.rs +++ b/nested/src/tree/node.rs @@ -15,6 +15,57 @@ use { } }; +/* TODO: refactoring proposal + +struct NestedNodeDisplay { + /// display view + pub view: Option< OuterViewPort >, + + /// diagnostics + pub diag: Option< OuterViewPort> >, + + /// depth + pub depth: SingletonBuffer< usize >, +} + +struct NestedNodeEdit { + /// abstract editor + pub editor: SingletonBuffer< + Option< Arc > +>, + + pub spill_buf: VecBuffer< NestedNode >, + + /// commander & navigation + pub cmd: SingletonBuffer< + Option< Arc> > + >, + pub close_char: SingletonBuffer< + Option< char > + >, + + // could be replaced by cmd when TreeNav -CmdObjects are used + pub tree_nav: SingletonBuffer< + Option< Arc> > + >, +} + +pub struct NewNestedNode { + /// context + pub ctx: Arc>, + + /// abstract data view + pub data: Arc>, + + /// viewports for terminal display + pub disp: NestedNodeDisplay, + + /// editor & commander objects + pub edit: NestedNodeEdit +} + +*/ + #[derive(Clone)] pub struct NestedNode { /// context @@ -158,9 +209,7 @@ impl NestedNode { self.get_data_port::(type_str)?.get_view() } - /* TODO - pub fn get_seq_view<'a, T: Clone>(&self, type_str: impl Iterator) -> Option>> { self.get_data_view::>(type_str) .unwrap()