CellCursor::~CellCursor() { Window *win = getWindow(); if(win == NULL) return; win->AttribResetOff(); drawBox(x, y); win->refresh(); }
void CellCursor::drawBox() { Window *win = getWindow(); if(win == NULL) return; win->AttribResetOff(); drawBox(prev_x, prev_y); win->AttribOn(COLOR_PAIR(this->color)); drawBox(x, y); win->AttribOff(COLOR_PAIR(this->color)); win->refresh(); }
void CellCursor::setVisible(bool visible) { this->visible = visible; constraintCursor(); if(visible) drawBox(); else { Window *win = getWindow(); if(win == NULL) return; win->AttribResetOff(); drawBox(x, y); win->refresh(); } }
void CellCursor::setCursorSize(int w, int h) { // reset cursor before showing if(visible) { Logger::log << "visible" << std::endl; Window *win = getWindow(); if(win == NULL) return; win->AttribResetOff(); drawBox(x, y); win->refresh(); } cursor_width = w; cursor_height = h; constraintCursor(); }