#include "Bidi.h"
#include "BufferView.h"
-#include "bufferview_funcs.h"
#include "Buffer.h"
#include "Cursor.h"
#include "CoordCache.h"
#include "Paragraph.h"
#include "paragraph_funcs.h"
#include "ParIterator.h"
+#include "TextMetrics.h"
#include "insets/InsetTabular.h"
#include "insets/InsetText.h"
int xo;
int yo;
Inset const * inset = &it.inset();
- std::map<Inset const *, Point> const & data =
+ std::map<Inset const *, Geometry> const & data =
c.bv().coordCache().getInsets().getData();
- std::map<Inset const *, Point>::const_iterator I = data.find(inset);
+ std::map<Inset const *, Geometry>::const_iterator I = data.find(inset);
// FIXME: in the case where the inset is not in the cache, this
// means that no part of it is visible on screen. In this case
return it;
}
- Point o = I->second;
+ Point o = I->second.pos;
inset->cursorPos(c.bv(), it.top(), c.boundary(), xo, yo);
// Convert to absolute
xo += o.x_;
for ( ; it != et; it.forwardPos(true)) {
// avoid invalid nesting when selecting
if (!cursor.selection() || positionable(it, cursor.anchor_)) {
- Point p = bv_funcs::getPos(bv, it, false);
+ Point p = bv.getPos(it, false);
int xo = p.x_;
int yo = p.y_;
if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
for ( ; it != et; it.forwardPos()) {
// avoid invalid nesting when selecting
- if (bv_funcs::status(&bv, it) == bv_funcs::CUR_INSIDE
+ if (bv.cursorStatus(it) == CUR_INSIDE
&& (!cur.selection() || positionable(it, cur.anchor_))) {
- Point p = bv_funcs::getPos(bv, it, false);
+ Point p = bv.getPos(it, false);
int xo = p.x_;
int yo = p.y_;
if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
odocstringstream ods;
ods << '\n';
// only add blank line if we're not in an ERT or Listings inset
- if (par.ownerCode() != Inset::ERT_CODE
- && par.ownerCode() != Inset::LISTINGS_CODE)
+ if (par.ownerCode() != ERT_CODE
+ && par.ownerCode() != LISTINGS_CODE)
ods << '\n';
return ods.str();
}
void Cursor::getPos(int & x, int & y) const
{
- Point p = bv_funcs::getPos(bv(), *this, boundary());
+ Point p = bv().getPos(*this, boundary());
x = p.x_;
y = p.y_;
}
// with and without selection are handled differently
if (!selection()) {
- int yo = bv_funcs::getPos(bv(), *this, boundary()).y_;
+ int yo = bv().getPos(*this, boundary()).y_;
Cursor old = *this;
// To next/previous row
if (up)