]> git.lyx.org Git - lyx.git/blob - src/insets/inset.C
This commit cleans up everything related to singleton. The other important change...
[lyx.git] / src / insets / inset.C
1 /**
2  * \file inset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Alejandro Aguilar Sierra
7  * \author Jürgen Vigna
8  * \author Lars Gullik Bjønnes
9  * \author Matthias Ettrich
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #include <config.h>
15
16 #include "inset.h"
17
18 #include "debug.h"
19 #include "gettext.h"
20 #include "lyxtext.h"
21 #include "LColor.h"
22 #include "metricsinfo.h"
23 #include "coordcache.h"
24
25 using std::string;
26
27
28 InsetOld::InsetOld()
29         : //background_color_(LColor::inherit)
30           background_color_(LColor::background)
31 {}
32
33
34 InsetOld::InsetOld(InsetOld const & in)
35         : InsetBase(in), name_(in.name_),
36           background_color_(in.background_color_)
37 {}
38
39
40 void InsetOld::setBackgroundColor(LColor_color color)
41 {
42         background_color_ = color;
43 }
44
45
46 LColor_color InsetOld::backgroundColor() const
47 {
48         return LColor::color(background_color_);
49 }
50
51
52 int InsetOld::ascent() const
53 {
54         return dim_.asc;
55 }
56
57
58 int InsetOld::descent() const
59 {
60         return dim_.des;
61 }
62
63
64 int InsetOld::width() const
65 {
66         return dim_.wid;
67 }
68
69
70 void InsetOld::setPosCache(PainterInfo const &, int x, int y) const
71 {
72         //lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
73         theCoords.insets().add(this, x, y);
74 }