bug-gnustep
[Top][All Lists]
Advanced

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

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


From: David Ayers
Subject: set of text scrolling patches (pageUp:/pageDown:) (+ Bonus ProjectCenter Patch :) )
Date: Sat, 05 Oct 2002 09:58:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

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...
NSScrollView:
- pageUp/Down:  calls scrolllPageUp/Down:
- scrollPageUp/Down: implements scrolling down (originally based on _doScroll:)

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

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

NSTextView:
- 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. :) )

NSFontManager:
- 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.)

ProjectCenter:
... 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.)

Cheers,
Dave

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.



Attachment: Patch.tgz
Description: GNU Unix tar archive


reply via email to

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