X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finset.C;h=6f7fc7d1c73236e198b85b15ba312e182b8a902c;hb=c5c7a9e56854dea886977f8e11cbfe31d8a7464f;hp=24db8ed9465b8f8c926bd46a5b9caa0fbcac64be;hpb=2e57f2ff0ae7cd4a6efbf634ffe6d2f4379d9cfc;p=lyx.git diff --git a/src/insets/inset.C b/src/insets/inset.C index 24db8ed946..6f7fc7d1c7 100644 --- a/src/insets/inset.C +++ b/src/insets/inset.C @@ -8,48 +8,35 @@ * \author Lars Gullik Bjønnes * \author Matthias Ettrich * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #include #include "inset.h" +#include "updatableinset.h" + #include "BufferView.h" -#include "funcrequest.h" #include "gettext.h" -#include "lyxfont.h" -#include "lyxtext.h" -#include "dimension.h" -#include "metricsinfo.h" - -#include "insets/updatableinset.h" - -#include "frontends/Painter.h" -#include "frontends/mouse_state.h" - -#include "support/lstrings.h" -#include "debug.h" - // Initialization of the counter for the inset id's, unsigned int InsetOld::inset_id = 0; InsetOld::InsetOld() : InsetBase(), top_x(0), top_baseline(0), scx(0), - id_(inset_id++), owner_(0), par_owner_(0), + id_(inset_id++), owner_(0), background_color_(LColor::inherit) {} InsetOld::InsetOld(InsetOld const & in) : InsetBase(), - top_x(0), top_baseline(0), scx(0), id_(in.id_), owner_(0), + top_x(0), top_baseline(0), scx(0), + id_(in.id_), owner_(0), name_(in.name_), background_color_(in.background_color_) -{ - lyxerr << "inset id: " << id_ << std::endl; -} +{} bool InsetOld::directWrite() const @@ -160,3 +147,28 @@ int InsetOld::width() const { return dim_.wid; } + + +bool InsetOld::insetAllowed(InsetOld * in) const +{ + return insetAllowed(in->lyxCode()); +} + + +bool InsetOld::checkInsertChar(LyXFont &) +{ + return false; +} + + +bool isEditableInset(InsetOld const * i) +{ + return i && i->editable(); +} + + +bool isHighlyEditableInset(InsetOld const * i) +{ + return i && i->editable() == InsetOld::HIGHLY_EDITABLE; +} +