]> git.lyx.org Git - lyx.git/blob - src/InsetList.h
ws changes only
[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 #include <vector>
18
19 class InsetOld;
20 class BufferView;
21
22
23 ///
24 class InsetList {
25 public:
26         ///
27         struct InsetTable {
28                 ///
29                 lyx::pos_type pos;
30                 ///
31                 InsetOld * inset;
32                 ///
33                 InsetTable(lyx::pos_type p, InsetOld * i) : pos(p), inset(i) {}
34         };
35         ///
36         typedef std::vector<InsetTable> List;
37         ///
38         typedef List::iterator iterator;
39         ///
40         typedef List::const_iterator const_iterator;
41
42         ///
43         ~InsetList();
44         ///
45         iterator begin();
46         ///
47         iterator end();
48         ///
49         const_iterator begin() const;
50         ///
51         const_iterator end() const;
52         ///
53         iterator insetIterator(lyx::pos_type pos);
54         ///
55         void insert(InsetOld * inset, lyx::pos_type pos);
56         ///
57         void erase(lyx::pos_type pos);
58         ///
59         InsetOld * release(lyx::pos_type);
60         ///
61         InsetOld * get(lyx::pos_type pos) const;
62         ///
63         void increasePosAfterPos(lyx::pos_type pos);
64         ///
65         void decreasePosAfterPos(lyx::pos_type pos);
66         ///
67         void deleteInsetsLyXText(BufferView * bv);
68         ///
69         void InsetList::insetsOpenCloseBranch(BufferView * bv);
70
71 private:
72         ///
73         List list;
74 };
75
76 #endif