Struct TreeViewNodeProps
pub struct TreeViewNodeProps {
pub item: ResourceId,
pub label: String,
pub parent: Option<ResourceId>,
pub above: Option<ResourceId>,
pub branch: bool,
pub row: Option<TreeViewRowProps>,
pub progress: Option<String>,
pub selected: bool,
pub drop: Event,
pub into: Event,
pub check: Event,
pub menu: Vec<MenuItemProps>,
}Expand description
One node of a tree: its label, the resource it stands for, and where it stands.
Fields§
§item: ResourceIdThe resource the node stands for: its stable key, what selecting or activating it reports, and what its children name as their parent.
label: StringWhat the row is called.
parent: Option<ResourceId>The resource of the node it stands under; without one it is a top-level node.
above: Option<ResourceId>The node the view shows just over this one under the same parent: the place the actions
offered on it take when one reads a place (above). None for a first child.
branch: boolWhether it opens to show the nodes under it. A node with children says so unless it says otherwise.
row: Option<TreeViewRowProps>What the row shows besides its label.
progress: Option<String>How far the branch got while it is folded (“1/3”), which the owner counts of its own
children: the same count names a list row and an outline node, so both say one thing.
The row’s own TreeViewRowProps::progress says it instead where the row gives one.
selected: boolWhether it is the selected node.
drop: EventA node was dropped just before this one, or moved here by the keyboard: carries the node that moved, so the owner places it before this one under the same parent.
into: EventA node was dropped inside this one, at the end of its children, or indented here by the keyboard: carries the node that moved.
check: EventThis node’s checkbox was pressed: the owner toggles what the box stands for.
The commands of its context menu: a right-click, the Menu key or a long press opens it, so every action a row has stays reachable without a drag.
Trait Implementations§
§impl Component for TreeViewNodeProps
impl Component for TreeViewNodeProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<TreeViewNodeProps, Error>
fn from_source(source: &mut dyn Source) -> Result<TreeViewNodeProps, Error>
source gives. Read more§impl Default for TreeViewNodeProps
impl Default for TreeViewNodeProps
§fn default() -> TreeViewNodeProps
fn default() -> TreeViewNodeProps
Auto Trait Implementations§
impl Freeze for TreeViewNodeProps
impl !RefUnwindSafe for TreeViewNodeProps
impl !Send for TreeViewNodeProps
impl !Sync for TreeViewNodeProps
impl Unpin for TreeViewNodeProps
impl UnsafeUnpin for TreeViewNodeProps
impl !UnwindSafe for TreeViewNodeProps
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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