I can color cells by specifying a Row format or a column format but that applies the coloring/formatting to the entire row or column. I'd like to set each cell's color based on some criteria. When I include the ... coloring tags in the setCDKMatrixCell()
call those characters get set to the cell text not used to format the cell.
Is there another way? Or any ideas on how to modify the drawCDKMatrixCell to do this?
void drawCDKMatrixCell() {
...
if (matrix->dominant == ROW) {
highlight = matrix->rowtitle[absolute_row][0] & A_ATTRIBUTES;
}
else if (matrix->dominant == COL) {
highlight = matrix->coltitle[col][0] & A_ATTRIBUTES;
}
/* Draw in the cell info. */
for (x = 1; x <= matrix->colwidths[col]; x++) {
chtype ch = (((x <= infolen) && !isHiddenDisplayType(disptype))
? (CharOf(MATRIX_INFO(matrix, vrow, vcol)[x - 1]) | highlight)
: matrix->filler);
(void) mvwaddch(cell, 1, x, ch | highlight);
}
...