pub struct Placed {
pub columns: Option<Columns>,
pub heading: Option<Rect>,
pub rows: Rect,
pub map: Option<Rect>,
pub notice: Option<Rect>,
pub scroll: usize,
pub overlay: Option<Rect>,
pub answers: Option<[Rect; 2]>,
}Expand description
Where the last frame put everything a pointer can aim at.
Read back from the layout draw produced rather than described a second time. A
hard-coded row-to-y map would be one line out the first time the header or the heading
changed height, and being one line out here presses a row nobody chose — on a screen whose
keys delete directories.
Default is a frame that was never drawn, on which every press resolves to
Spot::Nowhere. That is the honest answer for the first mouse event of a run and for a
test that has not painted: a synthetic geometry would be a second layout, which is the
thing this type exists to avoid.
Fields§
§columns: Option<Columns>The tree’s columns, or None on a frame that drew no tree.
heading: Option<Rect>The heading line, when the pane was tall enough to spend a row on one.
rows: RectThe body rows.
map: Option<Rect>Where the treemap’s image goes, when the pane is up. None is a frame with no map on
it, which is every frame in a terminal that cannot draw one.
notice: Option<Rect>The footer, on a frame where it was saying what just happened. None whenever there is
nothing to dismiss — which is what keeps a press on the ordinary footer a miss.
The whole line, though a notice no longer has the whole line to itself: a removal’s position and the session’s freed total share it. Both are figures rather than buttons, so a press that lands on one has nothing of its own to do, and giving it the dismissal beats making a reader aim at a sentence whose length they did not choose.
scroll: usizeWhich row of the tree the top drawn row held.
Recorded rather than re-read from the view, so a press maps y to a row through the
offset the rows were drawn at — a sync between the frame and the press would
otherwise shift every row by the difference.
overlay: Option<Rect>The topmost overlay’s box, in the ranking super::state::View::overlay uses. One
slot, because a press lands on one thing.
answers: Option<[Rect; 2]>A confirmation’s two answers, in Answer::ALL order, where they were drawn.
Inside overlay and checked first. None whenever no question was
on the frame — which is what a press made before the box appeared lands on, and is
the whole of what stops such a press from answering one. See
super::keymap::finish.
Trait Implementations§
impl Copy for Placed
impl Eq for Placed
impl StructuralPartialEq for Placed
Auto Trait Implementations§
impl Freeze for Placed
impl RefUnwindSafe for Placed
impl Send for Placed
impl Sync for Placed
impl Unpin for Placed
impl UnsafeUnpin for Placed
impl UnwindSafe for Placed
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