Struct cursive::views::TextArea[][src]

pub struct TextArea { /* fields omitted */ }

Multi-lines text editor.

A TextArea will attempt to grow vertically and horizontally dependent on the content. Wrap it in a BoxView to constrain its size.

Methods

impl TextArea
[src]

Creates a new, empty TextArea.

Retrieves the content of the view.

Returns the position of the cursor in the content string.

Moves the cursor to the given position.

Panics

This method panics if cursor is not the beginning of a character in the content string.

Sets the content of the view.

Sets the content of the view.

Chainable variant.

Disables this view.

A disabled view cannot be selected.

Disables this view.

Chainable variant.

Re-enables this view.

Re-enables this view.

Chainable variant.

Returns true if this view is enabled.

Trait Implementations

impl Default for TextArea
[src]

Returns the "default value" for a type. Read more

impl View for TextArea
[src]

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

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

Called when an event is received (key press, mouse event, ...). Read more

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

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

What part of the view is important and should be visible? Read more

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

Runs a closure on the view identified by the given selector. Read more

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

Auto Trait Implementations

impl Send for TextArea

impl Sync for TextArea