pub struct TreeView<T>where
T: ListItem + 'static,{ /* private fields */ }Implementations§
Source§impl<T> TreeView<T>where
T: ListItem + 'static,
impl<T> TreeView<T>where
T: ListItem + 'static,
Sourcepub fn new(layout: Layout, flags: Flags) -> Self
pub fn new(layout: Layout, flags: Flags) -> Self
Creates a new TreeView control with the specified layout and flags
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);Sourcepub fn with_capacity(capacity: usize, layout: Layout, flags: Flags) -> Self
pub fn with_capacity(capacity: usize, layout: Layout, flags: Flags) -> Self
Creates a new TreeView control with the specified layout and flags. The capacity parameter specifies the initial number of items that can be stored in the tree view.
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::with_capacity(16, layout!("d:f"), treeview::Flags::None);Sourcepub fn add(&mut self, item: T) -> Handle<Item<T>>
pub fn add(&mut self, item: T) -> Handle<Item<T>>
Adds a new object to the tree view. The object must implement ListItem trait. The object will be added as a root item. This method returns a handle to the newly added item.
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
tree.add(FileInfo { name: "Folder", folder: true });Sourcepub fn add_to_parent(
&mut self,
item: T,
parent: Handle<Item<T>>,
) -> Handle<Item<T>>
pub fn add_to_parent( &mut self, item: T, parent: Handle<Item<T>>, ) -> Handle<Item<T>>
Adds a new object to the tree view. The object must implement ListItem trait. The object will be added as a child of the specified parent item. This method returns a handle to the newly added item.
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let parent = tree.add(FileInfo { name: "Folder", folder: true });
tree.add_to_parent(FileInfo { name: "File", folder: false }, parent);Sourcepub fn add_item(&mut self, item: Item<T>) -> Handle<Item<T>>
pub fn add_item(&mut self, item: Item<T>) -> Handle<Item<T>>
Adds a new item to the tree view. The item will be added as a root item and will allow someone to control the selection state, icon and attributes.
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let h = tree.add_item(treeview::Item::new(
FileInfo { name: "Folder", folder: true },
false,
Some(charattr!("white")),
['F', 'D']));Sourcepub fn add_item_to_parent(
&mut self,
item: Item<T>,
parent: Handle<Item<T>>,
) -> Handle<Item<T>>
pub fn add_item_to_parent( &mut self, item: Item<T>, parent: Handle<Item<T>>, ) -> Handle<Item<T>>
Adds a new item to the tree view. The item will be added as a child of the specified parent item and will allow someone to control the selection state, icon and attributes. This method returns a handle to the newly added item.
§Example
use appcui::prelude::*;
#[derive(ListItem)]
struct FileInfo {
#[Column(name="Name", width=20)]
name: &'static str,
#[Column(name="Folder", width=10)]
folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let parent = tree.add(FileInfo { name: "Folder", folder: true });
tree.add_item_to_parent(treeview::Item::new(
FileInfo { name: "File", folder: false },
false,
Some(charattr!("white")),
['F', 'D']), parent);Sourcepub fn add_batch<F>(&mut self, f: F)where
F: FnOnce(&mut Self),
pub fn add_batch<F>(&mut self, f: F)where
F: FnOnce(&mut Self),
Adds multiple items to a tree view and then sorts and refilters the list. This method is useful when you want to add multiple items at once.
Sourcepub fn set_frozen_columns(&mut self, count: u16)
pub fn set_frozen_columns(&mut self, count: u16)
Sets the number of frozen columns. Frozen columns are columns that are always visible, even when the list view is scrolled horizontally. The frozen columns are always the first columns in the list view. Using the value 0 will disable frozen columns.
Sourcepub fn move_cursor_to(&mut self, handle: Handle<Item<T>>) -> bool
pub fn move_cursor_to(&mut self, handle: Handle<Item<T>>) -> bool
Moves the cursor to a specified item. That item has to be visible in the tree view. If the item is not visible, the method will return false.
Sourcepub fn item(&self, item_handle: Handle<Item<T>>) -> Option<&Item<T>>
pub fn item(&self, item_handle: Handle<Item<T>>) -> Option<&Item<T>>
Returns a immutable reference of the item with a specified handle or None if the handle is invalid (e.g. the handle does not exist in the tree view)
Sourcepub fn item_mut(&mut self, item_handle: Handle<Item<T>>) -> Option<&mut Item<T>>
pub fn item_mut(&mut self, item_handle: Handle<Item<T>>) -> Option<&mut Item<T>>
Returns a mutable reference of the item with a specified handle or None if the handle is invalid (e.g. the handle does not exist in the tree view)
Sourcepub fn current_item_handle(&self) -> Option<Handle<Item<T>>>
pub fn current_item_handle(&self) -> Option<Handle<Item<T>>>
Returns the handle of the current item (the item where the cursor is located) or None if there are no items in the tree view
Sourcepub fn current_item(&self) -> Option<&Item<T>>
pub fn current_item(&self) -> Option<&Item<T>>
Returns a immutable reference to the current item (the item where the cursor is located) or None if there are no items in the tree view
Sourcepub fn current_item_mut(&mut self) -> Option<&mut Item<T>>
pub fn current_item_mut(&mut self) -> Option<&mut Item<T>>
Returns a mutable reference to the current item (the item where the cursor is located) or None if there are no items in the tree view
Sourcepub fn root_items(&self) -> &[Handle<Item<T>>]
pub fn root_items(&self) -> &[Handle<Item<T>>]
Returns a slice with the handles of all root level items
Sourcepub fn root_item(&self, index: usize) -> Option<&Item<T>>
pub fn root_item(&self, index: usize) -> Option<&Item<T>>
Returns a mutable reference to the root item at the specified index or None if the index is invalid
Sourcepub fn root_item_mut(&mut self, index: usize) -> Option<&mut Item<T>>
pub fn root_item_mut(&mut self, index: usize) -> Option<&mut Item<T>>
Returns a mutable reference to the root item at the specified index or None if the index is invalid
Sourcepub fn delete_item(&mut self, item_handle: Handle<Item<T>>)
pub fn delete_item(&mut self, item_handle: Handle<Item<T>>)
Deletes the item with the specified handle. If the item has children, they will be deleted as well.
Sourcepub fn delete_item_children(&mut self, item_handle: Handle<Item<T>>)
pub fn delete_item_children(&mut self, item_handle: Handle<Item<T>>)
Recursively deletes all children of the item with the specified handle (but keeps the item itself)
Sourcepub fn collapse_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)
pub fn collapse_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)
Collapses the item with the specified handle. If the recursive flag is set to true, all children of the item will be collapsed as well.
Sourcepub fn expand_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)
pub fn expand_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)
Expands the item with the specified handle. If the recursive flag is set to true, all children of the item will be expanded as well.
Sourcepub fn collapse_all(&mut self)
pub fn collapse_all(&mut self)
Collapses all items in the tree view
Sourcepub fn expand_all(&mut self)
pub fn expand_all(&mut self)
Expands all items in the tree view
Sourcepub fn items_count(&self) -> usize
pub fn items_count(&self) -> usize
Returns the number of items in the tree view
Sourcepub fn selected_items_count(&self) -> usize
pub fn selected_items_count(&self) -> usize
Returns the number of selected items
Sourcepub fn select_item(&mut self, item_handle: Handle<Item<T>>, selected: bool)
pub fn select_item(&mut self, item_handle: Handle<Item<T>>, selected: bool)
Change the selection state of the item at the specified index
Sourcepub fn sort(&mut self, column_index: u16, ascendent: bool)
pub fn sort(&mut self, column_index: u16, ascendent: bool)
Sort the items in the tree view based on the specified column index. The ascendent flag specifies the sorting order (true for ascending, false for descending)
Sourcepub fn clear_search(&mut self)
pub fn clear_search(&mut self)
Clears the content of the search bar
Methods from Deref<Target = ControlBase>§
Sourcepub fn client_size(&self) -> Size
pub fn client_size(&self) -> Size
Returns the client size of a control. In most cases it is the same as the size returned the method .get_size(). However, if the control has margins (for example in case of a Window) this size will be smaller.
Sourcepub fn set_size(&mut self, width: u16, height: u16)
pub fn set_size(&mut self, width: u16, height: u16)
Sets the new size for a control (to a specified size given by parameters width and height). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by controls x and y coordonates) and the new provided size. Any dock or alignment properties will be removed.
This method has no effect on a Desktop control.
Sourcepub fn position(&self) -> Point
pub fn position(&self) -> Point
Returns the relatove position (x,y) of the current control to its parent.
Sourcepub fn set_position(&mut self, x: i32, y: i32)
pub fn set_position(&mut self, x: i32, y: i32)
Sets the new position for a control (to a specified coordonate given by parameters x and y). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by coordonates x and y) and the controls current width and height. Any dock or alignment properties will be removed.
This method has no effect on a Desktop control.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Sets the enabled state of a control. This method has no effect on a Desktop or a Window control that will always be enabled.
Sourcepub fn set_visible(&mut self, visible: bool)
pub fn set_visible(&mut self, visible: bool)
Can be used to make a control visible or not. This method has no effect on the Desktop control that will always be visible.
§Examples
use appcui::prelude::*;
let mut button = button!("'Click me',x:1,y:1,w:15");
button.set_visible(false); // this will hide the buttonpub fn set_components_toolbar_margins(&mut self, left: u8, top: u8)
pub fn expanded_size(&self) -> Size
Sourcepub fn request_focus(&mut self) -> bool
pub fn request_focus(&mut self) -> bool
A control can use this method to request focus
pub fn timer(&mut self) -> Option<&mut Timer>
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Returns true if the current control is visible or false otherwise
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if the current control is enabled or false otherwise
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns true if the current control is active (enabled and visible at the same time) or false otherwise
Sourcepub fn can_receive_input(&self) -> bool
pub fn can_receive_input(&self) -> bool
Returns true if the current control can receive focus or false otherwise. If the control is not visible or it is disable this function will return false.
Sourcepub fn has_focus(&self) -> bool
pub fn has_focus(&self) -> bool
Returns true if the current control has the focus or false otherwise
Sourcepub fn is_mouse_over(&self) -> bool
pub fn is_mouse_over(&self) -> bool
Returns true if the mouse cursor is over the current control or false otherwise
Sourcepub fn set_size_bounds(
&mut self,
min_width: u16,
min_height: u16,
max_width: u16,
max_height: u16,
)
pub fn set_size_bounds( &mut self, min_width: u16, min_height: u16, max_width: u16, max_height: u16, )
Sets the bounds (minim and maxim sized allowed for a control). If the size of a control is outside its bounds, its size will be adjusted automatically. This method has no effect on a Desktop control.
Sourcepub fn set_hotkey<T>(&mut self, hotkey: T)
pub fn set_hotkey<T>(&mut self, hotkey: T)
Sets the hot-key associated with a control. Use Key::None to clear an existing hotkey
pub fn raise_custom_event(&self, class_hash: u64, event_id: u32)
pub fn request_update(&self)
pub fn appbar(&mut self) -> &mut AppBar
pub fn theme(&self) -> &Theme
Sourcepub fn update_layout(&mut self, layout: Layout)
pub fn update_layout(&mut self, layout: Layout)
Updates the layout of the current control
Trait Implementations§
Source§impl<T> AccordionEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> AccordionEvents for TreeView<T>where
T: ListItem + 'static,
fn on_panel_changed( &mut self, _handle: Handle<Accordion>, _new_panel_index: u32, _old_panel_index: u32, ) -> EventProcessStatus
Source§impl<T> AppBarEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> AppBarEvents for TreeView<T>where
T: ListItem + 'static,
Source§fn on_update(&self, _appbar: &mut AppBar)
fn on_update(&self, _appbar: &mut AppBar)
Source§impl<T> ButtonEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ButtonEvents for TreeView<T>where
T: ListItem + 'static,
fn on_pressed(&mut self, _handle: Handle<Button>) -> EventProcessStatus
Source§impl<T> CharPickerEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> CharPickerEvents for TreeView<T>where
T: ListItem + 'static,
fn on_char_changed( &mut self, _handle: Handle<CharPicker>, _code: Option<char>, ) -> EventProcessStatus
Source§impl<T> CheckBoxEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> CheckBoxEvents for TreeView<T>where
T: ListItem + 'static,
fn on_status_changed( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus
Source§impl<T> ColorPickerEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ColorPickerEvents for TreeView<T>where
T: ListItem + 'static,
fn on_color_changed( &mut self, _handle: Handle<ColorPicker>, _color: Color, ) -> EventProcessStatus
Source§impl<T> ComboBoxEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ComboBoxEvents for TreeView<T>where
T: ListItem + 'static,
fn on_selection_changed( &mut self, _handle: Handle<ComboBox>, ) -> EventProcessStatus
impl<T> Control for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> CustomEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> CustomEvents for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> DatePickerEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> DatePickerEvents for TreeView<T>where
T: ListItem + 'static,
fn on_date_changed( &mut self, _handle: Handle<DatePicker>, _date: NaiveDate, ) -> EventProcessStatus
Source§impl<T> DesktopEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> DesktopEvents for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> GenericBackgroundTaskEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericBackgroundTaskEvents for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> GenericCommandBarEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericCommandBarEvents for TreeView<T>where
T: ListItem + 'static,
fn on_update_commandbar(&self, _commandbar: &mut CommandBar)
fn on_event(&mut self, _command_id: u32)
Source§impl<T> GenericDropDownListEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericDropDownListEvents for TreeView<T>where
T: ListItem + 'static,
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericGraphViewEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericGraphViewEvents for TreeView<T>where
T: ListItem + 'static,
fn on_current_node_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_node_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _node_index: usize, ) -> EventProcessStatus
fn on_request_new_node( &mut self, _handle: Handle<()>, _type_id: TypeId, _p: Point, ) -> EventProcessStatus
fn on_request_new_edge( &mut self, _handle: Handle<()>, _type_id: TypeId, _from: u32, _to: u32, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericListViewEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericListViewEvents for TreeView<T>where
T: ListItem + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_group_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus
fn on_group_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _index: usize, ) -> EventProcessStatus
Source§impl<T> GenericMenuEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericMenuEvents for TreeView<T>where
T: ListItem + 'static,
Source§fn on_command(
&mut self,
_menu: Handle<Menu>,
_item: Handle<Command>,
_command: u32,
)
fn on_command( &mut self, _menu: Handle<Menu>, _item: Handle<Command>, _command: u32, )
Source§impl<T> GenericNumericSelectorEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericNumericSelectorEvents for TreeView<T>where
T: ListItem + 'static,
fn on_value_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericSelectorEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericSelectorEvents for TreeView<T>where
T: ListItem + 'static,
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericTreeViewEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> GenericTreeViewEvents for TreeView<T>where
T: ListItem + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus
fn on_item_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus
fn on_item_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus
Source§impl<T> KeySelectorEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> KeySelectorEvents for TreeView<T>where
T: ListItem + 'static,
fn on_key_changed( &mut self, _handle: Handle<KeySelector>, _new_key: Key, _old_key: Key, ) -> EventProcessStatus
Source§impl<T> ListBoxEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ListBoxEvents for TreeView<T>where
T: ListItem + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<ListBox>, _index: usize, ) -> EventProcessStatus
fn on_item_checked( &mut self, _handle: Handle<ListBox>, _index: usize, _checked: bool, ) -> EventProcessStatus
Source§impl<T> MarkdownEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> MarkdownEvents for TreeView<T>where
T: ListItem + 'static,
fn on_external_link( &mut self, _handle: Handle<Markdown>, _link: &str, ) -> EventProcessStatus
impl<T> NotDesktop for TreeView<T>where
T: ListItem + 'static,
impl<T> NotWindow for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> OnDefaultAction for TreeView<T>where
T: ListItem + 'static,
impl<T> OnDefaultAction for TreeView<T>where
T: ListItem + 'static,
fn on_default_action(&mut self)
Source§impl<T> OnKeyPressed for TreeView<T>where
T: ListItem + 'static,
impl<T> OnKeyPressed for TreeView<T>where
T: ListItem + 'static,
fn on_key_pressed(&mut self, key: Key, character: char) -> EventProcessStatus
Source§impl<T> OnMouseEvent for TreeView<T>where
T: ListItem + 'static,
impl<T> OnMouseEvent for TreeView<T>where
T: ListItem + 'static,
fn on_mouse_event(&mut self, event: &MouseEvent) -> EventProcessStatus
Source§impl<T> OnSiblingSelected for TreeView<T>where
T: ListItem + 'static,
impl<T> OnSiblingSelected for TreeView<T>where
T: ListItem + 'static,
fn on_sibling_selected(&mut self, _handle: Handle<()>)
Source§impl<T> OnThemeChanged for TreeView<T>where
T: ListItem + 'static,
impl<T> OnThemeChanged for TreeView<T>where
T: ListItem + 'static,
fn on_theme_changed(&mut self, _theme: &Theme)
Source§impl<T> OnWindowRegistered for TreeView<T>where
T: ListItem + 'static,
impl<T> OnWindowRegistered for TreeView<T>where
T: ListItem + 'static,
fn on_registered(&mut self)
Source§impl<T> PasswordEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> PasswordEvents for TreeView<T>where
T: ListItem + 'static,
Source§impl<T> PathFinderEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> PathFinderEvents for TreeView<T>where
T: ListItem + 'static,
fn on_path_updated(&mut self, _handle: Handle<PathFinder>) -> EventProcessStatus
Source§impl<T> RadioBoxEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> RadioBoxEvents for TreeView<T>where
T: ListItem + 'static,
fn on_selected(&mut self, _handle: Handle<RadioBox>) -> EventProcessStatus
Source§impl<T> RichTextFieldEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> RichTextFieldEvents for TreeView<T>where
T: ListItem + 'static,
fn on_validate( &mut self, _handle: Handle<RichTextField>, _text: &str, ) -> EventProcessStatus
fn on_text_changed( &mut self, _handle: Handle<RichTextField>, ) -> EventProcessStatus
Source§impl<T> TabEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> TabEvents for TreeView<T>where
T: ListItem + 'static,
fn on_tab_changed( &mut self, _handle: Handle<Tab>, _new_tab_index: u32, _old_tabl_index: u32, ) -> EventProcessStatus
Source§impl<T> TextFieldEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> TextFieldEvents for TreeView<T>where
T: ListItem + 'static,
fn on_validate( &mut self, _handle: Handle<TextField>, _text: &str, ) -> EventProcessStatus
fn on_text_changed(&mut self, _handle: Handle<TextField>) -> EventProcessStatus
Source§impl<T> ThreeStateBoxEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ThreeStateBoxEvents for TreeView<T>where
T: ListItem + 'static,
fn on_status_changed( &mut self, _handle: Handle<ThreeStateBox>, _state: State, ) -> EventProcessStatus
Source§impl<T> TimePickerEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> TimePickerEvents for TreeView<T>where
T: ListItem + 'static,
fn on_time_changed( &mut self, _handle: Handle<TimePicker>, _time: NaiveTime, ) -> EventProcessStatus
Source§impl<T> TimerEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> TimerEvents for TreeView<T>where
T: ListItem + 'static,
fn on_start(&mut self) -> EventProcessStatus
fn on_resume(&mut self, _ticks: u64) -> EventProcessStatus
fn on_pause(&mut self, _ticks: u64) -> EventProcessStatus
fn on_update(&mut self, _ticks: u64) -> EventProcessStatus
Source§impl<T> ToggleButtonEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ToggleButtonEvents for TreeView<T>where
T: ListItem + 'static,
fn on_selection_changed( &mut self, _handle: Handle<ToggleButton>, _selected: bool, ) -> EventProcessStatus
Source§impl<T> ToolBarEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> ToolBarEvents for TreeView<T>where
T: ListItem + 'static,
Source§fn on_checkbox_clicked(
&mut self,
_handle: Handle<CheckBox>,
_checked: bool,
) -> EventProcessStatus
fn on_checkbox_clicked( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus
Source§fn on_choice_selected(
&mut self,
_handle: Handle<SingleChoice>,
) -> EventProcessStatus
fn on_choice_selected( &mut self, _handle: Handle<SingleChoice>, ) -> EventProcessStatus
Source§impl<T> WindowEvents for TreeView<T>where
T: ListItem + 'static,
impl<T> WindowEvents for TreeView<T>where
T: ListItem + 'static,
fn on_layout_changed(&mut self, _old_layout: Rect, _new_layout: Rect)
Source§fn on_activate(&mut self)
fn on_activate(&mut self)
Source§fn on_deactivate(&mut self)
fn on_deactivate(&mut self)
Source§fn on_accept(&mut self)
fn on_accept(&mut self)
.exit_with(...) method to exit.
for a regular (non-modal) window this callback is never called)Source§fn on_cancel(&mut self) -> ActionRequest
fn on_cancel(&mut self) -> ActionRequest
Auto Trait Implementations§
impl<T> Freeze for TreeView<T>
impl<T> RefUnwindSafe for TreeView<T>where
T: RefUnwindSafe,
impl<T> Send for TreeView<T>where
T: Send,
impl<T> Sync for TreeView<T>where
T: Sync,
impl<T> Unpin for TreeView<T>where
T: Unpin,
impl<T> UnsafeUnpin for TreeView<T>
impl<T> UnwindSafe for TreeView<T>where
T: 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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.