[][src]Struct text_box::TextBox

pub struct TextBox { /* fields omitted */ }

TextBox struct definition.

Methods

impl TextBox[src]

pub fn new(
    x: u8,
    y: u8,
    width: u8,
    height: u8,
    border: u8,
    title: &str,
    text: &str
) -> Option<TextBox>
[src]

Creates a new TextBox with the specified params.

Example

let textbox = TextBox::new(
  10, 10,
  15, 6,
  2,
  "DANGER",
  "Some children are playing with dangerous weapons."
).unwrap();

Note: Termion use one-based coordinates, this means that the first point is (1, 1) at upside left corner.

Trait Implementations

impl Default for TextBox[src]

impl Display for TextBox[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Added easy fmt::Display to print a TextBox just with print! println!

Auto Trait Implementations

impl RefUnwindSafe for TextBox

impl Send for TextBox

impl Sync for TextBox

impl Unpin for TextBox

impl UnwindSafe for TextBox

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> ToString for T where
    T: Display + ?Sized
[src]

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.