diff --git a/ChangeLog b/ChangeLog index 572ea8b82..f4318b377 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ <<<<<<< ChangeLog +Tues Aug 4 1998 Felipe A. Rodriguez + + * NSSplitView in initWithFrame changed default back color to light gray. + * NSSavePanel modified to inherit from NSPanel per OS spec. + +Sun Aug 2 1998 Felipe A. Rodriguez + + * NSText implemented setFont. + * NSText fixed setUsesFontPanel. + * NSText reformatted code again in certain places. + Sat Aug 1 1998 Felipe A. Rodriguez * NSText in setText modified to use ASSIGN macro. diff --git a/Headers/gnustep/gui/NSSavePanel.h b/Headers/gnustep/gui/NSSavePanel.h index 932d78b50..fdc0a64d3 100644 --- a/Headers/gnustep/gui/NSSavePanel.h +++ b/Headers/gnustep/gui/NSSavePanel.h @@ -30,6 +30,7 @@ #define _GNUstep_H_NSSavePanel #include +#include @class NSString; @class NSView; @@ -46,9 +47,7 @@ enum { NSFileHandlingPanelDiskEjectButton }; -// Should be subclassed from NSPanel but -// we are using the WIN32 common dialog -@interface NSSavePanel : NSObject +@interface NSSavePanel : NSPanel { // Attributes NSView *accessory_view; @@ -58,7 +57,7 @@ enum { NSString *file_name; NSString *required_type; BOOL file_package; - id delegate; +// id delegate; // Reserved for back-end use void *be_save_reserved; diff --git a/Source/NSMatrix.m b/Source/NSMatrix.m index 162c2c305..d6584da3c 100644 --- a/Source/NSMatrix.m +++ b/Source/NSMatrix.m @@ -1155,12 +1155,10 @@ static MPoint anchor = {0, 0}; [[self window] captureMouse: self]; // grab the mouse [self lockFocus]; - // selection occurs in two stages, the first stage loops + // selection consists of two stages, the first stage loops // until the mouse goes up while the second stage completes - // the process by sending actions and displaying the cell - // as it should appear after the selection process - while (!done) - { // begin selection + while (!done) // the process by sending actions and displaying the cell + { // as it should appear after the selection process BOOL shouldProceedEvent = NO; insideBounds = [self _getRow:&row @@ -1317,8 +1315,8 @@ static MPoint anchor = {0, 0}; [[self window] releaseMouse: self]; // Release the mouse - switch (mode) // Finalize the selection - { + switch (mode) // Finish the selection + { // process case NSTrackModeMatrix: case NSHighlightModeMatrix: [selectedCell setState:![selectedCell state]]; diff --git a/Source/NSSavePanel.m b/Source/NSSavePanel.m index 753bcfbcd..5c95cee71 100644 --- a/Source/NSSavePanel.m +++ b/Source/NSSavePanel.m @@ -7,7 +7,7 @@ Author: Scott Christley Date: 1996 - + This file is part of the GNUstep GUI Library. This library is free software; you can redistribute it and/or diff --git a/Source/NSSplitView.m b/Source/NSSplitView.m index cdcbf22c6..4702165d3 100644 --- a/Source/NSSplitView.m +++ b/Source/NSSplitView.m @@ -469,9 +469,9 @@ NSPoint centerRectInRect(NSRect innerRect, NSRect outerRect) draggedBarWidth=8; isVertical=NO; [self seDividerColor:[NSColor darkGrayColor]]; - [self setBackgroundColor:[NSColor whiteColor]]; + [self setBackgroundColor:[NSColor lightGrayColor]]; [self setDimpleImage: - [NSImage imageNamed:@"splitButton.tiff"] resetDividerThickness:YES]; + [NSImage imageNamed:@"common_Dimple.tiff"] resetDividerThickness:YES]; } return self; } diff --git a/Source/NSText.m b/Source/NSText.m index 9291fff3e..c60c6f4be 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -65,7 +65,7 @@ { [super initWithFrame:frameRect]; - text_contents = @"Mary had a little lamb"; + text_contents = @"Text"; alignment = NSLeftTextAlignment; is_editable = YES; is_rich_text = NO; @@ -120,43 +120,17 @@ [self setSelectedRange:range]; } -- (NSString *)text -{ - return text_contents; -} +- (NSString *)text { return text_contents; } // // Managing Global Characteristics // -- (NSTextAlignment)alignment -{ - return alignment; -} - -- (BOOL)drawsBackground -{ - return draws_background; -} - -- (BOOL)importsGraphics -{ - return imports_graphics; -} - -- (BOOL)isEditable -{ - return is_editable; -} - -- (BOOL)isRichText -{ - return is_rich_text; -} - -- (BOOL)isSelectable -{ - return is_selectable; -} +- (NSTextAlignment)alignment { return alignment; } +- (BOOL)drawsBackground { return draws_background; } +- (BOOL)importsGraphics { return imports_graphics; } +- (BOOL)isEditable { return is_editable; } +- (BOOL)isRichText { return is_rich_text; } +- (BOOL)isSelectable { return is_selectable; } - (void)setAlignment:(NSTextAlignment)mode { @@ -195,20 +169,15 @@ // // Managing Font and Color // -- (NSColor *)backgroundColor -{ - return background_color; -} +- (NSColor *)backgroundColor { return background_color; } +- (NSFont *)font { return default_font; } +- (NSColor *)textColor { return text_color; } +- (BOOL)usesFontPanel { return uses_font_panel; } - (void)changeFont:(id)sender { } -- (NSFont *)font -{ - return default_font; -} - - (void)setBackgroundColor:(NSColor *)color { ASSIGN(background_color, color); @@ -220,6 +189,7 @@ - (void)setFont:(NSFont *)obj { + ASSIGN(default_font, obj); } - (void)setFont:(NSFont *)font ofRange:(NSRange)range @@ -233,26 +203,13 @@ - (void)setUsesFontPanel:(BOOL)flag { - uses_font_panel = YES; -} - -- (NSColor *)textColor -{ - return text_color; -} - -- (BOOL)usesFontPanel -{ - return uses_font_panel; + uses_font_panel = flag; } // // Managing the Selection // -- (NSRange)selectedRange -{ - return selected_range; -} +- (NSRange)selectedRange { return selected_range; } - (void)setSelectedRange:(NSRange)range { @@ -267,25 +224,10 @@ [super setFrame:frameRect]; } -- (BOOL)isHorizontallyResizable -{ - return is_horizontally_resizable; -} - -- (BOOL)isVerticallyResizable -{ - return is_vertically_resizable; -} - -- (NSSize)maxSize -{ - return NSZeroSize; -} - -- (NSSize)minSize -{ - return NSZeroSize; -} +- (BOOL)isHorizontallyResizable { return is_horizontally_resizable; } +- (BOOL)isVerticallyResizable { return is_vertically_resizable; } +- (NSSize)maxSize { return NSZeroSize; } +- (NSSize)minSize { return NSZeroSize; } - (void)setHorizontallyResizable:(BOOL)flag { @@ -306,46 +248,55 @@ } - (void)sizeToFit -{} +{ +} // // Responding to Editing Commands // - (void)alignCenter:(id)sender -{} +{ +} - (void)alignLeft:(id)sender -{} +{ +} - (void)alignRight:(id)sender -{} +{ +} - (void)copy:(id)sender { } - (void)copyFont:(id)sender -{} +{ +} - (void)copyRuler:(id)sender -{} +{ +} - (void)cut:(id)sender { } - (void)delete:(id)sender -{} +{ +} - (void)paste:(id)sender { } - (void)pasteFont:(id)sender -{} +{ +} - (void)pasteRuler:(id)sender -{} +{ +} - (void)selectAll:(id)sender { @@ -370,10 +321,7 @@ // // Managing the Ruler // -- (BOOL)isRulerVisible -{ - return NO; -} +- (BOOL)isRulerVisible { return NO; } - (void)toggleRuler:(id)sender {} @@ -401,8 +349,7 @@ return NO; } -- (BOOL)writeRTFDToFile:(NSString *)path - atomically:(BOOL)flag +- (BOOL)writeRTFDToFile:(NSString *)path atomically:(BOOL)flag { return NO; } @@ -410,10 +357,7 @@ // // Managing the Field Editor // -- (BOOL)isFieldEditor -{ - return is_field_editor; -} +- (BOOL)isFieldEditor { return is_field_editor; } - (void)setFieldEditor:(BOOL)flag { @@ -473,10 +417,7 @@ // // Managing the Delegate // -- (id)delegate -{ - return delegate; -} +- (id)delegate { return delegate; } - (void)setDelegate:(id)anObject {