Function ncursesw::mvwaddchnstr[][src]

pub fn mvwaddchnstr(
    handle: WINDOW,
    origin: Origin,
    chstr: &ChtypeString,
    number: i32
) -> Result<(), NCurseswError>
Expand description

Add a chtype (ascii with attributes) type string of a specified length to the specified position on the specified window

Example

let colors1 = Colors::new(Color::Red, Color::Black);
let color_pair1 = ColorPair::new(colors1)?;
let attributes = Attribute::Dim | color_pair1;

let asciistr = AsciiString::from_ascii_str("testing, testing... 1..2..3..")?;
let mut chstr = ChtypeString::from_ascii_str(ascii_str);
chstr = chstr | attributes;
let origin = Origin { y: 10, x: 15 };

mvwaddchnstr(window_handle, origin, &chstr, 29)?;