wip: cursor gravity mode

This commit is contained in:
Michael Sippel 2024-10-27 13:35:31 +01:00
parent 689ac95486
commit 6931813a39
Signed by: senvas
GPG key ID: F96CF119C34B64A6
2 changed files with 9 additions and 2 deletions

View file

@ -4,6 +4,14 @@ use {
//<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>
enum GravityMode {
// tries to maintain a set distance from bottom
Gravity(usize),
// keeps equal distance from root
Floating
}
#[derive(Clone, Eq, PartialEq, Debug)]
pub struct TreeCursor {
pub leaf_mode: ListCursorMode,

View file

@ -17,14 +17,13 @@ use {
pub struct ListEditor {
pub cursor: SingletonBuffer<ListCursor>,
// todo: (?) remove RwLock<..> around NestedNode ??
pub data: VecBuffer< Arc<RwLock<EditTree>> >,
pub spillbuf: Arc<RwLock<Vec<Arc<RwLock<EditTree>>>>>,
pub(super) addr_port: OuterViewPort<dyn SequenceView<Item = isize>>,
pub(super) mode_port: OuterViewPort<dyn SingletonView<Item = ListCursorMode>>,
// pub(super) grav_port: OuterViewPort<dyn SingletonView<Item = isize>>,
depth: OuterViewPort<dyn SingletonView<Item = usize>>,