Commit: Lots of progress on edittable headers and footers.


Subject: Commit: Lots of progress on edittable headers and footers.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed Mar 07 2001 - 19:36:41 CST


Ok This is a big step. The basic functionality of headers and footers with
multi-paragraphs works. You can enter and edit text in a header/footer on
any page by just clicking in the header/footer region.

Two obvious bugs that I hope Jesper can with are:
1. Press <enter> and the text in front of the cursor drops down a line but
cursor stays on the same line. If you start typing though the cursor drops
down a line. I think this is bug in the cursor positioning code. Can you
look at this Jesper?

2. If you create your header with the last line of your doc an empty
paragraph and position the cursor the cursor before the page number, start
typing nothing happens.

Other big bugs.

Inserting a footer with an active header puts BOTH the header and footer
text in both header/footer containers. I think this is a bug in
tellListener(), if so it would be the first bug I've found in the
PieceTable.

Changing the page margins with a header is flaky. Sometimes the headers
other than the the first and last pages are removed. If this happens we
eventually geta segfault.

Still I'm very confident all this can be fixed and we'll have
Multi-paragraph headers and footers in V 0.90.

For those interested, I implemented a a fl_VirtualContainer subclass of
fp_Container to be owned by HdrFtrSectionLayout. The draw and clearscreen
methods of this are NOPs so it never gets on the page.

Next I made editting operations on any shadow be reflected across all the
shadows by intercepting DocListener calls to shadow sections and
redirecting them to all shadows and the overall HdrFtrSectionLayout.

I put in code to prevent the insertion point moving while changing
the shadows. It only gets updated for changes t the HdrFtrSectionLayout
blocks.

I put in code to draw header/footer container boundaries for "Show
Paragraphs". Show Paragraphs was very helpful in debugging BTW.

Finally I put in code to clip the header/footer at the height of the
container.

Anyway I think code is usuable now. The remaining bugs will be fixed.

Enjoy!

Martin

CVS:
----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src/text/fmt/xp/fl_BlockLayout.cpp
CVS: src/text/fmt/xp/fl_DocListener.cpp
CVS: src/text/fmt/xp/fl_SectionLayout.cpp
CVS: src/text/fmt/xp/fl_SectionLayout.h
CVS: src/text/fmt/xp/fp_Column.cpp src/text/fmt/xp/fp_Column.h
CVS: src/text/fmt/xp/fv_View.cpp src/wp/ap/xp/ap_EditMethods.cpp
CVS:
----------------------------------------------------------------------



This archive was generated by hypermail 2b25 : Wed Mar 07 2001 - 19:36:53 CST