Struct titik::TextArea[][src]

pub struct TextArea<MSG> { /* fields omitted */ }

A textarea is a 2 dimensional editor where each line is separated by \n.

Implementations

impl<MSG> TextArea<MSG>[src]

pub fn new<S>(value: S) -> Self where
    S: ToString
[src]

create a new text area with initial value

pub fn add_input_listener(&mut self, cb: Callback<Event, MSG>)[src]

attach an listener to the input event of this textarea

pub fn get_content(&self) -> String[src]

get the content of this text area, same as get_value

pub fn process_key(&mut self, key_event: KeyEvent)[src]

process the keypress event

pub fn set_value<S: ToString>(&mut self, value: S)[src]

set the value of this text area

pub fn add_line<S: ToString>(&mut self, s: S)[src]

add a line to the last end of buffer of this text area

pub fn get_value(&self) -> String[src]

return the string value of this text_area

Trait Implementations

impl<MSG: Debug> Debug for TextArea<MSG>[src]

impl<MSG> Widget<MSG> for TextArea<MSG> where
    MSG: Debug + 'static, 
[src]

fn draw(&self, buf: &mut Buffer) -> Vec<Cmd>[src]

draw this button to the buffer, with the given computed layout

Auto Trait Implementations

impl<MSG> !RefUnwindSafe for TextArea<MSG>

impl<MSG> !Send for TextArea<MSG>

impl<MSG> !Sync for TextArea<MSG>

impl<MSG> Unpin for TextArea<MSG>

impl<MSG> !UnwindSafe for TextArea<MSG>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.