mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* NSSplitView in initWithFrame changed default back color to light gray.
* NSSavePanel modified to inherit from NSPanel per OS spec. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2896 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dd443b1caa
commit
ddfdb35ec3
6 changed files with 63 additions and 114 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,4 +1,15 @@
|
|||
<<<<<<< ChangeLog
|
||||
Tues Aug 4 1998 Felipe A. Rodriguez <far@ix.netcom.com>
|
||||
|
||||
* 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 <far@ix.netcom.com>
|
||||
|
||||
* NSText implemented setFont.
|
||||
* NSText fixed setUsesFontPanel.
|
||||
* NSText reformatted code again in certain places.
|
||||
|
||||
Sat Aug 1 1998 Felipe A. Rodriguez <far@ix.netcom.com>
|
||||
|
||||
* NSText in setText modified to use ASSIGN macro.
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#define _GNUstep_H_NSSavePanel
|
||||
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <AppKit/NSPanel.h>
|
||||
|
||||
@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 <NSCoding>
|
||||
@interface NSSavePanel : NSPanel <NSCoding>
|
||||
{
|
||||
// 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;
|
||||
|
|
|
@ -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]];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Author: Scott Christley <scottc@net-community.com>
|
||||
Date: 1996
|
||||
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
141
Source/NSText.m
141
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue