#include "debug.h"
#include "funcrequest.h"
#include "gettext.h"
+#include "insetiterator.h"
#include "iterators.h"
#include "language.h"
#include "lyxlayout.h"
void BufferView::gotoLabel(string const & label)
{
- for (Buffer::inset_iterator it = buffer()->inset_iterator_begin();
- it != buffer()->inset_iterator_end(); ++it) {
+ for (InsetIterator it(buffer()->inset()); it; ++it) {
vector<string> labels;
it->getLabelList(*buffer(), labels);
if (find(labels.begin(),labels.end(),label) != labels.end()) {
cursor().clearSelection();
- text()->setCursor(cursor(), it.getPar(), it.getPos());
+ text()->setCursor(cursor(), it.par(), it.pos());
cursor().resetAnchor();
update();
return;
#include "gettext.h"
#include "intl.h"
#include "iterators.h"
+#include "insetiterator.h"
#include "lyx_cb.h" // added for Dispatch functions
#include "lyx_main.h"
#include "lyxfind.h"
#warning FIXME
#if 0
Buffer * buf = bv_->buffer();
- Buffer::inset_iterator beg = buf->inset_iterator_begin();
- Buffer::inset_iterator end = buf->inset_iterator_end();
+ InsetIterator beg(buf->inset());
bool cursor_par_seen = false;
LyXText * = bv_->getLyXText();
ParagraphList::iterator pit = text->getPar(cur.par());
- for (; beg != end; ++beg) {
- if (beg.getPar() == pit)
+ for (; beg; ++beg) {
+ if (beg.par() == pit)
cursor_par_seen = true;
if (cursor_par_seen) {
- if (beg.getPar() == pit && beg.getPos() >= cur.pos())
+ if (beg.par() == pit && beg.pos() >= cur.pos())
break;
if (beg.getPar() != pit)
break;
}
}
- if (beg != end) {
+ if (beg) {
// Now find the first inset that matches code.
- for (; beg != end; ++beg) {
+ for (; beg; ++beg) {
if (beg->lyxCode() == code)
return &(*beg);
}