[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: Philippe C . D . Robert
Subject: Re: set of text scrolling patches (pageUp:/pageDown:) (+ Bonus ProjectCenter Patch :) )
Date: Sun, 6 Oct 2002 16:19:30 +0200

Hi David,

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


On Samstag, Oktober 5, 2002, at 09:58  Uhr, David Ayers wrote:

Hello Phil,
Hello Everyone,

with the help from the folks on #GNUstep, especially Alexander Malmberg and Piere-Yves Rivaille, I've flushed out a first implementation of pageUp:/pageDown: for NSTextView / NScrollView and fixed a couple of other issues in moveUp:/moveDown:

There are still issues that I might return to later but I'll be working on a different project a bit now, so I've decided to drop what I have. I think it makes the text handling in ProjectCenter a lot nicer, especially if you also apply the PC.patch.

OK here's what I did...
- pageUp/Down:  calls scrolllPageUp/Down:
- scrollPageUp/Down: implements scrolling down (originally based on _doScroll:)

- changed _charIndexForInsertionPointMovingFromY:bestX:*up*:textContainer: to _charIndexForInsertionPointMovingFromY:bestX:*lines*:textContainer:

- changed _charIndexForInsertionPointMovingFromY:bestX:lines:textContainer: to support lines - fixed part of the binary tree walk in glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:

- fixed moveUp:/Down: to correctly position horizontal insertion point and convert them to use the changed _charIndexForInsertionPointMovingFromY:... method. - implemented pageUp:/Down: using enclosingScrollView to scroll and change the selection (originally based on moveUp:/moveDown:; I had to privately declare GSSimpleLayoutManager's lineLayoutIndexForPoint as I needed it for correctly paging. Once I understand the layout manager better, I'll try to convert to using standard methods, unless someone who already understands it experiences the need to fix it. :) )

- corrected key equiv to use T instead of f for the Font Panel. (This was actually for my ProjectCenter patch which uses d f g for finding.)

... Phil, this patch supersedes the patch I sent earlier, but there are only minor differences. (but a different format, as I forgot the -u in the last one.)


PS: Like I said there as still some issues (moving/paging up/down while changing the selection to start with, plus reworking the movement to use standard NSLayoutManager API if possible.) If anyone feels like they want to jump in, please let me know, as I've got to move to different construction site right now.

Philippe C.D. Robert

reply via email to

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