Struct cursive::view::LinearLayout
[−]
[src]
pub struct LinearLayout { // some fields omitted }
Arranges its children linearly according to its orientation.
Methods
impl LinearLayout
[src]
fn new(orientation: Orientation) -> Self
Creates a new layout with the given orientation.
fn weight(self, weight: usize) -> Self
Modifies the weight of the last child added.
It is an error to call this before adding a child (and it will panic).
fn child<V: View + 'static>(self, view: V) -> Self
Adds a child to the layout.
fn vertical() -> Self
Creates a new vertical layout.
fn horizontal() -> Self
Creates a new horizontal layout.
Trait Implementations
impl View for LinearLayout
[src]
fn draw(&mut self, printer: &Printer)
Draws the view with the given printer (includes bounds) and focus.
fn layout(&mut self, size: Vec2)
Called once the size for this view has been decided, so it can propagate the information to its children. Read more
fn get_min_size(&self, req: SizeRequest) -> Vec2
Returns the minimum size the view requires under the given restrictions.
fn on_event(&mut self, event: Event) -> EventResult
Called when a key was pressed. Default implementation just ignores it.
fn find(&mut self, &Selector) -> Option<&mut Any>
Finds the view pointed to by the given path. Returns None if the path doesn't lead to a view. Read more
fn take_focus(&mut self) -> bool
This view is offered focus. Will it take it?