[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set of text scrolling patches (pageUp:/pageDown:) (+ Bonus ProjectCe

From: David Ayers
Subject: Re: set of text scrolling patches (pageUp:/pageDown:) (+ Bonus ProjectCenter Patch :) )
Date: Tue, 08 Oct 2002 01:00:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Philippe C.D. Robert wrote:

Hi David,

I did just apply your patch for ProjectCenter (with some minor cosmetic changes). Thanks!

Thank you!

Because there were also some other issues that turned up with my original patch, I went ahead and rewrote NSTextView's moveDown: moveUp: pageDown: and pageUp: from scratch, again with important pointers coming from Alexander Malmberg (thanks again)! Now there is no dependancy on the _charIndexForInsertPointMovingFromY:bestX:up:textContainer: any more. All processing is done with the standard API to NSLayoutManager. It should even support NSTextContainer subclasses with holes (eventhough this is untested).

This is an all in one patch against the current CVS...


NSLayoutManager.h/.m & GSSimpleLayoutManager.m
- removed _charIndexForInsertPointMovingFromY:bestX:up:textContainer:

- implementations of pageUp:/Down: & scrollPageUp:/Down: (same as in last patch)

- reimplemented moveUp:/Down: & pageUp:/Down:
Please take note that this implemetation of pageUp:/Down tries to preserve the horizontal postion and the vertical postion +/- scroll delta. This is unlike (but in my opinion and improvement to) the behavior of OPENSTEP 4.2, as it niether preserves the horizontal postion (set it to 0) nor the vertical postion in the visible rect (on pageDown: the insertion point is in the top left corner and on pageUp: it's in the bottom left corner of the scrolled view).

- changed keyEquiv for font panel from "f" to "T". (as in NeXTSTEP / OPENSTEP)


Attachment: NSTextViewScrollingRevised.patch.gz
Description: application/gunzip

reply via email to

[Prev in Thread] Current Thread [Next in Thread]