pub struct TreeListViewState<Id> { /* private fields */ }Expand description
Состояние виджета: развёрнутые узлы, выделение, кеши видимости и меток.
Implementations§
Source§impl<Id: Copy + Eq + Hash> TreeListViewState<Id>
impl<Id: Copy + Eq + Hash> TreeListViewState<Id>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn snapshot(&self) -> TreeListViewSnapshot<Id>
pub fn restore(&mut self, snapshot: TreeListViewSnapshot<Id>)
pub const fn draw_lines(&self) -> bool
pub const fn set_draw_lines(&mut self, draw: bool)
pub const fn invalidate(&mut self)
pub const fn invalidate_all(&mut self)
pub const fn select_first(&mut self)
pub const fn select_last(&mut self)
pub fn scroll_down_by(&mut self, amount: u16)
pub fn scroll_up_by(&mut self, amount: u16)
pub fn select_prev(&mut self)
pub fn select_next(&mut self)
pub fn ensure_selection_visible(&mut self, viewport_height: usize)
pub fn ensure_selection_visible_with_policy( &mut self, viewport_height: usize, policy: TreeScrollPolicy, )
pub fn selected_id(&self) -> Option<Id>
pub fn selected_parent_id(&self) -> Option<Id>
pub const fn visible_len(&self) -> usize
pub fn selected_level(&self) -> Option<u16>
pub fn selected_is_expanded<T: TreeModel<Id = Id>>( &self, model: &T, ) -> Option<bool>
pub fn select_by_id<T: TreeModel<Id = Id>>(&mut self, model: &T, id: Id) -> bool
pub fn ensure_visible_id<T: TreeModel<Id = Id>>( &mut self, model: &T, id: Id, ) -> bool
pub fn expand_to<T: TreeModel<Id = Id>>(&mut self, model: &T, id: Id) -> bool
pub fn expand_all<T: TreeModel<Id = Id>>(&mut self, model: &T)
pub fn collapse_all(&mut self)
pub fn ensure_visible_nodes<T: TreeModel<Id = Id>>(&mut self, model: &T)
pub fn ensure_visible_nodes_filtered<T, F>(
&mut self,
model: &T,
filter: &F,
config: TreeFilterConfig,
)where
T: TreeModel<Id = Id>,
F: TreeFilter<T>,
pub fn ensure_mark_cache<T: TreeModel<Id = Id>>(&mut self, model: &T)
pub fn node_is_marked(&self, node_id: Id) -> bool
pub fn prune_removed_marks<T: TreeModel<Id = Id>>(&mut self, model: &T)
pub fn handle_action<T: TreeModel<Id = Id>, C>( &mut self, model: &T, action: TreeAction<C>, ) -> TreeEvent<C>
pub fn handle_action_filtered<T, F, C>(
&mut self,
model: &T,
filter: &F,
config: TreeFilterConfig,
action: TreeAction<C>,
) -> TreeEvent<C>where
T: TreeModel<Id = Id>,
F: TreeFilter<T>,
pub fn toggle(&mut self, node_id: Id, parent: Option<Id>)
pub fn set_expanded(&mut self, node_id: Id, parent: Option<Id>, expand: bool)
Trait Implementations§
Auto Trait Implementations§
impl<Id> Freeze for TreeListViewState<Id>
impl<Id> RefUnwindSafe for TreeListViewState<Id>where
Id: RefUnwindSafe,
impl<Id> Send for TreeListViewState<Id>where
Id: Send,
impl<Id> Sync for TreeListViewState<Id>where
Id: Sync,
impl<Id> Unpin for TreeListViewState<Id>where
Id: Unpin,
impl<Id> UnwindSafe for TreeListViewState<Id>where
Id: UnwindSafe,
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