r = max(r, TabIndicatorWidth);
}
+ //FIXME: LyXRC::cursor_width should be caret_width
caret_width_ = lyxrc.cursor_width
? lyxrc.cursor_width
: 1 + int((lyxrc.currentZoom + 50) / 200.0);
QRect const & rect() { return rect_; }
private:
- /// cursor is in RTL or LTR text
+ /// caret is in RTL or LTR text
bool rtl_;
/// indication for RTL or LTR
bool l_shape_;
Point p;
int h = 0;
- d->buffer_view_->cursorPosAndHeight(p, h);
+ d->buffer_view_->caretPosAndHeight(p, h);
// Don't start blinking if the cursor isn't on screen.
if (!d->buffer_view_->cursorInView(p, h))
return;
d->buffer_view_->cursor().fixIfBroken();
}
- // update cursor position, because otherwise it has to wait until
+ // update caret position, because otherwise it has to wait until
// the blinking interval is over
if (d->caret_visible_) {
d->hideCaret();
// In order to avoid bad surprise in the middle of an operation,
// we better stop the blinking caret...
- // the cursor gets restarted in GuiView::restartCaret()
+ // the caret gets restarted in GuiView::restartCaret()
stopBlinkingCaret();
guiApp->processKeySym(key, mod);
}
cmd.action() != LFUN_MOUSE_MOTION || cmd.button() != mouse_button::none;
// In order to avoid bad surprise in the middle of an operation, we better stop
- // the blinking cursor.
+ // the blinking caret.
if (notJustMovingTheMouse)
p->stopBlinkingCaret();
// FIXME: let GuiView take care of those.
lyx_view_->clearMessage();
- // Show the cursor immediately after any operation
+ // Show the caret immediately after any operation
p->startBlinkingCaret();
}
Point point;
int h = 0;
- buffer_view_->cursorPosAndHeight(point, h);
+ buffer_view_->caretPosAndHeight(point, h);
bool const caret_in_view = buffer_view_->cursorInView(point, h);
buffer_view_->resize(p->viewport()->width(), p->viewport()->height());
if (caret_in_view)
need_resize_ = false;
p->busy(false);
- // Eventually, restart the cursor after the resize event.
+ // Eventually, restart the caret after the resize event.
// We might be resizing even if the focus is on another widget so we only
- // restart the cursor if we have the focus.
+ // restart the caret if we have the focus.
if (p->hasFocus())
QTimer::singleShot(50, p, SLOT(startBlinkingCaret()));
}
Point point;
int h = 0;
- buffer_view_->cursorPosAndHeight(point, h);
+ buffer_view_->caretPosAndHeight(point, h);
if (!buffer_view_->cursorInView(point, h))
return;
if (realfont.language() == latex_language)
l_shape = false;
- // show cursor on screen
+ // show caret on screen
Cursor & cur = buffer_view_->cursor();
bool completable = cur.inset().showCompletionCursor()
&& completer_->completionAvailable()
caret_visible_ = true;
//int cur_x = buffer_view_->getPos(cur).x_;
- // We may have decided to slide the cursor row so that cursor
+ // We may have decided to slide the cursor row so that caret
// is visible.
point.x_ -= buffer_view_->horizScrollOffset();
// FIXME: let GuiView take care of those.
d->lyx_view_->updateLayoutList();
}
- // Show the cursor immediately after any operation.
+ // Show the caret immediately after any operation.
startBlinkingCaret();
// FIXME QT5
#ifdef Q_WS_X11
viewport()->update();
}
- // Hide the cursor during the test transformation.
+ // Hide the caret during the test transformation.
if (e->preeditString().isEmpty())
startBlinkingCaret();
else
cur_r.moveLeft(10);
cur_r.moveBottom(cur_r.bottom()
+ cur_r.height() * (d->preedit_lines_ - 1));
- // return lower right of cursor in LyX.
+ // return lower right of caret in LyX.
return cur_r;
default:
return QWidget::inputMethodQuery(query);