Struct cursive::prelude::ListView
[−]
[src]
pub struct ListView { // some fields omitted }
Displays a scrollable list of elements.
Methods
impl ListView
[src]
fn new() -> Self
Creates a new, empty ListView
.
fn add_child<V: View + 'static>(&mut self, label: &str, view: V)
Adds a view to the end of the list.
fn child<V: View + 'static>(self, label: &str, view: V) -> Self
Adds a view to the end of the list.
Chainable variant.
fn add_delimiter(&mut self)
Adds a delimiter to the end of the list.
fn delimiter(self) -> Self
Adds a delimiter to the end of the list.
Chainable variant.
Trait Implementations
impl Default for ListView
[src]
impl View for ListView
[src]
fn draw(&self, printer: &Printer)
Draws the view with the given printer (includes bounds) and focus.
fn get_min_size(&mut self, req: Vec2) -> Vec2
Returns the minimum size the view requires with the given restrictions. Read more
fn layout(&mut self, size: Vec2)
Called once the size for this view has been decided, Read more
fn on_event(&mut self, event: Event) -> EventResult
Called when a key was pressed. Default implementation just ignores it.
fn take_focus(&mut self, source: Direction) -> bool
This view is offered focus. Will it take it? Read more
fn find(&mut self, selector: &Selector) -> Option<&mut Any>
Finds the view pointed to by the given path. Read more
fn needs_relayout(&self) -> bool
Returns true
if the view content changed since last layout phase. Read more