]> git.lyx.org Git - lyx.git/blob - src/insets/inset.h
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / inset.h
1 // -*- C++ -*-
2 /**
3  * \file inset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author Jürgen Vigna
9  * \author Lars Gullik Bjønnes
10  * \author Matthias Ettrich
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef INSETOLD_H
16 #define INSETOLD_H
17
18 #include "insetbase.h"
19
20
21 namespace lyx {
22
23 /// Insets
24 class InsetOld : public InsetBase {
25 public:
26         ///
27         enum {
28                 ///
29                 TEXT_TO_INSET_OFFSET = 4
30         };
31
32         ///
33         InsetOld();
34
35         ///
36         void setInsetName(docstring const & s) { name_ = s; }
37         ///
38         virtual docstring const & getInsetName() const { return name_; }
39         /// set x/y drawing position cache
40         void setPosCache(PainterInfo const &, int, int) const;
41
42 protected:
43         ///
44         InsetOld(InsetOld const & in);
45
46 private:
47         InsetOld & operator=(InsetOld const &) const;
48
49         ///
50         docstring name_;
51 };
52
53
54 /** \c InsetBase_code is a wrapper for InsetBase::Code.
55  *  It can be forward-declared and passed as a function argument without
56  *  having to expose inset.h.
57  */
58 class InsetBase_code {
59         InsetBase::Code val_;
60 public:
61         InsetBase_code(InsetBase::Code val) : val_(val) {}
62         operator InsetBase::Code() const { return val_; }
63 };
64
65
66 } // namespace lyx
67
68 #endif