[−][src]Struct termimad::InputField
A simple input field, managing its cursor position.
Fields
area: Area
Methods
impl InputField
[src]
pub fn new(area: Area) -> Self
[src]
pub fn change_area(&mut self, x: u16, y: u16, w: u16)
[src]
pub fn set_normal_style(&mut self, style: CompoundStyle)
[src]
pub fn get_content(&self) -> String
[src]
pub fn is_content(&self, s: &str) -> bool
[src]
pub fn set_content(&mut self, s: &str)
[src]
changes the content to the new one and put the cursor at the end if the content is different from the previous one.
pub fn put_char(&mut self, c: char)
[src]
put a char at cursor position (and increments this position)
pub fn del_char_left(&mut self) -> bool
[src]
remove the char left of the cursor, if any
pub fn del_char_below(&mut self) -> bool
[src]
remove the char at cursor position, if any
pub fn apply_event(&mut self, event: &Event) -> bool
[src]
apply the passed event to change the state (content, cursor)
Return true when the event was used.
pub fn display(&self)
[src]
Auto Trait Implementations
impl Sync for InputField
impl Send for InputField
impl Unpin for InputField
impl RefUnwindSafe for InputField
impl UnwindSafe for InputField
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,