wip: cursor gravity mode
This commit is contained in:
parent
689ac95486
commit
6931813a39
2 changed files with 9 additions and 2 deletions
|
@ -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)]
|
#[derive(Clone, Eq, PartialEq, Debug)]
|
||||||
pub struct TreeCursor {
|
pub struct TreeCursor {
|
||||||
pub leaf_mode: ListCursorMode,
|
pub leaf_mode: ListCursorMode,
|
||||||
|
|
|
@ -17,14 +17,13 @@ use {
|
||||||
|
|
||||||
pub struct ListEditor {
|
pub struct ListEditor {
|
||||||
pub cursor: SingletonBuffer<ListCursor>,
|
pub cursor: SingletonBuffer<ListCursor>,
|
||||||
|
|
||||||
// todo: (?) remove RwLock<..> around NestedNode ??
|
|
||||||
pub data: VecBuffer< Arc<RwLock<EditTree>> >,
|
pub data: VecBuffer< Arc<RwLock<EditTree>> >,
|
||||||
|
|
||||||
pub spillbuf: Arc<RwLock<Vec<Arc<RwLock<EditTree>>>>>,
|
pub spillbuf: Arc<RwLock<Vec<Arc<RwLock<EditTree>>>>>,
|
||||||
|
|
||||||
pub(super) addr_port: OuterViewPort<dyn SequenceView<Item = isize>>,
|
pub(super) addr_port: OuterViewPort<dyn SequenceView<Item = isize>>,
|
||||||
pub(super) mode_port: OuterViewPort<dyn SingletonView<Item = ListCursorMode>>,
|
pub(super) mode_port: OuterViewPort<dyn SingletonView<Item = ListCursorMode>>,
|
||||||
|
// pub(super) grav_port: OuterViewPort<dyn SingletonView<Item = isize>>,
|
||||||
|
|
||||||
depth: OuterViewPort<dyn SingletonView<Item = usize>>,
|
depth: OuterViewPort<dyn SingletonView<Item = usize>>,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue