Re: update(), second try
Andre Poenitz [EMAIL PROTECTED] writes: | Index: rowpainter.C Ok, I will try this out later tonight. (Sorry that I cannot test it earlier.) -- Lgb
Re: update(), second try
On Tue, Jun 03, 2003 at 05:25:48PM +0200, Lars Gullik Bjønnes wrote: Andre Poenitz [EMAIL PROTECTED] writes: | Index: rowpainter.C Ok, I will try this out later tonight. (Sorry that I cannot test it earlier.) Fine with me. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
Re: update(), second try
Andre Poenitz <[EMAIL PROTECTED]> writes: | Index: rowpainter.C Ok, I will try this out later tonight. (Sorry that I cannot test it earlier.) -- Lgb
Re: update(), second try
On Tue, Jun 03, 2003 at 05:25:48PM +0200, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > | Index: rowpainter.C > > Ok, I will try this out later tonight. (Sorry that I cannot test it > earlier.) Fine with me. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
update(), second try
Index: rowpainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.18 diff -u -p -r1.18 rowpainter.C --- rowpainter.C30 May 2003 06:48:20 - 1.18 +++ rowpainter.C3 Jun 2003 07:03:47 - @@ -105,7 +105,12 @@ void RowPainter::paintInset(pos_type con lyx::Assert(inset); #warning inset-update FIXME - inset-update(perv(bv_), false); + //inset-update(perv(bv_), false); + MetricsInfo mi; + mi.base.bv = perv(bv_); + mi.base.font = getFont(pos); + Dimension dim; + inset-metrics(mi, dim); PainterInfo pi(perv(bv_)); pi.base.font = getFont(pos); @@ -291,8 +296,6 @@ void RowPainter::paintFromPos(pos_type } paintForeignMark(orig_x, orig_font); - - return; } Index: text.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.365 diff -u -p -r1.365 text.C --- text.C 28 May 2003 16:36:53 - 1.365 +++ text.C 3 Jun 2003 07:03:47 - @@ -310,7 +310,7 @@ int LyXText::singleWidth(ParagraphList:: // this IS needed otherwise on initialitation we don't get the fill // of the row right (ONLY on initialization if we read a file!) // should be changed! (Jug 20011204) - tmpinset-update(bv()); + //tmpinset-update(bv()); #endif return tmpinset-width(bv(), font); } @@ -1071,7 +1071,7 @@ void LyXText::setHeightOfRow(RowList::it if (tmpinset) { #if 1 // this is needed for deep update on initialitation #warning inset-update FIXME - tmpinset-update(bv()); + //tmpinset-update(bv()); #endif maxwidth += tmpinset-width(bv(), tmpfont); maxasc = max(maxasc, Index: insets/inset.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v retrieving revision 1.98 diff -u -p -r1.98 inset.h --- insets/inset.h 2 Jun 2003 16:14:33 - 1.98 +++ insets/inset.h 3 Jun 2003 07:03:47 - @@ -161,8 +161,8 @@ public: /// int width(BufferView *, LyXFont const ) const; /// update the inset representation - virtual void update(BufferView *, bool = false) - {} + //virtual void update(BufferView *, bool = false) + // {} /// what appears in the minibuffer when opening virtual string const editMessage() const; /// Index: insets/insetcollapsable.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.147 diff -u -p -r1.147 insetcollapsable.C --- insets/insetcollapsable.C 2 Jun 2003 10:03:22 - 1.147 +++ insets/insetcollapsable.C 3 Jun 2003 07:03:47 - @@ -285,7 +285,7 @@ int InsetCollapsable::docbook(Buffer con return inset.docbook(buf, os, mixcont); } - +/* void InsetCollapsable::update(BufferView * bv, bool reinit) { if (in_update) { @@ -301,6 +301,7 @@ void InsetCollapsable::update(BufferView } in_update = false; } +*/ Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const cmd) Index: insets/insetert.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v retrieving revision 1.128 diff -u -p -r1.128 insetert.C --- insets/insetert.C 2 Jun 2003 10:03:22 - 1.128 +++ insets/insetert.C 3 Jun 2003 07:03:47 - @@ -456,7 +456,7 @@ Inset::RESULT InsetERT::localDispatch(Fu t-need_break_row = t-rows().begin(); t-fullRebreak(); t-setCursorIntern(t-cursor.par(), t-cursor.pos()); - inset.update(cmd.view(), true); + //inset.update(cmd.view(), true); bv-updateInset(this); result = DISPATCHED; } @@ -674,7 +674,7 @@ void InsetERT::update(BufferView * bv, b setButtonLabel(); } - InsetCollapsable::update(bv, reinit); + //InsetCollapsable::update(bv, reinit); } Index: insets/insetinclude.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetinclude.C,v retrieving revision 1.120 diff -u -p -r1.120 insetinclude.C --- insets/insetinclude.C 2 Jun 2003 10:03:22 - 1.120 +++ insets/insetinclude.C 3 Jun 2003 07:03:47 - @@ -536,14 +536,7 @@ void InsetInclude::draw(PainterInfo pi if
update(), second try
Index: rowpainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.18 diff -u -p -r1.18 rowpainter.C --- rowpainter.C30 May 2003 06:48:20 - 1.18 +++ rowpainter.C3 Jun 2003 07:03:47 - @@ -105,7 +105,12 @@ void RowPainter::paintInset(pos_type con lyx::Assert(inset); #warning inset->update FIXME - inset->update(perv(bv_), false); + //inset->update(perv(bv_), false); + MetricsInfo mi; + mi.base.bv = perv(bv_); + mi.base.font = getFont(pos); + Dimension dim; + inset->metrics(mi, dim); PainterInfo pi(perv(bv_)); pi.base.font = getFont(pos); @@ -291,8 +296,6 @@ void RowPainter::paintFromPos(pos_type & } paintForeignMark(orig_x, orig_font); - - return; } Index: text.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.365 diff -u -p -r1.365 text.C --- text.C 28 May 2003 16:36:53 - 1.365 +++ text.C 3 Jun 2003 07:03:47 - @@ -310,7 +310,7 @@ int LyXText::singleWidth(ParagraphList:: // this IS needed otherwise on initialitation we don't get the fill // of the row right (ONLY on initialization if we read a file!) // should be changed! (Jug 20011204) - tmpinset->update(bv()); + //tmpinset->update(bv()); #endif return tmpinset->width(bv(), font); } @@ -1071,7 +1071,7 @@ void LyXText::setHeightOfRow(RowList::it if (tmpinset) { #if 1 // this is needed for deep update on initialitation #warning inset->update FIXME - tmpinset->update(bv()); + //tmpinset->update(bv()); #endif maxwidth += tmpinset->width(bv(), tmpfont); maxasc = max(maxasc, Index: insets/inset.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v retrieving revision 1.98 diff -u -p -r1.98 inset.h --- insets/inset.h 2 Jun 2003 16:14:33 - 1.98 +++ insets/inset.h 3 Jun 2003 07:03:47 - @@ -161,8 +161,8 @@ public: /// int width(BufferView *, LyXFont const &) const; /// update the inset representation - virtual void update(BufferView *, bool = false) - {} + //virtual void update(BufferView *, bool = false) + // {} /// what appears in the minibuffer when opening virtual string const editMessage() const; /// Index: insets/insetcollapsable.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.147 diff -u -p -r1.147 insetcollapsable.C --- insets/insetcollapsable.C 2 Jun 2003 10:03:22 - 1.147 +++ insets/insetcollapsable.C 3 Jun 2003 07:03:47 - @@ -285,7 +285,7 @@ int InsetCollapsable::docbook(Buffer con return inset.docbook(buf, os, mixcont); } - +/* void InsetCollapsable::update(BufferView * bv, bool reinit) { if (in_update) { @@ -301,6 +301,7 @@ void InsetCollapsable::update(BufferView } in_update = false; } +*/ Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd) Index: insets/insetert.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v retrieving revision 1.128 diff -u -p -r1.128 insetert.C --- insets/insetert.C 2 Jun 2003 10:03:22 - 1.128 +++ insets/insetert.C 3 Jun 2003 07:03:47 - @@ -456,7 +456,7 @@ Inset::RESULT InsetERT::localDispatch(Fu t->need_break_row = t->rows().begin(); t->fullRebreak(); t->setCursorIntern(t->cursor.par(), t->cursor.pos()); - inset.update(cmd.view(), true); + //inset.update(cmd.view(), true); bv->updateInset(this); result = DISPATCHED; } @@ -674,7 +674,7 @@ void InsetERT::update(BufferView * bv, b setButtonLabel(); } - InsetCollapsable::update(bv, reinit); + //InsetCollapsable::update(bv, reinit); } Index: insets/insetinclude.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetinclude.C,v retrieving revision 1.120 diff -u -p -r1.120 insetinclude.C --- insets/insetinclude.C 2 Jun 2003 10:03:22 - 1.120 +++ insets/insetinclude.C 3 Jun 2003 07:03:47 - @@ -536,14 +536,7 @@ void InsetInclude::draw(PainterInfo & pi if