From 1461dc196f03d11b0aa8dba21ca8b3d5678bcfb1 Mon Sep 17 00:00:00 2001 From: Robert Slover Date: Mon, 29 Jan 2001 12:17:24 +0000 Subject: [PATCH] new textview code required some changes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@8870 72102866-910b-0410-8b05-ffd578937521 --- PCLib/PCEditorView.m | 3 +++ PCLib/PCProjectBuilder.m | 16 +++++++++++++++- PCLib/PCServer.m | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/PCLib/PCEditorView.m b/PCLib/PCEditorView.m index 316c25b..7b434ee 100644 --- a/PCLib/PCEditorView.m +++ b/PCLib/PCEditorView.m @@ -26,6 +26,7 @@ #import "PCEditorView.h" +#define COLOURISE 0 #define SCANLOC [scanner scanLocation] @implementation PCEditorView @@ -77,7 +78,9 @@ static BOOL isInitialised = NO; scanner = [[NSScanner alloc] initWithString:aString]; [super setString:aString]; +#ifdef COLOURISE [self colourise:self]; +#endif COLOURISE } - (void)colourise:(id)sender diff --git a/PCLib/PCProjectBuilder.m b/PCLib/PCProjectBuilder.m index d692ff5..7d4b56c 100644 --- a/PCLib/PCProjectBuilder.m +++ b/PCLib/PCProjectBuilder.m @@ -83,6 +83,13 @@ [logOutput setBackgroundColor:[NSColor lightGrayColor]]; [[logOutput textContainer] setWidthTracksTextView:YES]; [[logOutput textContainer] setHeightTracksTextView:YES]; + [logOutput setHorizontallyResizable: NO]; + [logOutput setVerticallyResizable: YES]; + [logOutput setMinSize: NSMakeSize (0, 0)]; + [logOutput setMaxSize: NSMakeSize (1E7, 1E7)]; + [[logOutput textContainer] setContainerSize: + NSMakeSize ([logOutput frame].size.width,1e7)]; + [[logOutput textContainer] setWidthTracksTextView:YES]; [scrollView1 setDocumentView:logOutput]; @@ -104,8 +111,15 @@ [errorOutput setSelectable:YES]; [errorOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; [errorOutput setBackgroundColor:[NSColor whiteColor]]; + [errorOutput setHorizontallyResizable: NO]; + [errorOutput setVerticallyResizable: YES]; + [errorOutput setMinSize: NSMakeSize (0, 0)]; + [errorOutput setMaxSize: NSMakeSize (1E7, 1E7)]; + [[errorOutput textContainer] setContainerSize: + NSMakeSize ([errorOutput frame].size.width, 1e7)]; + [[errorOutput textContainer] setWidthTracksTextView:YES]; - [[errorOutput textContainer] setHeightTracksTextView:YES]; + //[[errorOutput textContainer] setHeightTracksTextView:YES]; [scrollView2 setDocumentView:errorOutput]; diff --git a/PCLib/PCServer.m b/PCLib/PCServer.m index 4fbbe0e..f68a270 100644 --- a/PCLib/PCServer.m +++ b/PCLib/PCServer.m @@ -122,6 +122,7 @@ [window setTitle:aFile]; textView = [[PCEditorView alloc] initWithFrame:NSMakeRect(0,0,498,306)]; + [textView setMinSize: NSMakeSize (0, 0)]; [textView setMaxSize:NSMakeSize(1e7, 1e7)]; [textView setRichText:NO]; [textView setEditable:NO]; @@ -130,6 +131,8 @@ [textView setHorizontallyResizable:NO]; [textView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; [textView setBackgroundColor:[NSColor whiteColor]]; + [[textView textContainer] setContainerSize: + NSMakeSize ([textView frame].size.width,1e7)]; [[textView textContainer] setWidthTracksTextView:YES]; scrollView = [[NSScrollView alloc] initWithFrame:NSMakeRect (-1,-1,514,322)];