X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Fupdatableinset.C;h=9ba5820d56e1badcabcb2d92f58469d99237b31a;hb=26f1a5bfcae4b7fd7b946a1884c396d842b24925;hp=7df76d7676d7354abdeff0a34f00a903676ff9f1;hpb=5246fc55833f02361ead8e9ffda215095f894382;p=lyx.git diff --git a/src/insets/updatableinset.C b/src/insets/updatableinset.C index 7df76d7676..9ba5820d56 100644 --- a/src/insets/updatableinset.C +++ b/src/insets/updatableinset.C @@ -1,3 +1,17 @@ +/** + * \file updatableinset.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Alejandro Aguilar Sierra + * \author Jürgen Vigna + * \author Lars Gullik Bjønnes + * \author Matthias Ettrich + * + * Full author contact details are available in file CREDITS + */ + +#include #include "updatableinset.h" #include "BufferView.h" @@ -23,7 +37,7 @@ UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id) void UpdatableInset::insetUnlock(BufferView *) { - lyxerr[Debug::INFO] << "Inset Unlock" << endl; + lyxerr[Debug::INFO] << "Inset Unlock" << std::endl; } @@ -59,8 +73,7 @@ void UpdatableInset::edit(BufferView *, bool) void UpdatableInset::draw(BufferView *, LyXFont const &, - int /* baseline */, float & x, - bool/*cleared*/) const + int /* baseline */, float & x) const { x += float(scx); // ATTENTION: don't do the following here!!! @@ -97,8 +110,6 @@ void UpdatableInset::scroll(BufferView * bv, float s) const if ((tmp_top_x + scx + width(bv, font)) < (workW / 2)) { scx += (workW / 2) - (tmp_top_x + scx + width(bv, font)); } - - // bv->updateInset(const_cast(this), false); } void UpdatableInset::scroll(BufferView * bv, int offset) const @@ -121,7 +132,6 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const scx += offset; } } -// bv->updateInset(const_cast(this), false); } @@ -139,7 +149,7 @@ Inset::RESULT UpdatableInset::localDispatch(FuncRequest const & ev) int const xx = strToInt(ev.argument); scroll(ev.view(), xx); } - ev.view()->updateInset(this, false); + ev.view()->updateInset(this); return DISPATCHED; } @@ -154,7 +164,7 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const w = static_cast (owner())->getMaxWidth(bv, this); } else { - w = bv->text->workWidth(bv, const_cast(this)); + w = bv->text->workWidth(const_cast(this)); } if (w < 0) { return -1; @@ -203,7 +213,7 @@ bool UpdatableInset::nextChange(BufferView * bv, lyx::pos_type &) return false; } - + bool UpdatableInset::searchForward(BufferView * bv, string const &, bool, bool) {