]> git.lyx.org Git - lyx.git/blob - src/InsetList.h
Search for toolbar images in the filesystem and afterwards in the resource.
[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
20 namespace lyx {
21
22 class Inset;
23 class Buffer;
24
25 ///
26 class InsetList {
27 public:
28         ///
29         InsetList() {}
30         ///
31         InsetList(InsetList const &);
32
33         ///
34         class InsetTable {
35         public:
36                 ///
37                 InsetTable(pos_type p, Inset * i) : pos(p), inset(i) {}
38                 ///
39                 pos_type pos;
40                 ///
41                 Inset * inset;
42         };
43         ///
44         typedef std::vector<InsetTable> List;
45         ///
46         typedef List::iterator iterator;
47         ///
48         typedef List::const_iterator const_iterator;
49
50         ///
51         ~InsetList();
52         ///
53         iterator begin() { return list_.begin(); }
54         ///
55         iterator end() { return list_.end(); }
56         ///
57         const_iterator begin() const { return list_.begin(); }
58         ///
59         const_iterator end() const { return list_.end(); }
60         ///
61         bool empty() const { return list_.empty(); }
62         ///
63         iterator insetIterator(pos_type pos);
64         ///
65         const_iterator insetIterator(pos_type pos) const;
66         ///
67         void insert(Inset * inset, pos_type pos);
68         ///
69         void erase(pos_type pos);
70         ///
71         Inset * release(pos_type);
72         ///
73         Inset * get(pos_type pos) const;
74         ///
75         void increasePosAfterPos(pos_type pos);
76         ///
77         void decreasePosAfterPos(pos_type pos);
78
79 private:
80         ///
81         List list_;
82 };
83
84
85 } // namespace lyx
86
87 #endif