Bold box style in ncurses

1 day ago 1
ARTICLE AD BOX

As "too large" I understand wider than char. To use unicode chars with ncurses you need a special version of the library and you need to link with -lncursesw.

#include <locale.h> #include <ncurses.h> void draw_double_border(WINDOW *win) { // Define the wide characters for the border cchar_t ls, rs, ts, bs, tl, tr, bl, br; setcchar(&ls, L"║", ALL_INDICATIONS, 0, NULL); // Left side setcchar(&rs, L"║", ALL_INDICATIONS, 0, NULL); // Right side setcchar(&ts, L"═", ALL_INDICATIONS, 0, NULL); // Top side setcchar(&bs, L"═", ALL_INDICATIONS, 0, NULL); // Bottom side setcchar(&tl, L"╔", ALL_INDICATIONS, 0, NULL); // Top left setcchar(&tr, L"╗", ALL_INDICATIONS, 0, NULL); // Top right setcchar(&bl, L"╚", ALL_INDICATIONS, 0, NULL); // Bottom left setcchar(&br, L"╝", ALL_INDICATIONS, 0, NULL); // Bottom right // Apply the border to the window wborder_set(win, &ls, &rs, &ts, &bs, &tl, &tr, &bl, &br); }
Read Entire Article