Function ncursesw::waddchnstr[][src]

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

Add/Output a ascii character string and normal attribute/color pair combination of a given length on a given window.

Example

extern crate ncursesw;
extern crate ascii;

use ascii::*;
use ncursesw::*;
use ncursesw::normal::*;

let win_size = Size { lines: 10, columns: 50 };
let win_origin = Origin { y: 5, x: 5 };

let win = newwin(win_size, win_origin)?;

let color_pair0 = ColorPair::default();
let attrs = Attributes::default() | color_pair0;

let ascii_str = AsciiString::from_ascii("Testing..Testing..1..2..3..")?;
let chtype_str = ChtypeString::from_ascii_string(&ascii_str) | attrs;

// this will output "Testing..Testing.." on the window `win`.
waddchnstr(win, &chtype_str, 18)?;

delwin(win)?;