TreeViewSettings

Struct TreeViewSettings 

Source
pub struct TreeViewSettings {
    pub override_indent: Option<f32>,
    pub override_striped: Option<bool>,
    pub indent_hint_style: IndentHintStyle,
    pub row_layout: RowLayout,
    pub min_width: f32,
    pub min_height: f32,
    pub allow_multi_select: bool,
    pub range_selection_modifier: Modifiers,
    pub set_selection_modifier: Modifiers,
    pub allow_drag_and_drop: bool,
    pub default_node_height: Option<f32>,
}
Expand description

The global settings the tree view will use.

Fields§

§override_indent: Option<f32>

Override the indent value for the tree view.

By default, this value is ‘None’ which means that the indent value from the current UI is used. If this value is set, this value will be used as the indent value without affecting the ui’s indent value.

§override_striped: Option<bool>

Override whether or not the background of the nodes should striped.

By default, this value is ‘None’ which means that the striped setting from the current UI style is used. If this value is set, it will be used without affecting the ui’s value.

§indent_hint_style: IndentHintStyle

The style of the indent hint to show the indentation level.

§row_layout: RowLayout

The row layout for this tree.

§min_width: f32

The minimum width the tree can have.

§min_height: f32

The minimum height the tree can have.

§allow_multi_select: bool

If the tree view is allowed to select multiple nodes at once. Default is true.

§range_selection_modifier: Modifiers

Specifies the modifier that the user is require to press for a range based multi selection. A range based selection selects all nodes between the selected node and a previously selected pivot node. Default is egui::Modifiers::SHIFT

§set_selection_modifier: Modifiers

Specified the modifier that the user is required to press for a set based multi selection. A set based selection adds/removes the selected node to/from the multi selection. Default is egui::Modifiers::COMMAND

§allow_drag_and_drop: bool

If the nodes in the tree view are allowed to be dragged and dropped. Default is true.

§default_node_height: Option<f32>

The default height of a node. If none is set the default height will be interact_size.y from egui::style::Spacing.

Trait Implementations§

Source§

impl Clone for TreeViewSettings

Source§

fn clone(&self) -> TreeViewSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TreeViewSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TreeViewSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,