pub struct TreePopup<'a> { /* private fields */ }Expand description
Popup que envuelve un Tree para mostrar una jerarquía expandible.
Compone un Popup (chrome) con un Tree (árbol).
Hereda la configuración del Tree a través de builders delegados.
Implementations§
Source§impl<'a> TreePopup<'a>
impl<'a> TreePopup<'a>
pub fn new(nodes: Vec<TreeNode<'a>>) -> Self
pub fn title(self, title: &'a str) -> Self
pub fn cursor_style(self, style: Style) -> Self
pub fn border_color(self, color: Color) -> Self
pub fn border_type(self, bt: BorderType) -> Self
pub fn bg_color(self, color: Color) -> Self
pub fn width(self, w: PopupSize) -> Self
pub fn height(self, h: PopupSize) -> Self
pub fn position(self, x: u16, y: u16) -> Self
pub fn origin(self, x: u16, y: u16) -> Self
pub fn header(self) -> Self
pub fn padding(self, p: u16) -> Self
pub fn indent(self, n: u16) -> Self
pub fn expand_icon(self, icon: &'a str) -> Self
pub fn collapse_icon(self, icon: &'a str) -> Self
pub fn leaf_icon(self, icon: &'a str) -> Self
pub fn highlight_style(self, style: Style) -> Self
pub fn highlight_symbol(self, symbol: &'a str) -> Self
pub fn borders(self, borders: Borders) -> Self
pub fn border_style(self, style: Style) -> Self
pub fn no_background(self) -> Self
pub fn background_dots(self, color: Color, symbol: &str, density: u16) -> Self
pub fn background_pattern(self, pattern: DotPattern) -> Self
pub fn background_spacing(self, density_x: u16, density_y: u16) -> Self
pub fn badges(self, badges: BadgeStack<'a>) -> Self
Source§impl<'a> TreePopup<'a>
impl<'a> TreePopup<'a>
Sourcepub fn item_at(
&self,
state: &TreeState,
popup_rect: Rect,
row: u16,
) -> Option<usize>
pub fn item_at( &self, state: &TreeState, popup_rect: Rect, row: u16, ) -> Option<usize>
Map a screen row to the flat visible item index at that position.
Returns None if the row is in the border/header area or beyond the
last visible item.
Sourcepub fn resolve_rect(&self, area: Rect, state: &TreeState) -> Rect
pub fn resolve_rect(&self, area: Rect, state: &TreeState) -> Rect
Resolves the final Rect for this popup within the given area,
using the current tree state for Auto-height resolution.
Trait Implementations§
Source§impl StatefulWidget for TreePopup<'_>
impl StatefulWidget for TreePopup<'_>
Auto Trait Implementations§
impl<'a> Freeze for TreePopup<'a>
impl<'a> RefUnwindSafe for TreePopup<'a>
impl<'a> Send for TreePopup<'a>
impl<'a> Sync for TreePopup<'a>
impl<'a> Unpin for TreePopup<'a>
impl<'a> UnsafeUnpin for TreePopup<'a>
impl<'a> UnwindSafe for TreePopup<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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