2 * \file updatableinset.C
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.
16 #include "updatableinset.h"
18 #include "BufferView.h"
19 #include "coordcache.h"
22 #include "dispatchresult.h"
23 #include "funcrequest.h"
26 #include "support/convert.h"
28 #include <boost/assert.hpp>
31 // An updatable inset is highly editable by definition
32 InsetBase::EDITABLE UpdatableInset::editable() const
34 return HIGHLY_EDITABLE;
38 int UpdatableInset::scroll(bool) const
44 void UpdatableInset::setScroll(int maxwidth, int offset) const
46 lyxerr << "UpdatableInset::setScroll: (int) " << maxwidth << ' ' <<
49 int const xo_ = theCoords.getInsets().x(this);
51 if (!scx && xo_ >= 20)
53 if (xo_ + offset > 20)
62 if (!scx && xo_ + width() < maxwidth - 20)
65 if (xo_ - scx + offset + width() < maxwidth - 20)
66 scx += maxwidth - width() - xo_ - 20;
73 void UpdatableInset::getCursorDim(int &, int &) const