int x, int y, int xlow, int xhigh, int ylow, int yhigh)
{
BOOST_ASSERT(!cursor.empty());
- pit_type beg, end;
CursorSlice bottom = cursor[0];
LyXText * text = bottom.text();
BOOST_ASSERT(text);
-
+
DocIterator it = doc_iterator_begin(bottom.inset());
DocIterator const et = doc_iterator_end(bottom.inset());
} // namespace anon
-// be careful: this is called from the bv's constructor, too, so
+// be careful: this is called from the bv's constructor, too, so
// bv functions are not yet available!
LCursor::LCursor(BufferView & bv)
: DocIterator(), bv_(&bv), anchor_(), x_target_(-1),
}
-bool LCursor::getStatus(FuncRequest const & cmd, FuncStatus & status)
-{
- // This is, of course, a mess. Better create a new doc iterator and use
- // this in Inset::getStatus. This might require an additional
- // BufferView * arg, though (which should be avoided)
- LCursor safe = *this;
- bool res = false;
- for ( ; size(); pop()) {
- //lyxerr << "\nLCursor::getStatus: cmd: " << cmd << endl << *this << endl;
- if (idx() > lastidx()) {
- lyxerr << "wrong idx " << idx() << ", max is " << lastidx()
- << ". Trying to correct this." << endl;
- idx() = lastidx();
- }
- if (pit() > lastpit()) {
- lyxerr << "wrong par " << pit() << ", max is " << lastpit()
- << ". Trying to correct this." << endl;
- pit() = lastpit();
- }
- if (pos() > lastpos()) {
- lyxerr << "wrong pos " << pos() << ", max is " << lastpos()
- << ". Trying to correct this." << endl;
- pos() = lastpos();
- }
-
- // The inset's getStatus() will return 'true' if it made
- // a definitive decision on whether it want to handle the
- // request or not. The result of this decision is put into
- // the 'status' parameter.
- if (inset().getStatus(*this, cmd, status)) {
- res = true;
- break;
- }
- }
- operator=(safe);
- return res;
-}
-
-
BufferView & LCursor::bv() const
{
BOOST_ASSERT(bv_);
}
}
- // try current cell for e.g. text insets
- if (inset().idxUpDown2(*this, up))
- return true;
-
//xarray().boundingBox(xlow, xhigh, ylow, yhigh);
//if (up)
// yhigh = yo - 4;