pub struct SelectionList { /* private fields */ }Expand description
Multi-selection list widget
Implementations§
Source§impl SelectionList
impl SelectionList
Sourcepub fn style(self, style: SelectionStyle) -> Self
pub fn style(self, style: SelectionStyle) -> Self
Set selection style
Sourcepub fn show_checkboxes(self, show: bool) -> Self
pub fn show_checkboxes(self, show: bool) -> Self
Show checkboxes (shorthand for style)
Sourcepub fn max_selections(self, max: usize) -> Self
pub fn max_selections(self, max: usize) -> Self
Set maximum selections
Sourcepub fn min_selections(self, min: usize) -> Self
pub fn min_selections(self, min: usize) -> Self
Set minimum selections
Sourcepub fn show_descriptions(self, show: bool) -> Self
pub fn show_descriptions(self, show: bool) -> Self
Show descriptions
Sourcepub fn selected_fg(self, color: Color) -> Self
pub fn selected_fg(self, color: Color) -> Self
Set selected item color
Sourcepub fn highlighted_fg(self, color: Color) -> Self
pub fn highlighted_fg(self, color: Color) -> Self
Set highlighted item color
Sourcepub fn max_visible(self, max: usize) -> Self
pub fn max_visible(self, max: usize) -> Self
Set maximum visible items
Sourcepub fn show_count(self, show: bool) -> Self
pub fn show_count(self, show: bool) -> Self
Show selection count
Sourcepub fn get_selected(&self) -> &[usize]
pub fn get_selected(&self) -> &[usize]
Get selected indices
Sourcepub fn get_selected_values(&self) -> Vec<&str>
pub fn get_selected_values(&self) -> Vec<&str>
Get selected values
Sourcepub fn get_selected_items(&self) -> Vec<&SelectionItem>
pub fn get_selected_items(&self) -> Vec<&SelectionItem>
Get selected items
Sourcepub fn is_selected(&self, index: usize) -> bool
pub fn is_selected(&self, index: usize) -> bool
Check if index is selected
Sourcepub fn toggle_highlighted(&mut self)
pub fn toggle_highlighted(&mut self)
Toggle highlighted item
Sourcepub fn select_all(&mut self)
pub fn select_all(&mut self)
Select all
Sourcepub fn deselect_all(&mut self)
pub fn deselect_all(&mut self)
Deselect all
Sourcepub fn highlight_previous(&mut self)
pub fn highlight_previous(&mut self)
Move highlight up
Sourcepub fn highlight_next(&mut self)
pub fn highlight_next(&mut self)
Move highlight down
Sourcepub fn highlight_first(&mut self)
pub fn highlight_first(&mut self)
Move highlight to start
Sourcepub fn highlight_last(&mut self)
pub fn highlight_last(&mut self)
Move highlight to end
Source§impl SelectionList
impl SelectionList
Trait Implementations§
Source§impl Clone for SelectionList
impl Clone for SelectionList
Source§fn clone(&self) -> SelectionList
fn clone(&self) -> SelectionList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectionList
impl Debug for SelectionList
Source§impl StyledView for SelectionList
impl StyledView for SelectionList
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Source§impl View for SelectionList
impl View for SelectionList
Source§fn render(&self, ctx: &mut RenderContext<'_>)
fn render(&self, ctx: &mut RenderContext<'_>)
Render the view to the given context Read more
Source§fn meta(&self) -> WidgetMeta
fn meta(&self) -> WidgetMeta
Get widget metadata for DOM Read more
Source§fn widget_type(&self) -> &'static str
fn widget_type(&self) -> &'static str
Get widget type name (for CSS type selectors) Read more
Auto Trait Implementations§
impl Freeze for SelectionList
impl RefUnwindSafe for SelectionList
impl Send for SelectionList
impl Sync for SelectionList
impl Unpin for SelectionList
impl UnwindSafe for SelectionList
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
Mutably borrows from an owned value. Read more