Skip to main content

Spot

Enum Spot 

Source
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.

Fields

§id: NodeId

Which directory.

§zone: Zone

Which part of its row.

§

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§

Source§

impl Clone for Spot

Source§

fn clone(&self) -> Spot

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Spot

Source§

impl Debug for Spot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Spot

Source§

impl PartialEq for Spot

Source§

fn eq(&self, other: &Spot) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.