简体   繁体   中英

creating borders in ncurses with unicode characters

Currently coding in C++ in WSL2 with ncursesw.

For the box() or border() functions/macros in ncurses, is it possible to use unicode characters with them, or do they not fit in the category of chtype ?

I'm trying to create a border using the double line box drawing characters.

If not, do I have to create a border manually with other functions such as addstr() in for loops?

box and border use chtype 's which provide only A_CHARTEXT bits for characters (8 bits in ncurses). To go beyond that, use box_set and border_set . Those use cchar_t structures, which you would initialize with setcchar .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM