[−][src]Struct text_box::TextBox
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]
x: u8,
y: u8,
width: u8,
height: u8,
border: u8,
title: &str,
text: &str
) -> Option<TextBox>
Creates a new TextBox with the specified params.
Example
let textbox = TextBox::new( 1, 1, // (x, y) coordinates. 15, 6, // (width, height) box size. 2, // border type. "DANGER", // Box title. "Some children are playing with dangerous weapons." // Box text. ).unwrap();
This will print out:
╔DANGER═════════╗
║Some children ║
║are playing ║
║with dangerous ║
║weapons. ║
║ ║
║ ║
╚═══════════════╝
Note: Termion use one-based coordinates, this means that the first point is (1, 1) at upside left corner.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,