[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Kword gui code done for PageUp - PageDown
From:       John Califf <jcaliff () usit ! net>
Date:       2000-09-18 3:16:05
[Download RAW message or body]

I've recently finished coding and testing some much needed functionality
for KWord, namely PageUp and PageDown message handling for quick page
scrolling. This involves changes to kword_page.h and kword_page.cc, two
new methods to stay consistent with existing keystroke message handling
there.  

What this does is to do what most people expect, scroll the current view
(actually the current frame) by one viewport height up or down, taking
into account the top margin for the document.  The cursor position is
reset also, and it will select all the text in between if you have the
SHIFT key down. Without this functionality I don't see how anyone could
use KWord, or would want to, having to scroll with the arrow keys one
line at a time.  

There are some limitations:  It's based on the current *frame*, not
page, so it will scroll within that frame on multiple pages, to the next
or prior page on which that frame appears, continuously.  If the frame
is nested you still have to use the mouse to click on the outer frame,
etc., and then use page up or page down keys to get to top or bottom of
document, one screen or viewport width at time, as with most any editor.
It's very fast. 

To overcome frame limitation or box-in I suggest a new key function, to
traverse up or down the frameset tree and I'd like to use either Control
+ > and Control + < or Alt and the <> keys, which seems very
intutitive.  This would allow quick traversal of the entire document
without having to use the mouse at all.  So, if you are in a deeply
nested frame, or come to a hard frame break, hit Control + < to get to
the outer frames one at a time, then use pageup or down keys, etc. 
Likewse, Control + > will take you to the next frame in the frameset and
so on, or cross the hard break going down.  (Note - frame traversal has
not been coded yet - only the page scrolling).

I need help on how to submit the patch (being new at Kde development). 
Currently I have an unaltered copy of the two files from the snapshots
(exactly the same as what's on cvs as they haven't been changed) and my
changed versions.  All I know to do is attach a text file with the
diffs:   

             diff -c original myversion > xxx.diff.   

Someone who has cvs permission (Werner?) will have to review my changes
and then commit them or explain what format to submit my changes in for
review.   

I've noticed that KWord currently doesn't take into account the height
and width of the scroll bars when calculating the view, which causes the
cursor to appear under the scrollbar on the bottom line. This can be
fixed with visibleHeight() instead of height() in several places.  I
believe this is responsible for several frame/page overlap problems
which can cause savefile corruption and will look into it.

By the way, on my now substandard box it takes a full 15 minutes to
compile kword_page.cc, which is already over 200,000 bytes in size, the
largest source code file in all of Kde.  Unfortunately, it will only get
bigger temporarily.  Some optimizations to cosolidate code are needed,
later.

Thank you and let me know how to submit changes,  John

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic