mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +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
3803d50e89
commit
6dead11c87
6 changed files with 63 additions and 114 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,4 +1,15 @@
|
||||||
<<<<<<< ChangeLog
|
<<<<<<< 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>
|
Sat Aug 1 1998 Felipe A. Rodriguez <far@ix.netcom.com>
|
||||||
|
|
||||||
* NSText in setText modified to use ASSIGN macro.
|
* NSText in setText modified to use ASSIGN macro.
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define _GNUstep_H_NSSavePanel
|
#define _GNUstep_H_NSSavePanel
|
||||||
|
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
|
#include <AppKit/NSPanel.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSView;
|
@class NSView;
|
||||||
|
@ -46,9 +47,7 @@ enum {
|
||||||
NSFileHandlingPanelDiskEjectButton
|
NSFileHandlingPanelDiskEjectButton
|
||||||
};
|
};
|
||||||
|
|
||||||
// Should be subclassed from NSPanel but
|
@interface NSSavePanel : NSPanel <NSCoding>
|
||||||
// we are using the WIN32 common dialog
|
|
||||||
@interface NSSavePanel : NSObject <NSCoding>
|
|
||||||
{
|
{
|
||||||
// Attributes
|
// Attributes
|
||||||
NSView *accessory_view;
|
NSView *accessory_view;
|
||||||
|
@ -58,7 +57,7 @@ enum {
|
||||||
NSString *file_name;
|
NSString *file_name;
|
||||||
NSString *required_type;
|
NSString *required_type;
|
||||||
BOOL file_package;
|
BOOL file_package;
|
||||||
id delegate;
|
// id delegate;
|
||||||
|
|
||||||
// Reserved for back-end use
|
// Reserved for back-end use
|
||||||
void *be_save_reserved;
|
void *be_save_reserved;
|
||||||
|
|
|
@ -1155,12 +1155,10 @@ static MPoint anchor = {0, 0};
|
||||||
|
|
||||||
[[self window] captureMouse: self]; // grab the mouse
|
[[self window] captureMouse: self]; // grab the mouse
|
||||||
[self lockFocus];
|
[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
|
// until the mouse goes up while the second stage completes
|
||||||
// the process by sending actions and displaying the cell
|
while (!done) // the process by sending actions and displaying the cell
|
||||||
// as it should appear after the selection process
|
{ // as it should appear after the selection process
|
||||||
while (!done)
|
|
||||||
{ // begin selection
|
|
||||||
BOOL shouldProceedEvent = NO;
|
BOOL shouldProceedEvent = NO;
|
||||||
|
|
||||||
insideBounds = [self _getRow:&row
|
insideBounds = [self _getRow:&row
|
||||||
|
@ -1317,8 +1315,8 @@ static MPoint anchor = {0, 0};
|
||||||
|
|
||||||
[[self window] releaseMouse: self]; // Release the mouse
|
[[self window] releaseMouse: self]; // Release the mouse
|
||||||
|
|
||||||
switch (mode) // Finalize the selection
|
switch (mode) // Finish the selection
|
||||||
{
|
{ // process
|
||||||
case NSTrackModeMatrix:
|
case NSTrackModeMatrix:
|
||||||
case NSHighlightModeMatrix:
|
case NSHighlightModeMatrix:
|
||||||
[selectedCell setState:![selectedCell state]];
|
[selectedCell setState:![selectedCell state]];
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
Author: Scott Christley <scottc@net-community.com>
|
Author: Scott Christley <scottc@net-community.com>
|
||||||
Date: 1996
|
Date: 1996
|
||||||
|
|
||||||
This file is part of the GNUstep GUI Library.
|
This file is part of the GNUstep GUI Library.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -469,9 +469,9 @@ NSPoint centerRectInRect(NSRect innerRect, NSRect outerRect)
|
||||||
draggedBarWidth=8;
|
draggedBarWidth=8;
|
||||||
isVertical=NO;
|
isVertical=NO;
|
||||||
[self seDividerColor:[NSColor darkGrayColor]];
|
[self seDividerColor:[NSColor darkGrayColor]];
|
||||||
[self setBackgroundColor:[NSColor whiteColor]];
|
[self setBackgroundColor:[NSColor lightGrayColor]];
|
||||||
[self setDimpleImage:
|
[self setDimpleImage:
|
||||||
[NSImage imageNamed:@"splitButton.tiff"] resetDividerThickness:YES];
|
[NSImage imageNamed:@"common_Dimple.tiff"] resetDividerThickness:YES];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
141
Source/NSText.m
141
Source/NSText.m
|
@ -65,7 +65,7 @@
|
||||||
{
|
{
|
||||||
[super initWithFrame:frameRect];
|
[super initWithFrame:frameRect];
|
||||||
|
|
||||||
text_contents = @"Mary had a little lamb";
|
text_contents = @"Text";
|
||||||
alignment = NSLeftTextAlignment;
|
alignment = NSLeftTextAlignment;
|
||||||
is_editable = YES;
|
is_editable = YES;
|
||||||
is_rich_text = NO;
|
is_rich_text = NO;
|
||||||
|
@ -120,43 +120,17 @@
|
||||||
[self setSelectedRange:range];
|
[self setSelectedRange:range];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)text
|
- (NSString *)text { return text_contents; }
|
||||||
{
|
|
||||||
return text_contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Managing Global Characteristics
|
// Managing Global Characteristics
|
||||||
//
|
//
|
||||||
- (NSTextAlignment)alignment
|
- (NSTextAlignment)alignment { return alignment; }
|
||||||
{
|
- (BOOL)drawsBackground { return draws_background; }
|
||||||
return alignment;
|
- (BOOL)importsGraphics { return imports_graphics; }
|
||||||
}
|
- (BOOL)isEditable { return is_editable; }
|
||||||
|
- (BOOL)isRichText { return is_rich_text; }
|
||||||
- (BOOL)drawsBackground
|
- (BOOL)isSelectable { return is_selectable; }
|
||||||
{
|
|
||||||
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
|
- (void)setAlignment:(NSTextAlignment)mode
|
||||||
{
|
{
|
||||||
|
@ -195,20 +169,15 @@
|
||||||
//
|
//
|
||||||
// Managing Font and Color
|
// Managing Font and Color
|
||||||
//
|
//
|
||||||
- (NSColor *)backgroundColor
|
- (NSColor *)backgroundColor { return background_color; }
|
||||||
{
|
- (NSFont *)font { return default_font; }
|
||||||
return background_color;
|
- (NSColor *)textColor { return text_color; }
|
||||||
}
|
- (BOOL)usesFontPanel { return uses_font_panel; }
|
||||||
|
|
||||||
- (void)changeFont:(id)sender
|
- (void)changeFont:(id)sender
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSFont *)font
|
|
||||||
{
|
|
||||||
return default_font;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setBackgroundColor:(NSColor *)color
|
- (void)setBackgroundColor:(NSColor *)color
|
||||||
{
|
{
|
||||||
ASSIGN(background_color, color);
|
ASSIGN(background_color, color);
|
||||||
|
@ -220,6 +189,7 @@
|
||||||
|
|
||||||
- (void)setFont:(NSFont *)obj
|
- (void)setFont:(NSFont *)obj
|
||||||
{
|
{
|
||||||
|
ASSIGN(default_font, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setFont:(NSFont *)font ofRange:(NSRange)range
|
- (void)setFont:(NSFont *)font ofRange:(NSRange)range
|
||||||
|
@ -233,26 +203,13 @@
|
||||||
|
|
||||||
- (void)setUsesFontPanel:(BOOL)flag
|
- (void)setUsesFontPanel:(BOOL)flag
|
||||||
{
|
{
|
||||||
uses_font_panel = YES;
|
uses_font_panel = flag;
|
||||||
}
|
|
||||||
|
|
||||||
- (NSColor *)textColor
|
|
||||||
{
|
|
||||||
return text_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)usesFontPanel
|
|
||||||
{
|
|
||||||
return uses_font_panel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Managing the Selection
|
// Managing the Selection
|
||||||
//
|
//
|
||||||
- (NSRange)selectedRange
|
- (NSRange)selectedRange { return selected_range; }
|
||||||
{
|
|
||||||
return selected_range;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setSelectedRange:(NSRange)range
|
- (void)setSelectedRange:(NSRange)range
|
||||||
{
|
{
|
||||||
|
@ -267,25 +224,10 @@
|
||||||
[super setFrame:frameRect];
|
[super setFrame:frameRect];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isHorizontallyResizable
|
- (BOOL)isHorizontallyResizable { return is_horizontally_resizable; }
|
||||||
{
|
- (BOOL)isVerticallyResizable { return is_vertically_resizable; }
|
||||||
return is_horizontally_resizable;
|
- (NSSize)maxSize { return NSZeroSize; }
|
||||||
}
|
- (NSSize)minSize { return NSZeroSize; }
|
||||||
|
|
||||||
- (BOOL)isVerticallyResizable
|
|
||||||
{
|
|
||||||
return is_vertically_resizable;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSSize)maxSize
|
|
||||||
{
|
|
||||||
return NSZeroSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSSize)minSize
|
|
||||||
{
|
|
||||||
return NSZeroSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setHorizontallyResizable:(BOOL)flag
|
- (void)setHorizontallyResizable:(BOOL)flag
|
||||||
{
|
{
|
||||||
|
@ -306,46 +248,55 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sizeToFit
|
- (void)sizeToFit
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Responding to Editing Commands
|
// Responding to Editing Commands
|
||||||
//
|
//
|
||||||
- (void)alignCenter:(id)sender
|
- (void)alignCenter:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)alignLeft:(id)sender
|
- (void)alignLeft:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)alignRight:(id)sender
|
- (void)alignRight:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)copy:(id)sender
|
- (void)copy:(id)sender
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)copyFont:(id)sender
|
- (void)copyFont:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)copyRuler:(id)sender
|
- (void)copyRuler:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)cut:(id)sender
|
- (void)cut:(id)sender
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)delete:(id)sender
|
- (void)delete:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)paste:(id)sender
|
- (void)paste:(id)sender
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pasteFont:(id)sender
|
- (void)pasteFont:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)pasteRuler:(id)sender
|
- (void)pasteRuler:(id)sender
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- (void)selectAll:(id)sender
|
- (void)selectAll:(id)sender
|
||||||
{
|
{
|
||||||
|
@ -370,10 +321,7 @@
|
||||||
//
|
//
|
||||||
// Managing the Ruler
|
// Managing the Ruler
|
||||||
//
|
//
|
||||||
- (BOOL)isRulerVisible
|
- (BOOL)isRulerVisible { return NO; }
|
||||||
{
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)toggleRuler:(id)sender
|
- (void)toggleRuler:(id)sender
|
||||||
{}
|
{}
|
||||||
|
@ -401,8 +349,7 @@
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeRTFDToFile:(NSString *)path
|
- (BOOL)writeRTFDToFile:(NSString *)path atomically:(BOOL)flag
|
||||||
atomically:(BOOL)flag
|
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
@ -410,10 +357,7 @@
|
||||||
//
|
//
|
||||||
// Managing the Field Editor
|
// Managing the Field Editor
|
||||||
//
|
//
|
||||||
- (BOOL)isFieldEditor
|
- (BOOL)isFieldEditor { return is_field_editor; }
|
||||||
{
|
|
||||||
return is_field_editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setFieldEditor:(BOOL)flag
|
- (void)setFieldEditor:(BOOL)flag
|
||||||
{
|
{
|
||||||
|
@ -473,10 +417,7 @@
|
||||||
//
|
//
|
||||||
// Managing the Delegate
|
// Managing the Delegate
|
||||||
//
|
//
|
||||||
- (id)delegate
|
- (id)delegate { return delegate; }
|
||||||
{
|
|
||||||
return delegate;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setDelegate:(id)anObject
|
- (void)setDelegate:(id)anObject
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue