3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
8 * \author Lars Gullik Bjønnes
9 * \author Matthias Ettrich
11 * Full author contact details are available in file CREDITS
17 #include "BufferView.h"
18 #include "funcrequest.h"
22 #include "dimension.h"
23 #include "metricsinfo.h"
25 #include "insets/updatableinset.h"
27 #include "frontends/Painter.h"
28 #include "frontends/mouse_state.h"
30 #include "support/lstrings.h"
35 // Initialization of the counter for the inset id's,
36 unsigned int InsetOld::inset_id = 0;
40 top_x(0), top_baseline(0), scx(0),
41 id_(inset_id++), owner_(0), par_owner_(0),
42 background_color_(LColor::inherit)
46 InsetOld::InsetOld(InsetOld const & in)
48 top_x(0), top_baseline(0), scx(0), id_(in.id_), owner_(0),
49 name_(in.name_), background_color_(in.background_color_)
51 lyxerr << "inset id: " << id_ << std::endl;
55 bool InsetOld::directWrite() const
61 InsetOld::EDITABLE InsetOld::editable() const
67 bool InsetOld::autoDelete() const
74 LyXFont const InsetOld::convertFont(LyXFont const & font) const
85 string const InsetOld::editMessage() const
87 return _("Opened inset");
91 LyXText * InsetOld::getLyXText(BufferView const * bv, bool /*recursive*/) const
94 return owner()->getLyXText(bv, false);
100 void InsetOld::setBackgroundColor(LColor::color color)
102 background_color_ = color;
106 LColor::color InsetOld::backgroundColor() const
108 if (background_color_ == LColor::inherit) {
110 return owner()->backgroundColor();
112 return LColor::background;
114 return background_color_;
118 int InsetOld::id() const
123 void InsetOld::id(int id_arg)
128 void InsetOld::setFont(BufferView *, LyXFont const &, bool, bool)
132 bool InsetOld::forceDefaultParagraphs(InsetOld const * inset) const
135 return owner()->forceDefaultParagraphs(inset);
139 int InsetOld::latexTextWidth(BufferView * bv) const
142 return (owner()->latexTextWidth(bv));
143 return bv->workWidth();
147 int InsetOld::ascent() const
153 int InsetOld::descent() const
159 int InsetOld::width() const