pub struct VirtualizedTree { /* private fields */ }Expand description
Virtualized tree for large hierarchical datasets.
The component stores tree data and lightweight visible-node metadata only.
It never stores rendered GPUI elements across frames; rows are generated from
the flattened visible model inside GPUI’s virtual list callback.
Implementations§
Source§impl VirtualizedTree
impl VirtualizedTree
pub fn new(data: Vec<TreeNode>, _cx: &mut Context<'_, Self>) -> Self
pub fn entity(data: Vec<TreeNode>, cx: &mut App) -> Entity<Self>
pub fn height(self, height: impl Into<Pixels>) -> Self
pub fn row_height(self, height: impl Into<Pixels>) -> Self
pub fn indent(self, indent: impl Into<Pixels>) -> Self
pub fn overdraw(self, overdraw: impl Into<Pixels>) -> Self
pub fn multiple(self, multiple: bool) -> Self
pub fn show_checkbox(self, show: bool) -> Self
pub fn default_expanded_keys( self, keys: impl IntoIterator<Item = SharedString>, ) -> Self
pub fn default_selected_keys( self, keys: impl IntoIterator<Item = SharedString>, ) -> Self
pub fn expand_all(self) -> Self
pub fn on_node_click( self, callback: impl Fn(SharedString, &mut Window, &mut App) + 'static, ) -> Self
pub fn visible_len(&self) -> usize
pub fn is_expanded(&self, id: &SharedString) -> bool
pub fn is_selected(&self, id: &SharedString) -> bool
pub fn list_state(&self) -> ListState
Trait Implementations§
Source§impl Render for VirtualizedTree
impl Render for VirtualizedTree
Auto Trait Implementations§
impl !RefUnwindSafe for VirtualizedTree
impl !Send for VirtualizedTree
impl !Sync for VirtualizedTree
impl !UnwindSafe for VirtualizedTree
impl Freeze for VirtualizedTree
impl Unpin for VirtualizedTree
impl UnsafeUnpin for VirtualizedTree
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> 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>
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