[−][src]Struct tui_temp_fork::widgets::SelectableList
A widget to display several items among which one can be selected (optional)
Examples
SelectableList::default() .block(Block::default().title("SelectableList").borders(Borders::ALL)) .items(&["Item 1", "Item 2", "Item 3"]) .select(Some(1)) .style(Style::default().fg(Color::White)) .highlight_style(Style::default().modifier(Modifier::ITALIC)) .highlight_symbol(">>");
Methods
impl<'b> SelectableList<'b>
[src]
pub fn block(self, block: Block<'b>) -> SelectableList<'b>
[src]
pub fn items<I>(self, items: &'b [I]) -> SelectableList<'b> where
I: AsRef<str> + 'b,
[src]
I: AsRef<str> + 'b,
pub fn style(self, style: Style) -> SelectableList<'b>
[src]
pub fn highlight_symbol(self, highlight_symbol: &'b str) -> SelectableList<'b>
[src]
pub fn highlight_style(self, highlight_style: Style) -> SelectableList<'b>
[src]
pub fn select(self, index: Option<usize>) -> SelectableList<'b>
[src]
Trait Implementations
impl<'b> Widget for SelectableList<'b>
[src]
fn draw(&mut self, area: Rect, buf: &mut Buffer)
[src]
fn background(&self, area: Rect, buf: &mut Buffer, color: Color)
[src]
fn render<B>(&mut self, f: &mut Frame<B>, area: Rect) where
Self: Sized,
B: Backend,
[src]
Self: Sized,
B: Backend,
impl<'b> Default for SelectableList<'b>
[src]
fn default() -> SelectableList<'b>
[src]
Auto Trait Implementations
impl<'b> Send for SelectableList<'b>
impl<'b> Sync for SelectableList<'b>
impl<'b> Unpin for SelectableList<'b>
impl<'b> UnwindSafe for SelectableList<'b>
impl<'b> RefUnwindSafe for SelectableList<'b>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,