Skip to main content

TreeView

Struct TreeView 

Source
pub struct TreeView(/* private fields */);

Implementations§

Source§

impl TreeView

Source

pub fn new() -> Result<Self, PlatformError>

Source

pub fn get_activation_mode(&self) -> ActivationMode

Source

pub fn set_activation_mode(&self, value: ActivationMode)

Source

pub fn get_background_color(&self) -> Color

Source

pub fn set_background_color(&self, value: Color)

Source

pub fn get_branch_indicator_color(&self) -> Color

Source

pub fn set_branch_indicator_color(&self, value: Color)

Source

pub fn get_branch_indicator_width(&self) -> Coord

Source

pub fn set_branch_indicator_width(&self, value: Coord)

Source

pub fn get_branch_line_color(&self) -> Color

Source

pub fn set_branch_line_color(&self, value: Color)

Source

pub fn invoke_clear_focus(&self)

Source

pub fn get_collapsed_branch_indicator(&self) -> SharedString

Source

pub fn set_collapsed_branch_indicator(&self, value: SharedString)

Source

pub fn invoke_current_changed(&self, arg_0: i32)

Source

pub fn on_current_changed(&self, f: impl FnMut(i32) + 'static)

Source

pub fn get_current_index(&self) -> i32

Source

pub fn set_current_index(&self, value: i32)

Source

pub fn get_current_internal_id(&self) -> i32

Source

pub fn invoke_current_parent_change_requested(&self, arg_0: i32, arg_1: i32)

Source

pub fn on_current_parent_change_requested( &self, f: impl FnMut(i32, i32) + 'static, )

Source

pub fn invoke_custom_context_menu_requested( &self, arg_0: i32, arg_1: Coord, arg_2: Coord, )

Source

pub fn on_custom_context_menu_requested( &self, f: impl FnMut(i32, Coord, Coord) + 'static, )

Source

pub fn get_decoration_spacing(&self) -> Coord

Source

pub fn set_decoration_spacing(&self, value: Coord)

Source

pub fn get_disabled_opacity(&self) -> f32

Source

pub fn set_disabled_opacity(&self, value: f32)

Source

pub fn get_disabled_text_color(&self) -> Color

Source

pub fn set_disabled_text_color(&self, value: Color)

Source

pub fn get_drop_indicator_color(&self) -> Color

Source

pub fn set_drop_indicator_color(&self, value: Color)

Source

pub fn get_expanded_branch_indicator(&self) -> SharedString

Source

pub fn set_expanded_branch_indicator(&self, value: SharedString)

Source

pub fn get_expands_on_double_click(&self) -> bool

Source

pub fn set_expands_on_double_click(&self, value: bool)

Source

pub fn invoke_focus(&self)

Source

pub fn get_focused(&self) -> bool

Source

pub fn set_focused(&self, value: bool)

Source

pub fn get_highlight_color(&self) -> Color

Source

pub fn set_highlight_color(&self, value: Color)

Source

pub fn get_highlighted_text_color(&self) -> Color

Source

pub fn set_highlighted_text_color(&self, value: Color)

Source

pub fn get_horizontal_padding(&self) -> Coord

Source

pub fn set_horizontal_padding(&self, value: Coord)

Source

pub fn get_hover_color(&self) -> Color

Source

pub fn set_hover_color(&self, value: Color)

Source

pub fn get_hover_highlight(&self) -> bool

Source

pub fn set_hover_highlight(&self, value: bool)

Source

pub fn get_inactive_highlight_color(&self) -> Color

Source

pub fn set_inactive_highlight_color(&self, value: Color)

Source

pub fn get_inactive_highlighted_text_color(&self) -> Color

Source

pub fn set_inactive_highlighted_text_color(&self, value: Color)

Source

pub fn get_indentation(&self) -> Coord

Source

pub fn set_indentation(&self, value: Coord)

Source

pub fn invoke_item_activated(&self, arg_0: i32)

Source

pub fn on_item_activated(&self, f: impl FnMut(i32) + 'static)

Source

pub fn invoke_item_clicked(&self, arg_0: i32)

Source

pub fn on_item_clicked(&self, f: impl FnMut(i32) + 'static)

Source

pub fn invoke_item_collapse_requested(&self, arg_0: i32)

Source

pub fn on_item_collapse_requested(&self, f: impl FnMut(i32) + 'static)

Source

pub fn invoke_item_double_clicked(&self, arg_0: i32)

Source

pub fn on_item_double_clicked(&self, f: impl FnMut(i32) + 'static)

Source

pub fn invoke_item_expand_requested(&self, arg_0: i32)

Source

pub fn on_item_expand_requested(&self, f: impl FnMut(i32) + 'static)

Source

pub fn get_items_expandable(&self) -> bool

Source

pub fn set_items_expandable(&self, value: bool)

Source

pub fn invoke_key_press_event(&self, arg_0: KeyEvent) -> EventResult

Source

pub fn on_key_press_event( &self, f: impl FnMut(KeyEvent) -> EventResult + 'static, )

Source

pub fn get_model(&self) -> ModelRc<TreeItem>

Source

pub fn set_model(&self, value: ModelRc<TreeItem>)

Source

pub fn get_page_size(&self) -> i32

Source

pub fn set_page_size(&self, value: i32)

Source

pub fn invoke_recursive_expand_requested( &self, arg_0: i32, arg_1: bool, arg_2: i32, )

Source

pub fn on_recursive_expand_requested( &self, f: impl FnMut(i32, bool, i32) + 'static, )

Source

pub fn get_root_is_decorated(&self) -> bool

Source

pub fn set_root_is_decorated(&self, value: bool)

Source

pub fn get_row_height(&self) -> Coord

Source

pub fn set_row_height(&self, value: Coord)

Source

pub fn get_text_color(&self) -> Color

Source

pub fn set_text_color(&self, value: Color)

Trait Implementations§

Source§

impl ComponentHandle for TreeView

Source§

fn as_weak(&self) -> Weak<Self>

Returns a new weak pointer.
Source§

fn clone_strong(&self) -> Self

Returns a clone of this handle that’s a strong reference.
Source§

fn global<'a, T: Global<'a, Self>>(&'a self) -> T

This function provides access to instances of global singletons exported in .slint. See Global for an example how to export and access globals from .slint markup.
Source§

fn run(&self) -> Result<(), PlatformError>

This is a convenience function that first calls Self::show, followed by crate::run_event_loop() and Self::hide.
Source§

fn show(&self) -> Result<(), PlatformError>

Convenience function for crate::Window::show(). This shows the window on the screen and maintains an extra strong reference while the window is visible. To react to events from the windowing system, such as draw requests or mouse/touch input, it is still necessary to spin the event loop, using crate::run_event_loop.
Source§

fn hide(&self) -> Result<(), PlatformError>

Convenience function for crate::Window::hide(). Hides the window, so that it is not visible anymore. The additional strong reference on the associated component, that was created when show() was called, is dropped.
Source§

fn window(&self) -> &Window

Returns the Window associated with this component. The window API can be used to control different aspects of the integration into the windowing system, such as the position on the screen.
Source§

impl From<TreeView> for VRc<ItemTreeVTable, InnerTreeView>

Source§

fn from(value: TreeView) -> Self

Converts to this type from the input type.
Source§

impl<'a> Global<'a, TreeView> for TreeViewStyle<'a>

Source§

type StaticSelf = TreeViewStyle<'static>

The Self type, with a 'static lifetime.
Source§

fn get(component: &'a TreeView) -> Self

Returns a reference to the global.
Source§

fn as_weak(&self) -> Weak<Self::StaticSelf>

Convert this Global reference into a weak reference. Read more
Source§

impl StrongHandle for TreeView

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> ErasedDestructor for T
where T: 'static,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.