4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * \author Lars Gullik Bjønnes
10 * \author Matthias Ettrich
12 * Full author contact details are available in file CREDITS.
18 #include "insetbase.h"
19 #include "dimension.h"
26 class InsetOld : public InsetBase {
31 TEXT_TO_INSET_OFFSET = 2
37 InsetOld(InsetOld const & in);
46 void setInsetName(std::string const & s) { name_ = s; }
48 std::string const & getInsetName() const { return name_; }
50 void setOwner(UpdatableInset * inset) { owner_ = inset; }
52 UpdatableInset * owner() const { return owner_; }
54 virtual void setBackgroundColor(LColor_color);
56 LColor_color backgroundColor() const;
57 /// set x/y drawing position cache
58 void setPosCache(PainterInfo const &, int, int) const;
60 int xo() const { return xo_; }
62 int yo() const { return yo_; }
63 /// returns the actual scroll-value
64 virtual int scroll(bool recursive = true) const;
67 bool forceDefaultParagraphs(InsetBase const * inset) const;
76 mutable Dimension dim_;
80 UpdatableInset * owner_;
83 /** We store the LColor::color value as an int to get LColor.h out
86 int background_color_;
90 /** \c InsetOld_code is a wrapper for InsetOld::Code.
91 * It can be forward-declared and passed as a function argument without
92 * having to expose inset.h.
97 InsetOld_code(InsetOld::Code val) : val_(val) {}
98 operator InsetOld::Code() const { return val_; }