]> git.lyx.org Git - lyx.git/blob - src/insets/inset.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[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 "BufferView.h"
19 #include "debug.h"
20 #include "gettext.h"
21 #include "lyxtext.h"
22 #include "LColor.h"
23 #include "metricsinfo.h"
24 #include "coordcache.h"
25
26
27 namespace lyx {
28
29 using std::string;
30
31
32 InsetOld::InsetOld()
33         : //background_color_(LColor::inherit)
34           background_color_(LColor::background)
35 {}
36
37
38 InsetOld::InsetOld(InsetOld const & in)
39         : InsetBase(in), name_(in.name_),
40           background_color_(in.background_color_)
41 {}
42
43
44 void InsetOld::setBackgroundColor(LColor_color color)
45 {
46         background_color_ = color;
47 }
48
49
50 LColor_color InsetOld::backgroundColor() const
51 {
52         return LColor::color(background_color_);
53 }
54
55
56 int InsetOld::ascent() const
57 {
58         return dim_.asc;
59 }
60
61
62 int InsetOld::descent() const
63 {
64         return dim_.des;
65 }
66
67
68 int InsetOld::width() const
69 {
70         return dim_.wid;
71 }
72
73
74 void InsetOld::setPosCache(PainterInfo const & pi, int x, int y) const
75 {
76         //lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
77         pi.base.bv->coordCache().insets().add(this, x, y);
78 }
79
80
81 } // namespace lyx