pub struct List<T> { /* private fields */ }Expand description
A list widget for displaying items
Implementations§
Source§impl<T> List<T>
impl<T> List<T>
Sourcepub fn highlight_fg(self, color: Color) -> Self
pub fn highlight_fg(self, color: Color) -> Self
Set highlight foreground color
Sourcepub fn highlight_bg(self, color: Color) -> Self
pub fn highlight_bg(self, color: Color) -> Self
Set highlight background color
Sourcepub fn selected_index(&self) -> usize
pub fn selected_index(&self) -> usize
Get selected index
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Select next item (wraps around)
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Select previous item (wraps around)
Trait Implementations§
Source§impl<T: Display> StyledView for List<T>
impl<T: Display> StyledView for List<T>
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
Auto Trait Implementations§
impl<T> !Freeze for List<T>
impl<T> !RefUnwindSafe for List<T>
impl<T> Send for List<T>where
T: Send,
impl<T> !Sync for List<T>
impl<T> Unpin for List<T>where
T: Unpin,
impl<T> UnwindSafe for List<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
Mutably borrows from an owned value. Read more