Fixes to the text network.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4641 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Michael Silva 1999-07-24 22:24:14 +00:00
parent 679019f7b3
commit a7f52772bc
6 changed files with 879 additions and 257 deletions

View file

@ -1,3 +1,15 @@
1999-07-24 Michael Hanni <mhanni@sprintmail.com>
* Headers/NSTextView.h: redid ivars.
* Source/NSTextView.m: complete rewrite. more methods written.
* Source/GSServicesManager.m: minor temp debug NSlog.
* Source/NSMenuView.m: debug logs.
* Source/NSText.m: debug logs.
Look at core/Testing/gstextnetwork.app. That is the text
application for NSTextView/TextNetwork. Edit.app has been
modified to use NSText directly and not NSTextView.
1999-07-23 Adam Fedor <fedor@gnu.org>
* Model/GMAppKit.m: Added ifndef's to comment out areas of code

View file

@ -2,7 +2,8 @@
* GNUTextView.h
*/
// GNUTextView is a NSText subclass that displays the glyphs laid out in one NSTextContainer.
#ifndef _GNUstep_H_NSTextView
#define _GNUstep_H_NSTextView
#import <AppKit/NSText.h>
#import <AppKit/NSTextAttachment.h>
@ -18,15 +19,32 @@
@interface NSTextView : NSText
{
NSTextContainer *textContainer;
NSColor *insertionPointColor;
BOOL smartInsertDeleteEnabled;
NSSelectionAffinity selectionAffinity;
NSSelectionGranularity selectionGranularity;
NSSize textContainerInset;
NSPoint textContainerOrigin;
NSLayoutManager *layoutManager;
NSTextStorage *textStorage;
NSTextContainer *textContainer;
NSLayoutManager *layoutManager;
NSTextStorage *textStorage;
NSSize textContainerInset;
NSPoint textContainerOrigin;
BOOL tv_resetTextContainerOrigin;
NSColor *tv_backGroundColor;
BOOL tv_drawsBackground;
BOOL tv_shouldDrawInsertionPoint;
BOOL tv_selectable;
BOOL tv_editable;
BOOL tv_fieldEditor;
BOOL tv_acceptDraggedFiles;
BOOL tv_richText;
BOOL tv_usesFontPanel;
BOOL tv_usesRuler;
BOOL tv_rulerVisible;
BOOL tv_smartInsertDelete;
NSRange tv_selectedRange;
NSColor *tv_caretColor;
NSDictionary *tv_selectedTextAttributes;
NSDictionary *tv_markedTextAttributes;
NSDictionary *tv_typingAttributes;
int tv_spellTag;
NSSelectionAffinity tv_selectionAffinity;
NSSelectionGranularity tv_selectionGranularity;
}
/**************************** Initializing ****************************/
@ -201,8 +219,10 @@
- (BOOL)smartInsertDeleteEnabled;
- (void)setSmartInsertDeleteEnabled:(BOOL)flag;
- (NSRange)smartDeleteRangeForProposedRange:(NSRange)proposedCharRange;
- (void)smartInsertForString:(NSString *)pasteString replacingRange:(NSRange)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
- (void)smartInsertForString:(NSString *)aString
replacingRange:(NSRange)charRange
beforeString:(NSString *)beforeString
afterString:(NSString *)afterString;
@end
// Note that all delegation messages come from the first textView
@ -235,3 +255,4 @@ extern NSString *NSTextViewWillChangeNotifyingTextViewNotification;
extern NSString *NSTextViewDidChangeSelectionNotification;
// NSOldSelectedCharacterRange -> NSValue with old range.
#endif

View file

@ -403,6 +403,8 @@ static NSString *disabledName = @".GNUstepDisabled";
NSWindow *resp = [[application keyWindow] firstResponder];
id obj = nil;
NSLog(@"doService: called");
for (i = 0; i <= es; i++)
{
NSString *sendType;

View file

@ -663,14 +663,12 @@ cell do the following */
[self setHighlightedItemIndex: -1];
// if ([selectedCell action] && ![selectedCell target])
if (menuv_menu)
[menuv_menu performActionForItem:
[menuv_items_link objectAtIndex: lastIndex]];
if (menuv_popb)
[menuv_popb performSelector:[selectedCell action] withObject:selectedCell];
// else if ([selectedCell action] && [selectedCell target])
/* If we are a menu */

View file

@ -1190,13 +1190,16 @@ currentCursorY=[self rectForCharacterIndex:NSMaxRange([self selectedRange])].ori
// Handling Events
//
-(void) mouseDown:(NSEvent *)theEvent
{ NSSelectionGranularity granularity= NSSelectByCharacter;
{
NSSelectionGranularity granularity= NSSelectByCharacter;
NSRange chosenRange,prevChosenRange,proposedRange;
NSPoint point,startPoint;
NSEvent *currentEvent;
unsigned startIndex;
BOOL didDragging=NO;
NSLog(@"mouseDown:");
if (!is_selectable) return; // If not selectable then don't recognize the mouse down
[[self window] makeFirstResponder:self];
@ -2058,6 +2061,8 @@ NSLog(@"opti hook 2");
redrawLineRange=[self lineRangeForRect:rect];
NSLog(@"should be drawing text here. No big deal.\n");
if([self drawsBackground]) // clear area under text
{ [[self backgroundColor] set]; NSRectFill(rect);
}

File diff suppressed because it is too large Load diff