]> git.lyx.org Git - lyx.git/blob - src/InsetList.h
27b34b29cf616584b553d3819a00aa81326b85c5
[lyx.git] / src / InsetList.h
1 // -*- C++ -*-
2
3 #ifndef INSET_LIST_H
4 #define INSET_LIST_H
5
6 #include "support/types.h"
7
8 class InsetOld;
9 class BufferView;
10
11
12 ///
13 class InsetList {
14 public:
15         ///
16         struct InsetTable {
17                 ///
18                 lyx::pos_type pos;
19                 ///
20                 InsetOld * inset;
21                 ///
22                 InsetTable(lyx::pos_type p, InsetOld * i) : pos(p), inset(i) {}
23         };
24         ///
25         typedef std::vector<InsetTable> List;
26         ///
27         typedef List::iterator iterator;
28         ///
29         typedef List::const_iterator const_iterator;
30
31         ///
32         ~InsetList();
33         ///
34         iterator begin();
35         ///
36         iterator end();
37         ///
38         const_iterator begin() const;
39         ///
40         const_iterator end() const;
41         ///
42         iterator insetIterator(lyx::pos_type pos);
43         ///
44         void insert(InsetOld * inset, lyx::pos_type pos);
45         ///
46         void erase(lyx::pos_type pos);
47         ///
48         InsetOld * release(lyx::pos_type);
49         ///
50         InsetOld * get(lyx::pos_type pos) const;
51         ///
52         void increasePosAfterPos(lyx::pos_type pos);
53         ///
54         void decreasePosAfterPos(lyx::pos_type pos);
55         ///
56         void deleteInsetsLyXText(BufferView * bv);
57 private:
58         ///
59         List list;
60 };
61
62 #endif