pub enum Spot {
Heading(Order),
Row {
id: NodeId,
zone: Zone,
},
Tree,
Help,
Answer(Answer),
Confirm,
Prompt,
Outside,
Notice,
Nowhere,
}Expand description
What is under the pointer, on the frame that was drawn.
The routing chain the keymap states for keys — overlay first, then the tree, then the
globals — falls out of resolving this geometrically rather than being re-implemented:
an overlay covers the screen it is over, so a press inside one cannot also be a press on
the tree, and one outside is the dismissal. super::keymap::pointer turns a spot and a
gesture into an action; nothing else has to know the order.
Variants§
Heading(Order)
A column heading, over the column that orders a level by this key.
Row
A tree row, named by the directory on it rather than by its position.
The identity rule this whole model turns on. Rows re-sort as prices land and vanish
as removals complete, so a row index resolved at the press and acted on at the release
names a different directory — and the action on the other end of it deletes one. A
NodeId is not that index: crate::tree::Tree only ever pushes a new slot and
never recycles a detached one, so an id names one directory for the life of the run,
and a press on a row that has since been removed resolves to a row that is no longer
on screen and does nothing at all.
Tree
The tree pane, past the end of its rows.
Help
Inside the help overlay.
Answer(Answer)
On one of a confirmation’s two answers.
Confirm
Inside a confirmation, and not on either answer.
The question, the consequence and the padding around them are things to read rather
than things to press, so landing near an answer is a miss and does nothing. What
guards the irreversible press is the gesture — down and up in the same button — rather
than the absence of a target; see super::keymap::finish.
Prompt
Inside the filter prompt.
Outside
Outside the overlay that is up — where a press dismisses it.
Notice
The footer, while it is saying what just happened — where a press dismisses that.
Under the overlays and never over the tree, which is the whole of why it is safe: the footer is a line of its own, so a press that lands on a stale report cannot also be a press on a row, and no gesture aimed at a sentence can mark a subtree behind it.
Nowhere
Chrome, or a frame with nothing on it: the header line, and a footer with only the keys on it.
Trait Implementations§
impl Copy for Spot
impl Eq for Spot
impl StructuralPartialEq for Spot
Auto Trait Implementations§
impl Freeze for Spot
impl RefUnwindSafe for Spot
impl Send for Spot
impl Sync for Spot
impl Unpin for Spot
impl UnsafeUnpin for Spot
impl UnwindSafe for Spot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more