Re: [patch] Show Paragraphs


Subject: Re: [patch] Show Paragraphs
From: Paul Rohr (paul@abisource.com)
Date: Wed Mar 22 2000 - 20:28:16 CST


At 09:56 PM 3/21/00 +0100, Michael Vogt wrote:
>Here is a new version of my "Show Paragraph" patch. It is still incomplete
>and basicly with the same features/drawbacks as my first version. Sorry
>for this, I had exams the last 5 weeks.
>The patch is cleaned up, conform to the abiword-coding-guidlines and stores
>the "ShowParagraph" bool on a per-frame basis.

Thanks for the patch. I especially appreciated the way you left specific
FIXME comments for the following issues:

1. Add #defines for the appropriate UCS_ symbols to ut_types.h to remove
the existing assumptions about specific Latin-1 characters.

2. Make the setting frame-persistent using a similar mechanism to the one
used for View Ruler.

Two additional questions that weren't clear from the original patch:

3. How much testing of the update logic were you able to do? Does
everything get erased properly, or does that logic need more work? The
three cases where problems usually arise include:

  a. toggling this setting
  b. restacking partially-covered windows
  c. scrolling

4. Likewise, do you really need to call pView->draw() from the edit method,
or is that overkill? Obviously, the view needs to be updated *any* time
this setting changes, and we generally avoid calling draw from outside the
view.

>But still no nice "P" at the
>end of the lines. I am still not sure how to implement this. I played around
>with a new Run (showParagraphRun() ), but without much success. If someone
>is interessed in helping, I would be more than happy (I am a bit short in
>time, currently).

Yeah, this one will be more work. When we originally implemented editing
back in 0.1.1 we had to do a *lot* of messing around to deal with the fact
that there was *not* a selectable DocPos at block boundaries.

Most word processors act as if there really was a special character there --
ie, at the *end* of each block -- which either renders as a blank or as the
funky P character. This actually provides some nice GUI feedback -- select
and delete that "character" and you'll merge the two adjoining paragraphs.

(Our current GUI solution has done a lot of work to differentiate between
the end of one line and the beginning of the next one, but this is one case
we still don't handle smoothly enough.)

To achieve a similar effect, I'm fairly certain that we'll need to dive into
the piece table to make each strux one DocPosition wider. See the original
POW for more details:

  http://www.abisource.com/mailinglists/abiword-dev/99/December/0315.html

Anyone interested in tackling this who needs more pointers to the
appropriate spots in the editing code should let me know.

Paul



This archive was generated by hypermail 2b25 : Wed Mar 22 2000 - 20:22:44 CST