pub struct TreePanel { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Panel for TreePanel
impl Panel for TreePanel
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Stable type name, used for registry lookup and session records.
fn render(&mut self, area: Rect, buf: &mut Buffer, ctx: &RenderContext<'_>)
fn handle_key(&mut self, chord: KeyChord) -> Vec<PanelEvent>
Source§fn handle_mouse(
&mut self,
event: MouseEvent,
panel_area: Rect,
) -> Vec<PanelEvent>
fn handle_mouse( &mut self, event: MouseEvent, panel_area: Rect, ) -> Vec<PanelEvent>
panel_area is supplied so the panel can translate to local coordinates.Source§fn handle_scroll(&mut self, delta: i32, _panel_area: Rect) -> Vec<PanelEvent>
fn handle_scroll(&mut self, delta: i32, _panel_area: Rect) -> Vec<PanelEvent>
Coalesced scroll. Positive is down.
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn cursor_position(&self, panel_area: Rect) -> Option<(u16, u16)>
fn cursor_position(&self, panel_area: Rect) -> Option<(u16, u16)>
Where the terminal cursor belongs, in screen coordinates, when this
panel holds focus.
None hides it. Read moreSource§fn apply_action(&mut self, action: Action) -> Option<Vec<PanelEvent>>
fn apply_action(&mut self, action: Action) -> Option<Vec<PanelEvent>>
Perform a named action. Read more
Source§fn tick(&mut self) -> Vec<PanelEvent>
fn tick(&mut self) -> Vec<PanelEvent>
Periodic hook for background work.
Source§fn captures_escape(&self) -> bool
fn captures_escape(&self) -> bool
True when the panel consumes Escape itself (e.g. an open search box).
Source§fn needs_close_confirmation(&self) -> Option<String>
fn needs_close_confirmation(&self) -> Option<String>
Some(message) blocks closing until confirmed.Auto Trait Implementations§
impl Freeze for TreePanel
impl RefUnwindSafe for TreePanel
impl Send for TreePanel
impl Sync for TreePanel
impl Unpin for TreePanel
impl UnsafeUnpin for TreePanel
impl UnwindSafe for TreePanel
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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