Struct cursive::views::Button [] [src]

pub struct Button { /* fields omitted */ }

Simple text label with a callback when is pressed.

A button shows its content in a single line and has a fixed size.

Examples

let quit_button = Button::new("Quit", |s| s.quit());

Methods

impl Button
[src]

Creates a new button with the given content and callback.

Disables this view.

A disabled view cannot be selected.

Disables this view.

Chainable variant.

Re-enables this view.

Enable or disable this view.

Returns true if this view is enabled.

Trait Implementations

impl View for Button
[src]

Draws the view with the given printer (includes bounds) and focus.

Returns the minimum size the view requires with the given restrictions. Read more

Called when a key was pressed. Read more

This view is offered focus. Will it take it? Read more

Returns true if the view content changed since last layout phase. Read more

Called once the size for this view has been decided, Read more

Finds the view identified by the given selector. Read more

Moves the focus to the view identified by the given selector. Read more