I'm adding strings to a window, with waddwstr()
function, one line after other, in consecutive rows. I don't want ncurses
to automatically wrap lines for me – I'm overwriting them with consecutive calls to waddwstr()
and sometimes tail of previous line is left displaying. Can ncurses
just stop when right edge of window is reached?
The non-wrapping functions have "ch" in their name, e.g., wadd_wchstr.
The same is true of the non-wide interfaces waddstr versus waddchstr.
However, the wrapping/non-wrapping functions differ by more than that. They use different parameter types. The wrapping functions rely upon the video attributes set via wattr_set
, etc., while the non-wrapping functions combine the video-attributes with the character data:
waddstr
and waddchstr
use char*
and chtype*
parameters, respectivelywaddwstr
and wadd_chstr
use wchar_t*
and cchar_t*
parameters.Converting between the two forms can be a nuisance, because X/Open, etc., did not define functions for doing the conversion.
The manual page for bkgd
describes how these video attributes are combined with the background character to obtain the actual display.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With