]> git.lyx.org Git - lyx.git/blobdiff - src/InsetList.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / InsetList.h
index 6f86f3a444bde628b056c0fd500ae18cc231b16e..3e287ad1c73c496a4461a9526b176cd3df817fd2 100644 (file)
 
 #include <vector>
 
-class InsetOld;
-class BufferView;
+
+namespace lyx {
+
+class InsetBase;
+class Buffer;
 
 
 ///
 class InsetList {
 public:
        ///
-       struct InsetTable {
+       class InsetTable {
+       public:
                ///
-               lyx::pos_type pos;
+               InsetTable(pos_type p, InsetBase * i) : pos(p), inset(i) {}
                ///
-               InsetOld * inset;
+               pos_type pos;
                ///
-               InsetTable(lyx::pos_type p, InsetOld * i) : pos(p), inset(i) {}
+               InsetBase * inset;
        };
        ///
        typedef std::vector<InsetTable> List;
@@ -42,35 +46,38 @@ public:
        ///
        ~InsetList();
        ///
-       iterator begin();
+       iterator begin() { return list_.begin(); }
        ///
-       iterator end();
+       iterator end() { return list_.end(); }
        ///
-       const_iterator begin() const;
+       const_iterator begin() const { return list_.begin(); }
        ///
-       const_iterator end() const;
+       const_iterator end() const { return list_.end(); }
        ///
-       iterator insetIterator(lyx::pos_type pos); 
+       bool empty() const { return list_.empty(); }
        ///
-       const_iterator insetIterator(lyx::pos_type pos) const;
+       iterator insetIterator(pos_type pos);
        ///
-       void insert(InsetOld * inset, lyx::pos_type pos);
+       const_iterator insetIterator(pos_type pos) const;
        ///
-       void erase(lyx::pos_type pos);
+       void insert(InsetBase * inset, pos_type pos);
        ///
-       InsetOld * release(lyx::pos_type);
+       void erase(pos_type pos);
        ///
-       InsetOld * get(lyx::pos_type pos) const;
+       InsetBase * release(pos_type);
        ///
-       void increasePosAfterPos(lyx::pos_type pos);
+       InsetBase * get(pos_type pos) const;
        ///
-       void decreasePosAfterPos(lyx::pos_type pos);
+       void increasePosAfterPos(pos_type pos);
        ///
-       void insetsOpenCloseBranch(BufferView * bv);
+       void decreasePosAfterPos(pos_type pos);
 
 private:
        ///
-       List list;
+       List list_;
 };
 
+
+} // namespace lyx
+
 #endif