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 xo_(0), yo_(0), scx(0), owner_(0),
30 background_color_(LColor::inherit)
34 InsetOld::InsetOld(InsetOld const & in)
36 xo_(0), yo_(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 void InsetOld::setBackgroundColor(LColor_color color)
79 background_color_ = color;
83 LColor_color InsetOld::backgroundColor() const
85 if (background_color_ == LColor::inherit) {
87 return owner()->backgroundColor();
89 return LColor::background;
91 return LColor::color(background_color_);
95 bool InsetOld::forceDefaultParagraphs(InsetOld const * inset) const
98 return owner()->forceDefaultParagraphs(inset);
102 int InsetOld::latexTextWidth(BufferView * bv) const
105 return (owner()->latexTextWidth(bv));
106 return bv->workWidth();
110 int InsetOld::ascent() const
116 int InsetOld::descent() const
122 int InsetOld::width() const
128 bool InsetOld::insetAllowed(InsetOld * in) const
130 return insetAllowed(in->lyxCode());
134 bool InsetOld::checkInsertChar(LyXFont &)
140 int InsetOld::scroll(bool recursive) const
142 if (!recursive || !owner_)
147 bool isEditableInset(InsetOld const * i)
149 return i && i->editable();
153 bool isHighlyEditableInset(InsetOld const * i)
155 return i && i->editable() == InsetOld::HIGHLY_EDITABLE;