lib-nested-tty: reactivate list-cursor widget via new TreeNavExt trait
This commit is contained in:
parent
e09f3e5656
commit
fe4b571b8c
2 changed files with 24 additions and 3 deletions
|
@ -1,5 +1,27 @@
|
|||
use {
|
||||
r3vi::{
|
||||
view::{
|
||||
OuterViewPort
|
||||
},
|
||||
buffer::vec::*,
|
||||
projection::decorate_sequence::Separate
|
||||
},
|
||||
nested::{
|
||||
edit_tree::{
|
||||
TreeNav
|
||||
},
|
||||
editors::list::{
|
||||
ListCursorMode
|
||||
}
|
||||
},
|
||||
crate::{TerminalView, make_label, TerminalProjections}
|
||||
};
|
||||
|
||||
impl TreeNav {
|
||||
pub trait TreeNavExt {
|
||||
fn get_cursor_widget(&self) -> OuterViewPort<dyn TerminalView>;
|
||||
}
|
||||
|
||||
impl<T: TreeNav> TreeNavExt for T {
|
||||
fn get_cursor_widget(&self) -> OuterViewPort<dyn TerminalView> {
|
||||
VecBuffer::with_data(
|
||||
vec![
|
||||
|
@ -30,4 +52,3 @@ impl TreeNav {
|
|||
.flatten()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
pub mod color;
|
||||
pub mod keymap;
|
||||
|
||||
pub mod cursor_widget;
|
||||
|
|
Loading…
Reference in a new issue