使用 unicode 字符在 ncurses 中创建边框
creating borders in ncurses with unicode characters
目前正在使用 ncursesw 在 WSL2 中使用 C++ 进行编码。
对于ncurses中的box()
或border()
functions/macros,是否可以与它们一起使用unicode字符,或者它们不属于chtype
的类别?
我正在尝试使用双线框绘图字符创建边框。
如果没有,我是否必须在 for 循环中使用 addstr()
等其他函数手动创建边框?
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
.
目前正在使用 ncursesw 在 WSL2 中使用 C++ 进行编码。
对于ncurses中的box()
或border()
functions/macros,是否可以与它们一起使用unicode字符,或者它们不属于chtype
的类别?
我正在尝试使用双线框绘图字符创建边框。
如果没有,我是否必须在 for 循环中使用 addstr()
等其他函数手动创建边框?
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
.