#include "lyxvc.h"
#include "bufferparams.h"
#include "texrow.h"
+#include "ParagraphList.h"
#include "paragraph.h"
+#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
class BufferView;
+class Counters;
class LyXRC;
class TeXErrors;
class LaTeXFeatures;
///
std::vector<std::pair<string, string> > const getBibkeyList() const;
///
- std::vector<string> const getLabelList();
+ std::vector<string> const getLabelList() const;
/** This will clearly have to change later. Later we can have more
than one user per buffer. */
This is a linked list of paragraph, this list holds the
whole contents of the document.
*/
- Paragraph * paragraph;
+ ParagraphList paragraphs;
/// LyX version control object.
LyXVC lyxvc;
/// Used when typesetting to place errorboxes.
TexRow texrow;
+ /// Buffer-wide counter array
+ Counters & counters() const;
+
private:
/// is save needed
mutable bool lyx_clean;
*/
BufferView * users;
+ /// The pointer is const although its contents may not be
+ boost::scoped_ptr<Counters> const ctrs;
+
public:
///
class inset_iterator {
inset_iterator & operator++() { // prefix ++
if (par) {
++it;
- if (it == par->inset_iterator_end()) {
+ if (it == par->insetlist.end()) {
par = par->next();
setParagraph();
}
inset_iterator tmp(par, it.getPos());
if (par) {
++it;
- if (it == par->inset_iterator_end()) {
+ if (it == par->insetlist.end()) {
par = par->next();
setParagraph();
}
}
///
- Inset * operator*() { return *it; }
+ Inset * operator*() { return it.getInset(); }
///
Paragraph * getPar() { return par; }
///
Paragraph * par;
///
- Paragraph::inset_iterator it;
+ InsetList::iterator it;
};
///
inset_iterator inset_iterator_begin() {
- return inset_iterator(paragraph);
+ return inset_iterator(&*paragraphs.begin());
}
///
inset_iterator inset_iterator_end() {
}
///
inset_iterator inset_const_iterator_begin() const {
- return inset_iterator(paragraph);
+ return inset_iterator(&*paragraphs.begin());
}
///
inset_iterator inset_const_iterator_end() const {