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 "updatableinset.h"
19 #include "BufferView.h"
29 top_x(0), top_baseline(0), scx(0), owner_(0),
30 background_color_(LColor::inherit)
34 InsetOld::InsetOld(InsetOld const & in)
36 top_x(0), top_baseline(0), scx(0), owner_(0),
37 name_(in.name_), background_color_(in.background_color_)
41 bool InsetOld::directWrite() const
47 InsetOld::EDITABLE InsetOld::editable() const
53 bool InsetOld::autoDelete() const
60 LyXFont const InsetOld::convertFont(LyXFont const & font) const
71 string const InsetOld::editMessage() const
73 return _("Opened inset");
77 LyXText * InsetOld::getLyXText(BufferView const * bv, bool /*recursive*/) const
80 return owner()->getLyXText(bv, false);
86 void InsetOld::setBackgroundColor(LColor_color color)
88 background_color_ = color;
92 LColor_color InsetOld::backgroundColor() const
94 if (background_color_ == LColor::inherit) {
96 return owner()->backgroundColor();
98 return LColor::background;
100 return LColor::color(background_color_);
104 void InsetOld::setFont(BufferView *, LyXFont const &, bool, bool)
108 bool InsetOld::forceDefaultParagraphs(InsetOld const * inset) const
111 return owner()->forceDefaultParagraphs(inset);
115 int InsetOld::latexTextWidth(BufferView * bv) const
118 return (owner()->latexTextWidth(bv));
119 return bv->workWidth();
123 int InsetOld::ascent() const
129 int InsetOld::descent() const
135 int InsetOld::width() const
141 bool InsetOld::insetAllowed(InsetOld * in) const
143 return insetAllowed(in->lyxCode());
147 bool InsetOld::checkInsertChar(LyXFont &)
153 bool isEditableInset(InsetOld const * i)
155 return i && i->editable();
159 bool isHighlyEditableInset(InsetOld const * i)
161 return i && i->editable() == InsetOld::HIGHLY_EDITABLE;