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 void InsetOld::setFont(BufferView *, LyXFont const &, bool, bool)
99 bool InsetOld::forceDefaultParagraphs(InsetOld const * inset) const
102 return owner()->forceDefaultParagraphs(inset);
106 int InsetOld::latexTextWidth(BufferView * bv) const
109 return (owner()->latexTextWidth(bv));
110 return bv->workWidth();
114 int InsetOld::ascent() const
120 int InsetOld::descent() const
126 int InsetOld::width() const
132 bool InsetOld::insetAllowed(InsetOld * in) const
134 return insetAllowed(in->lyxCode());
138 bool InsetOld::checkInsertChar(LyXFont &)
144 bool isEditableInset(InsetOld const * i)
146 return i && i->editable();
150 bool isHighlyEditableInset(InsetOld const * i)
152 return i && i->editable() == InsetOld::HIGHLY_EDITABLE;