pub enum IndentGuides {
Never,
OnHover,
Always,
}Expand description
When a hand-built tree draws its indent guides: a thin line down each
nesting level, as VS Code’s explorer does (renderIndentGuides).
Never by default, so that a tree looks as it always did.
Need (data): a tree of places whose levels are easy to follow (folders nested deep).
Variants§
Never
No guides.
OnHover
Guides only while the pointer is over the tree (VS Code’s
onHover).
Always
Guides all the time.
Implementations§
Source§impl IndentGuides
impl IndentGuides
Sourcepub fn paint(
self,
ui: &Ui,
area: Rect,
rows: &[GuideRow],
highlight: bool,
) -> bool
pub fn paint( self, ui: &Ui, area: Rect, rows: &[GuideRow], highlight: bool, ) -> bool
Paints the guides of rows (in the order drawn, one tree) when
this mode says so, area the tree’s whole room (the pointer over
it shows the guides in IndentGuides::OnHover). The guide of
level k runs down every row deeper than k, through the centre
of the disclosure column of its ancestor at level k (one
spacing.indent per level), unbroken across the gaps between
rows. With highlight, the guide of the hovered row’s parent (the
run of its siblings) is drawn in the kit’s list-guide hover
state, the others at rest. Says whether any guide was drawn.
Trait Implementations§
Source§impl Clone for IndentGuides
impl Clone for IndentGuides
Source§fn clone(&self) -> IndentGuides
fn clone(&self) -> IndentGuides
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndentGuides
impl Debug for IndentGuides
Source§impl Default for IndentGuides
impl Default for IndentGuides
Source§fn default() -> IndentGuides
fn default() -> IndentGuides
Source§impl Hash for IndentGuides
impl Hash for IndentGuides
Source§impl PartialEq for IndentGuides
impl PartialEq for IndentGuides
impl Copy for IndentGuides
impl Eq for IndentGuides
impl StructuralPartialEq for IndentGuides
Auto Trait Implementations§
impl Freeze for IndentGuides
impl RefUnwindSafe for IndentGuides
impl Send for IndentGuides
impl Sync for IndentGuides
impl Unpin for IndentGuides
impl UnsafeUnpin for IndentGuides
impl UnwindSafe for IndentGuides
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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