Re: commit: Fix lots of stuff.

Subject: Re: commit: Fix lots of stuff.
From: Martin Sevior (
Date: Fri Feb 01 2002 - 07:16:30 CST

On Fri, 1 Feb 2002, Tomas Frydrych wrote:

> Hi Martin,
> > I got the idea for doing this is a sane way after tracing through the
> > code that caused list elements to flash. There was code in
> > fv_View::_generalUpdate to update every field in the document by
> > scanning every run in the document after every keypress. There were
> > some good ideas in this code, especially the "isLayoutDependent()"
> > method on field runs. I changed the name of this to
> > "needsFrequentUpdates()" and put another bool in fl_BlockLayout
> > "hasUpdatableField()". This is (un)set during a format if there is a
> > field run with "needsFrequentUpdates()" true. Then during the
> > background redraw (which happens every 0.5 seconds) blocks with
> > "HasUpdatableField()" set have a recalculateFields() done on them. If
> > the field width changes on the recalculation, the block is reformated.
> > Anyway it all works rather nicely and scales reasonablly well.
> Sounds very nice; I wish thought of it myself :-).
> > Fields like "Current Time" and "Word Count" have
> > "needsFrequentUpdates()" set true. Fields like "date", "page number"
> > and "liast label" do not.
> Except the "page number" field is layout dependent and should
> update if as a result of layout changes it moves onto a different
> page. The reason I added the layout rescanning code was that
> fields such as "page reference" would not reliably update. I think
> what we still need is "updateFields" method in
> ap_EditMethods.cpp, that the user could call to update all fields in
> the document, and would be automatically called (or better, based
> on preference settings) before printing.

It is taken care of in printing automatically because an entire layout
structure is created with the printer graphics context in
place. Everything is updated and correctly formatted. It's a "snapshot" of
the current layout. I wasn't sure if "page number" field should be a
"frequently" updated field or not. I guess I didn't do it because then all
the headers and footers fields with page numbers would be redrawn every
0.5 seconds.

I'm not quite sure what to do about this.



This archive was generated by hypermail 2b25 : Fri Feb 01 2002 - 07:16:44 CST