Ejemplo n.º 1
0
CellCursor::~CellCursor()
{
    Window *win = getWindow();
    if(win == NULL)
        return;
    win->AttribResetOff();
    drawBox(x, y);
    win->refresh();
}
Ejemplo n.º 2
0
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();

}
Ejemplo n.º 3
0
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();
    }
}
Ejemplo n.º 4
0
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();
}