]> git.lyx.org Git - lyx.git/blob - src/InsetList.h
Point fix, earlier forgotten
[lyx.git] / src / InsetList.h
1 // -*- C++ -*-
2 /**
3  * \file InsetList.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_LIST_H
13 #define INSET_LIST_H
14
15 #include "support/types.h"
16
17 class InsetOld;
18 class BufferView;
19
20
21 ///
22 class InsetList {
23 public:
24         ///
25         struct InsetTable {
26                 ///
27                 lyx::pos_type pos;
28                 ///
29                 InsetOld * inset;
30                 ///
31                 InsetTable(lyx::pos_type p, InsetOld * i) : pos(p), inset(i) {}
32         };
33         ///
34         typedef std::vector<InsetTable> List;
35         ///
36         typedef List::iterator iterator;
37         ///
38         typedef List::const_iterator const_iterator;
39
40         ///
41         ~InsetList();
42         ///
43         iterator begin();
44         ///
45         iterator end();
46         ///
47         const_iterator begin() const;
48         ///
49         const_iterator end() const;
50         ///
51         iterator insetIterator(lyx::pos_type pos);
52         ///
53         void insert(InsetOld * inset, lyx::pos_type pos);
54         ///
55         void erase(lyx::pos_type pos);
56         ///
57         InsetOld * release(lyx::pos_type);
58         ///
59         InsetOld * get(lyx::pos_type pos) const;
60         ///
61         void increasePosAfterPos(lyx::pos_type pos);
62         ///
63         void decreasePosAfterPos(lyx::pos_type pos);
64         ///
65         void deleteInsetsLyXText(BufferView * bv);
66         ///
67         void InsetList::insetsOpenCloseBranch(BufferView * bv);
68
69 private:
70         ///
71         List list;
72 };
73
74 #endif