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.C 30 May 2003 06:48:20 -0000 1.18
+++ rowpainter.C 3 Jun 2003 15:17:11 -0000
@@ -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 -0000 1.365
+++ text.C 3 Jun 2003 15:17:12 -0000
@@ -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.99
diff -u -p -r1.99 inset.h
--- insets/inset.h 3 Jun 2003 15:10:08 -0000 1.99
+++ insets/inset.h 3 Jun 2003 15:17:12 -0000
@@ -160,9 +160,6 @@ public:
int descent(BufferView *, LyXFont const &) const;
///
int width(BufferView *, LyXFont const &) const;
- /// update the inset representation
- 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 -0000 1.147
+++ insets/insetcollapsable.C 3 Jun 2003 15:17:12 -0000
@@ -286,23 +286,6 @@ int InsetCollapsable::docbook(Buffer con
}
-void InsetCollapsable::update(BufferView * bv, bool reinit)
-{
- if (in_update) {
- if (reinit && owner()) {
- owner()->update(bv, true);
- }
- return;
- }
- in_update = true;
- inset.update(bv, reinit);
- if (reinit && owner()) {
- owner()->update(bv, true);
- }
- in_update = false;
-}
-
-
Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
{
//lyxerr << "InsetCollapsable::localDispatch: " << cmd.action << "\n";
Index: insets/insetcollapsable.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.h,v
retrieving revision 1.109
diff -u -p -r1.109 insetcollapsable.h
--- insets/insetcollapsable.h 2 Jun 2003 10:03:22 -0000 1.109
+++ insets/insetcollapsable.h 3 Jun 2003 15:17:12 -0000
@@ -51,8 +51,6 @@ public:
/// draw, either inlined (no button) or collapsed/open
void draw(PainterInfo & pi, int x, int y, bool inlined) const;
///
- void update(BufferView *, bool = false);
- ///
EDITABLE editable() const;
///
bool insertInset(BufferView *, Inset * inset);
Index: insets/insetert.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v
retrieving revision 1.129
diff -u -p -r1.129 insetert.C
--- insets/insetert.C 3 Jun 2003 15:10:08 -0000 1.129
+++ insets/insetert.C 3 Jun 2003 15:17:12 -0000
@@ -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;
}
@@ -644,8 +644,7 @@ InsetERT::selectNextWordToSpellcheck(Buf
void InsetERT::getDrawFont(LyXFont & font) const
{
- LyXFont f(LyXFont::ALL_INHERIT, latex_language);
- font = f;
+ font = LyXFont(LyXFont::ALL_INHERIT, latex_language);
font.setFamily(LyXFont::TYPEWRITER_FAMILY);
font.setColor(LColor::latex);
}
@@ -664,17 +663,6 @@ int InsetERT::getMaxWidth(BufferView * b
if (text->rows().size() == 1 && rw < w)
return -1;
return w;
-}
-
-
-void InsetERT::update(BufferView * bv, bool reinit)
-{
- if (inset.need_update & InsetText::INIT ||
- inset.need_update & InsetText::FULL) {
- setButtonLabel();
- }
-
- InsetCollapsable::update(bv, reinit);
}
Index: insets/insetert.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.h,v
retrieving revision 1.75
diff -u -p -r1.75 insetert.h
--- insets/insetert.h 3 Jun 2003 15:10:08 -0000 1.75
+++ insets/insetert.h 3 Jun 2003 15:17:12 -0000
@@ -114,8 +114,6 @@ public:
}
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
- ///
- void update(BufferView *, bool =false);
private:
///
Index: insets/insetinclude.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetinclude.C,v
retrieving revision 1.121
diff -u -p -r1.121 insetinclude.C
--- insets/insetinclude.C 3 Jun 2003 15:10:11 -0000 1.121
+++ insets/insetinclude.C 3 Jun 2003 15:17:13 -0000
@@ -528,14 +528,7 @@ void InsetInclude::draw(PainterInfo & pi
if (!preview_->monitoring())
preview_->startMonitoring();
- Dimension dim;
- MetricsInfo mi;
- mi.base.bv = pi.base.bv;
- mi.base.font = pi.base.font;
- metrics(mi, dim);
- dim_ = dim;
-
- pi.pain.image(x, y - dim.asc, dim.wid, dim.height(),
+ pi.pain.image(x, y - dim_.asc, dim_.wid, dim_.height(),
*(preview_->pimage()->image()));
}
Index: insets/insetminipage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetminipage.C,v
retrieving revision 1.77
diff -u -p -r1.77 insetminipage.C
--- insets/insetminipage.C 3 Jun 2003 15:10:11 -0000 1.77
+++ insets/insetminipage.C 3 Jun 2003 15:17:13 -0000
@@ -121,7 +121,7 @@ dispatch_result InsetMinipage::localDisp
LyXText * t = inset.getLyXText(cmd.view());
t->need_break_row = t->rows().begin();
t->fullRebreak();
- inset.update(cmd.view(), true);
+ //inset.update(cmd.view(), true);
t->setCursorIntern(t->cursor.par(), t->cursor.pos());
cmd.view()->updateInset(this);
return DISPATCHED;
Index: insets/insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.285
diff -u -p -r1.285 insettabular.C
--- insets/insettabular.C 3 Jun 2003 15:10:11 -0000 1.285
+++ insets/insettabular.C 3 Jun 2003 15:17:13 -0000
@@ -249,9 +249,9 @@ void InsetTabular::read(Buffer const * b
}
-void InsetTabular::metrics(MetricsInfo &,
- Dimension & dim) const
+void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
{
+ calculate_dimensions_of_cells(mi.base.bv, true);
dim.asc = tabular->GetAscentOfRow(0);
dim.des = tabular->GetHeightOfTabular() - tabular->GetAscentOfRow(0) + 1;
dim.wid = tabular->GetWidthOfTabular() + 2 * ADD_TO_TABULAR_WIDTH;
@@ -388,7 +388,7 @@ void InsetTabular::drawCellSelection(Pai
}
}
-
+/*
void InsetTabular::update(BufferView * bv, bool reinit)
{
if (in_update) {
@@ -434,6 +434,7 @@ void InsetTabular::update(BufferView * b
}
in_update = false;
}
+*/
string const InsetTabular::editMessage() const
@@ -1291,8 +1292,8 @@ bool InsetTabular::calculate_dimensions_
continue;
++cell;
inset = tabular->GetCellInset(cell);
- if (!reinit && !tabular->GetPWidth(cell).zero())
- inset->update(bv, false);
+ //if (!reinit && !tabular->GetPWidth(cell).zero())
+ // inset->update(bv, false);
maxAsc = max(maxAsc, inset->ascent(bv, font));
maxDesc = max(maxDesc, inset->descent(bv, font));
changed = tabular->SetWidthOfCell(cell, inset->width(bv,
font)) || changed;
Index: insets/insettabular.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.h,v
retrieving revision 1.123
diff -u -p -r1.123 insettabular.h
--- insets/insettabular.h 3 Jun 2003 15:10:12 -0000 1.123
+++ insets/insettabular.h 3 Jun 2003 15:17:13 -0000
@@ -90,8 +90,6 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
- void update(BufferView *, bool = false);
- ///
string const editMessage() const;
//
void insetUnlock(BufferView *);
Index: insets/insettext.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.405
diff -u -p -r1.405 insettext.C
--- insets/insettext.C 3 Jun 2003 15:10:12 -0000 1.405
+++ insets/insettext.C 3 Jun 2003 15:17:14 -0000
@@ -422,7 +422,7 @@ void InsetText::draw(PainterInfo & pi, i
void InsetText::drawFrame(Painter & pain, int x) const
{
- static int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
+ int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
frame_x = x + ttoD2;
frame_y = top_baseline - dim_.asc + ttoD2;
frame_w = dim_.wid - TEXT_TO_INSET_OFFSET;
@@ -432,6 +432,7 @@ void InsetText::drawFrame(Painter & pain
}
+/*
void InsetText::update(BufferView * bv, bool reinit)
{
if (in_update) {
@@ -492,6 +493,7 @@ void InsetText::update(BufferView * bv,
old_max_width = nw;
}
}
+*/
void InsetText::setUpdateStatus(BufferView * bv, int what) const
Index: insets/insettext.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.h,v
retrieving revision 1.167
diff -u -p -r1.167 insettext.h
--- insets/insettext.h 3 Jun 2003 15:10:13 -0000 1.167
+++ insets/insettext.h 3 Jun 2003 15:17:15 -0000
@@ -93,8 +93,6 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
- void update(BufferView *, bool = false);
- ///
void setUpdateStatus(BufferView *, int what) const;
///
string const editMessage() const;