}
if (the_locking_inset && cpar() == inset_par && cpos() == inset_pos) {
- inset_x = cix(bv) - x + drawTextXOffset;
+ inset_x = cix() - x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
}
void InsetText::lockInset(BufferView * bv, UpdatableInset * inset)
{
the_locking_inset = inset;
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
inset_pos = cpos();
inset_par = cpar();
if (the_locking_inset && the_locking_inset == inset) {
if (cpar() == inset_par && cpos() == inset_pos) {
lyxerr[Debug::INSETS] << "OK" << endl;
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
} else {
lyxerr[Debug::INSETS] << "cursor.pos != inset_pos" << endl;
if (the_locking_inset &&
cpar() == inset_par && cpos() == inset_pos)
{
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
}
}
the_locking_inset->getCursor(bv, x, y);
return;
}
- x = cx(&bv);
+ x = cx();
y = cy() + InsetText::y();
}
the_locking_inset->getCursorPos(bv, x, y);
return;
}
- x = cx(bv) - top_x - TEXT_TO_INSET_OFFSET;
+ x = cx() - top_x - TEXT_TO_INSET_OFFSET;
y = cy() - TEXT_TO_INSET_OFFSET;
}
int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font);
- if (bv->fitLockedInsetCursor(cx(bv), cy(), asc, desc))
+ if (bv->fitLockedInsetCursor(cx(), cy(), asc, desc))
need_update |= FULL;
}
x = dim_.wid;
if (y < 0)
y = dim_.des;
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
FuncRequest cmd(bv, LFUN_INSET_EDIT, x - inset_x, y - inset_y, button);
inset->localDispatch(cmd);
}
-int InsetText::cx(BufferView *) const
+int InsetText::cx() const
{
int x = text_.cursor.x() + top_x + TEXT_TO_INSET_OFFSET;
if (the_locking_inset) {
}
-int InsetText::cix(BufferView *) const
+int InsetText::cix() const
{
int x = text_.cursor.ix() + top_x + TEXT_TO_INSET_OFFSET;
if (the_locking_inset) {
// seems to be unneeded
#if 1
if (the_locking_inset) {
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
}
text_.init(bv);
restoreLyXTextState();
if (the_locking_inset) {
- inset_x = cix(bv) - top_x + drawTextXOffset;
+ inset_x = cix() - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
}
text_.top_y(bv->screen().topCursorVisible(&text_));
text_.setSelectionRange(str.length());
updateLocal(bv, SELECTION, false);
}
- return (result != lyx::find::SR_NOT_FOUND);
+ return result != lyx::find::SR_NOT_FOUND;
}
+
bool InsetText::searchBackward(BufferView * bv, string const & str,
bool cs, bool mw)
{
text_.setSelectionRange(str.length());
updateLocal(bv, SELECTION, false);
}
- return (result != lyx::find::SR_NOT_FOUND);
+ return result != lyx::find::SR_NOT_FOUND;
}