pub struct BookmarkNav { /* private fields */ }Expand description
Keyboard cursor and selection state for one bookmarks view. Lives on the
Pane so it survives the row rebuilds that happen on every list change, and
is shared with the list’s key controller. The focused/selected row mirrors
the tree’s cursor, so launching the panel hands the keyboard straight to the
first bookmark.
Implementations§
pub fn new(list: &Box) -> Rc<Self>
Sourcepub fn focus_start(&self)
pub fn focus_start(&self)
Focus the first bookmark, or the cursor if it is already placed. Used when the panel is launched or shown so the keyboard works immediately.
Whether key is a navigation key the bookmarks list consumes. Mirrors
the widget’s own key controller, for the IPC --key path.
Handle a bookmarks navigation key from outside the widget (the IPC
--key command). Up/Down/Home/End move the cursor; Left/Right on a
folder returns the entry to expand/collapse, which the caller must
rebuild via a BookmarkEvent::Toggle. Returns None otherwise.
Sourcepub fn activate(&self) -> Option<BookmarkEvent>
pub fn activate(&self) -> Option<BookmarkEvent>
The event to fire for the row under the cursor when it is activated
(Enter/Space): expand/collapse a folder, or open a leaf’s directory.
Mirrors what a click on the row does. Used by the IPC --key command.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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