Merged in 'dawn' CVS branch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3827 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-03-02 08:58:30 +00:00
parent e1c99d6512
commit dbbeff810a
65 changed files with 794 additions and 774 deletions

View file

@ -1,7 +1,7 @@
ANNOUNCE
********
This is version 0.5.0 of the GNUstep GUI library (`gnustep-gui').
This is version 0.5.5 of the GNUstep GUI library (`gnustep-gui').
What is the GNUstep GUI Library?
================================
@ -31,7 +31,15 @@ component like the GNUstep X/DPS GUI Backend.
What's new in this release?
===========================
The currently released version of the library is `0.5.0'.
The currently released version of the library is `0.5.5'.
Noteworthy changes in version `0.5.5'
=====================================
Probably to extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
Noteworthy changes in version `0.5.0'
=====================================
@ -91,24 +99,20 @@ discussion mailing list for general questions and discussion. Look at
the GNUstep Web Pages for more information regarding GNUstep resources
`http://www.gnustep.org/'
There are also companies which provide commercial support for the
GNUstep GUI Library, see the file `SUPPORT' for more information.
Where can you get it? How can you compile it?
==============================================
The gstep-gui-0.5.0.tar.gz distribution file has been placed on
The gstep-gui-0.5.5.tar.gz distribution file has been placed on
`ftp.gnustep.org' in `pub/gnustep/core'.
The program requires gcc 2.8.0 or higher.
It requires the Display Ghostscript System version 0.5.0 and the
TIFF Graphics library version 3.4.
The Display Ghostscript System version 0.5.0 and the TIFF Graphics
library version 3.4 may be required depending on the backend you choose.
It also requires a FoundationKit library as specified by the OpenStep
specification. The FoundationKit libraries known to work are the
GNUstep Base Library version `0.5.0' and libFoundation version
`0.7.1'.
GNUstep Base Library version `0.5.5'.
The `.tar' file is compressed with GNU gzip. Gzip can be obtained by
anonymous ftp at any of the GNU archive sites.
@ -124,8 +128,7 @@ Where do I send bug reports?
============================
Bug reports can be sent to the GNUstep discussion list
<discussion@gnustep.org> or to NET-Community Technical Support
<support@net-community.com>.
<discuss-gnustep@gnu.org>.
Creators rejoice!
Scott Christley

View file

@ -1,3 +1,7 @@
Tue Mar 2 08:04:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Merge in 'dawn' CVS branch.
Mon Mar 1 20:06:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Removed PSMatrix - replaced by NSAffineTransform
@ -14,6 +18,10 @@ Mon Mar 1 17:12:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Headers/AppKit/NSCell.h: Added MacOS-X cell state constants.
1999-03-01 Adam Fedor <fedor@gnu.org>
* Update documentation.
Thu Feb 25 15:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Added support for the new (MacOS-X) NSGraphicsContext class by
@ -68,6 +76,51 @@ Sun Feb 21 20:36:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: Bugfix in update, plus partial code for improved
coordinate handling.
Wed Feb 24 8:56:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Benhur reported oddity in cell drawing code - cells were drawing their
backgrounds in the method to draw the frame. Fixed this by moving
background drawing code to the drawInterior methods - also removed
a lot of redundant code to workaround bugs in clipping that are now
fixed.
* Source/NSBrowserCell.m: update drawing code.
* Source/NSButtonCell.m: ditto.
* Source/NSCell.m: ditto.
* Source/NSFormCell.m: ditto.
* Source/NSSliderCell.m: ditto.
* Source/NSTextFieldCell.m: ditto.
Tue Feb 23 19:30:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Practically every file - I went through all the classes that conform
to the NSCoding protocol and checked and tidied their initWithCoder
and encodeWithCoder methods. In some cases they simply needed the
method prototypes fixing, but in most the initWithCoder method
needed modifying to retain decoded ivar objects correctly!
No guarantees that coding/decoding is correct now - but it's
certainly a lot better.
Tue Feb 23 15:18:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Various files - fixed all the copyWithZone: methods where objects are
both copied AND retained.
1999-02-22 Adam Fedor <fedor@gnu.org>
* Version: update version.
Mon Feb 22 5:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: ([-displayIfNeededInRectIgnoringOpacity:]) a two
character change to fix a redisplay problem - already in the main
cvs branch.
Also merged in changes to coordinate conversion code.
Sun Feb 21 14:43:57 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp>
* Panels/GNUmakefile (before-uninstall): Use -d instead of -e.
test command in sh of solaris2.6 doesn't support -e option.
Fri Feb 19 20:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSClipView.m: coordinate fixes.

View file

@ -42,10 +42,6 @@ discussion mailing list for general questions and discussion. Look at
the GNUstep Web Pages for more information regarding GNUstep resources
@url{http://www.gnustep.org/}
There are also companies which provide commercial support for the
GNUstep GUI Library, see the file @file{SUPPORT} for more
information.
@section Where can you get it? How can you compile it?
@ifset GNUSTEP-GUI-FTP-MACHINE
@ -60,14 +56,14 @@ file has not been made available by anonymous ftp.
The program requires gcc @value{GNUSTEP-GUI-GCC} or higher.
It requires the Display Ghostscript System version
The Display Ghostscript System version
@value{GNUSTEP-GUI-DGS} and the TIFF Graphics library version
@value{GNUSTEP-GUI-LIBTIFF}.
@value{GNUSTEP-GUI-LIBTIFF} may be required depending on the backend
you choose.
It also requires a FoundationKit library as specified by the OpenStep
specification. The FoundationKit libraries known to work are the GNUstep
Base Library version @samp{@value{GNUSTEP-GUI-BASE}} and libFoundation
version @samp{@value{LIB-FOUNDATION}}.
Base Library version @samp{@value{GNUSTEP-GUI-BASE}}.
The @samp{.tar} file is compressed with GNU gzip. Gzip can be obtained by
anonymous ftp at any of the GNU archive sites.
@ -83,8 +79,7 @@ be placed in
@section Where do I send bug reports?
Bug reports can be sent to the GNUstep discussion list
@email{discussion@@gnustep.org} or to NET-Community Technical
Support @email{support@@net-community.com}.
@email{discuss-gnustep@@gnu.org}.
@noindent
Creators rejoice!@*

View file

@ -22,7 +22,8 @@ make
make install
@end example
Here are more detailed instructions.
Here are more detailed instructions. Also read the @file{GNUstep-HOWTO}
for instructions on how to install the entire GNUstep system.
@enumerate
@item

View file

@ -9,6 +9,17 @@
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
@section Noteworthy changes in version @samp{0.5.5}
Probably to extensive to list.
@itemize @bullet
@item A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
@end itemize
@section Noteworthy changes in version @samp{0.5.0}
@itemize @bullet

View file

@ -26,14 +26,10 @@ The file @file{INSTALL} gives instructions for installing the library.
@section How can you help?
@itemize @bullet
@item
Read the projects and questions in the @file{TODO} file. If you can
volunteer for any of the projects, or if you have any useful
comments send me email! @email{scottc@@net-community.com}
@item
Give me feedback! Tell me what you like; tell me what you think
could be better. Send me bug reports.
Give us feedback! Tell us what you like; tell us what you think
could be better. Send bug reports to @email{bug-gnustep@@gnu.org}.
@end itemize
@noindent

View file

@ -5,13 +5,7 @@
@include version.texi
@end ifset
Last updated March 1998. The most up-to-date version of this status
report is available at:
@example
@url{http://www.gnustep.org/Documentation/gnustep-gui/gnustep-gui_toc.html}
@end example
Last updated March 1998. This list is probably out of date.
Please send corrections to @email{scottc@@net-community.com}.
@emph{Key:}

View file

@ -14,7 +14,7 @@ help is greatly appreciated. Send email to @email{scottc@@net-community.com}.
@itemize @bullet
@item Consolodate examples & tests [3, OpenStep] (980913).
@item Consolodate examples and tests [3, OpenStep] (980913).
Also fix or document whatever bugs are there.
@item Need an rtf parser [6 - Objective-C, RTF] (980820).

View file

@ -6,7 +6,7 @@ This file documents the installation of the GNUstep GUI Library,
may copy, distribute, and modify it freely as long as you preserve this
copyright notice and permission notice.
This is version 0.5.0 of the GNUstep GUI library.
This is version 0.5.5 of the GNUstep GUI library.
Installing `gnustep-gui'
========================
@ -17,7 +17,8 @@ Installing `gnustep-gui'
make
make install
Here are more detailed instructions.
Here are more detailed instructions. Also read the `GNUstep-HOWTO'
for instructions on how to install the entire GNUstep system.
1. Install `gcc'. The library requires gcc version 2.8.0 or later.

View file

@ -59,7 +59,7 @@ endif
ADDITIONAL_OBJCFLAGS = -Wall
ADDITIONAL_CPPFLAGS += $(RUNTIME_DEFINE) $(GUI_DEFINE) $(BACKEND_DEFINE)
ADDITIONAL_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR)
ADDITIONAL_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR) -L../Source/$(GNUSTEP_OBJ_DIR)
ADDITIONAL_TOOL_LIBS += -lgmodel
ADDITIONAL_OBJC_FLAGS += $(BACKEND_DEFINE)
@ -71,8 +71,11 @@ ADDITIONAL_INCLUDE_DIRS = -I../Headers -I../Headers/gnustep
# systems where building a shared library requires to pass to the linker
# all the libraries the target library depends upon.
LIBRARIES_DEPEND_UPON = $(FND_LIBS) $(GUI_LIBS) \
$(BACKEND_LIBS) $(SYSTEM_LIBS)
#LIBRARIES_DEPEND_UPON = $(BACKEND_LIBS) $(GUI_LIBS) $(FND_LIBS) $(SYSTEM_LIBS)
libgmodel_LIBRARIES_DEPEND_UPON = -lgnustep-gui $(FND_LIBS)
nib2gmodel_LIBRARIES_DEPEND_UPON = $(BACKEND_LIBS) $(GUI_LIBS) \
$(FND_LIBS) $(SYSTEM_LIBS)
-include GNUmakefile.local

18
NEWS
View file

@ -1,11 +1,25 @@
NEWS
****
The currently released version of the library is `0.4.0'.
The currently released version of the library is `0.5.5'.
Noteworthy changes in version `0.4.0'
Noteworthy changes in version `0.5.5'
=====================================
Probably to extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
Noteworthy changes in version `0.5.0'
=====================================
* NSBrowser and NSBrowserCell have been implemented. There is one
odd display artifact; lists which are smaller than the browser
column area have the list justified to the bottom of the column
versus the top of the column. This is actually an issue with
NSMatrix and will be remedied when flip views are implemented.
* Two important optimizations that speed up the displaying of views
and flushing of windows have been implemented. Only the views that
need display and those that produce visible effects on the screen

View file

@ -38,10 +38,10 @@ prefix = $(GNUSTEP_INSTALLATION_DIR)
PANELS = SavePanel.gmodel
before-install::
if [ ! -e $(prefix)/Library ]; then \
if [ ! -d $(prefix)/Library ]; then \
mkdir $(prefix)/Library; \
fi
if [ ! -e $(prefix)/Library/Model ]; then \
if [ ! -d $(prefix)/Library/Model ]; then \
mkdir $(prefix)/Library/Model; \
fi
for f in $(PANELS); do \

10
README
View file

@ -1,7 +1,7 @@
README
******
This is version 0.5.0 of the GNUstep GUI library (`gnustep-gui').
This is version 0.5.5 of the GNUstep GUI library (`gnustep-gui').
Here is some introductory info to get you started:
@ -18,12 +18,8 @@ Initial reading
How can you help?
=================
* Read the projects and questions in the `TODO' file. If you can
volunteer for any of the projects, or if you have any useful
comments send me email! <scottc@net-community.com>
* Give me feedback! Tell me what you like; tell me what you think
could be better. Send me bug reports.
* Give us feedback! Tell us what you like; tell us what you think
could be better. Send bug reports to <bug-gnustep@gnu.org>.
Creators rejoice!
Scott Christley

View file

@ -64,20 +64,20 @@
return self;
}
- (void)dealloc
- (void) dealloc
{
[owner release];
[super dealloc];
[owner release];
[super dealloc];
}
- (NSRect)rectangle
- (NSRect) rectangle
{
return rectangle;
return rectangle;
}
- (NSTrackingRectTag)tag
{
return tag;
return tag;
}
- owner
@ -98,21 +98,21 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeRect:rectangle];
[aCoder encodeValueOfObjCType:@encode(NSTrackingRectTag) at:&tag];
[aCoder encodeObject:owner];
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&inside];
[aCoder encodeRect: rectangle];
[aCoder encodeValueOfObjCType: @encode(NSTrackingRectTag) at: &tag];
[aCoder encodeObject: owner];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &inside];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
rectangle = [aDecoder decodeRect];
[aDecoder decodeValueOfObjCType:@encode(NSTrackingRectTag) at:&tag];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at:&inside];
owner = [aDecoder decodeObject];
return self;
rectangle = [aDecoder decodeRect];
[aDecoder decodeValueOfObjCType: @encode(NSTrackingRectTag) at: &tag];
[aDecoder decodeValueOfObjCType: @encode(id) at: &owner];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &inside];
return self;
}
@end

View file

@ -210,9 +210,9 @@
return tag;
}
- (id)copyWithZone:(NSZone*)zone
- (id) copyWithZone: (NSZone*)zone
{
NSActionCell* c = [super copyWithZone:zone];
NSActionCell *c = [super copyWithZone: zone];
c->tag = tag;
c->target = target;
@ -224,17 +224,17 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeValueOfObjCType: "i" at: &tag];
[aCoder encodeConditionalObject:target];
[aCoder encodeValueOfObjCType:@encode(SEL) at: &action];
[aCoder encodeConditionalObject: target];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &action];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: "i" at: &tag];
target = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &action];

View file

@ -105,25 +105,25 @@ NSApplication *NSApp = nil;
//
+ (void)initialize
{
if (self == [NSApplication class])
{
NSDebugLog(@"Initialize NSApplication class\n");
if (self == [NSApplication class])
{
NSDebugLog(@"Initialize NSApplication class\n");
// Initial version
[self setVersion:1];
[self setVersion:1];
// So the application knows
gnustep_gui_app_is_in_dealloc = NO; // it's within dealloc and
} // can prevent -release
gnustep_gui_app_is_in_dealloc = NO; // it's within dealloc and
} // can prevent -release
} // loops.
+ (NSApplication *)sharedApplication
{ // If the global application does
if (!NSApp) // not yet exist then create it
{
NSApp = [self alloc]; // Don't combine the following two
[NSApp init]; // statements into one to avoid
} // problems with some classes'
// initialization code that tries
return NSApp; // to get the shared application.
{ // If the global application does
if (!NSApp) // not yet exist then create it
{
NSApp = [self alloc]; // Don't combine the following two
[NSApp init]; // statements into one to avoid
} // problems with some classes'
// initialization code that tries
return NSApp; // to get the shared application.
}
//
@ -137,31 +137,31 @@ NSApplication *NSApp = nil;
return [NSApplication sharedApplication];
}
[super init];
[super init];
NSDebugLog(@"Begin of NSApplication -init\n");
NSDebugLog(@"Begin of NSApplication -init\n");
listener = [GSServicesManager newWithApplication: self];
listener = [GSServicesManager newWithApplication: self];
main_menu = nil;
windows_need_update = YES;
main_menu = nil;
windows_need_update = YES;
event_queue = [NSMutableArray new]; // allocate event queue
current_event = [NSEvent new]; // no current event
null_event = [NSEvent new]; // create dummy event
event_queue = [NSMutableArray new]; // allocate event queue
current_event = [NSEvent new]; // no current event
null_event = [NSEvent new]; // create dummy event
[self setNextResponder:NULL]; // We are the end of
// the responder chain
[self setNextResponder:NULL]; // We are the end of
// the responder chain
// Set up the run loop
// object for the
// current thread
[self setupRunLoopInputSourcesForMode:NSDefaultRunLoopMode];
[self setupRunLoopInputSourcesForMode:NSConnectionReplyMode];
[self setupRunLoopInputSourcesForMode:NSModalPanelRunLoopMode];
[self setupRunLoopInputSourcesForMode:NSEventTrackingRunLoopMode];
// Set up the run loop
// object for the
// current thread
[self setupRunLoopInputSourcesForMode:NSDefaultRunLoopMode];
[self setupRunLoopInputSourcesForMode:NSConnectionReplyMode];
[self setupRunLoopInputSourcesForMode:NSModalPanelRunLoopMode];
[self setupRunLoopInputSourcesForMode:NSEventTrackingRunLoopMode];
return self;
return self;
}
- (void)finishLaunching
@ -1801,26 +1801,27 @@ BOOL result = YES;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeConditionalObject:key_window];
[aCoder encodeConditionalObject:main_window];
[aCoder encodeConditionalObject:delegate];
[aCoder encodeObject:main_menu];
[aCoder encodeConditionalObject:windows_menu];
[aCoder encodeConditionalObject: delegate];
[aCoder encodeObject: main_menu];
[aCoder encodeConditionalObject: windows_menu];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
id obj;
key_window = [aDecoder decodeObject];
main_window = [aDecoder decodeObject];
delegate = [aDecoder decodeObject];
main_menu = [aDecoder decodeObject];
windows_menu = [aDecoder decodeObject];
[super initWithCoder: aDecoder];
obj = [aDecoder decodeObject];
[self setDelegate: obj];
obj = [aDecoder decodeObject];
[self setMainMenu: obj];
obj = [aDecoder decodeObject];
[self setWindowsMenu: obj];
return self;
}

View file

@ -406,12 +406,12 @@
//
// NSCoding protocol
//
- (void) encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[self notImplemented: _cmd];
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[self notImplemented: _cmd];
return nil;

View file

@ -78,12 +78,12 @@
return self;
}
- (void)dealloc
- (void) dealloc
{
if (cell)
[cell release];
if (cell)
[cell release];
[super dealloc];
[super dealloc];
}
//
@ -297,9 +297,9 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: cell];
[aCoder encodeObject: content_view];
@ -310,18 +310,19 @@
[aCoder encodeValueOfObjCType: @encode(NSTitlePosition) at: &title_position];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
cell = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &cell];
content_view = [aDecoder decodeObject];
offsets = [aDecoder decodeSize];
border_rect = [aDecoder decodeRect];
title_rect = [aDecoder decodeRect];
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &border_type];
[aDecoder decodeValueOfObjCType: @encode(NSBorderType)
at: &border_type];
[aDecoder decodeValueOfObjCType: @encode(NSTitlePosition)
at: &title_position];
at: &title_position];
return self;
}

View file

@ -1340,12 +1340,12 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder: aDecoder];

View file

@ -146,13 +146,13 @@ static NSImage *highlight_image;
- (id) copyWithZone: (NSZone*)zone
{
NSBrowserCell* c = [super copyWithZone: zone];
// Copy the image cells
NSBrowserCell *c = [super copyWithZone: zone];
c->_branchImage = [_branchImage retain];
if (_alternateImage)
c->_alternateImage = [_alternateImage retain];
c->_highlightBranchImage = [_highlightBranchImage retain];
c->_browserText = [[_browserText copy] retain]; // Copy the text cell
c->_browserText = [_browserText copyWithZone: zone]; // Copy the text cell
c->_isLeaf = _isLeaf;
c->_isLoaded = _isLoaded;
@ -309,11 +309,6 @@ static NSImage *highlight_image;
[self _drawImage: image inFrame: image_rect];
}
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
{
[self drawInteriorWithFrame: cellFrame inView: controlView];
}
//
// Editing Text
//

View file

@ -329,14 +329,14 @@ id _nsbuttonCellClass = nil;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -94,19 +94,19 @@
- initTextCell:(NSString *)aString
{
[super initTextCell:aString];
[super initTextCell:aString];
return [self _init];
return [self _init];
}
- (void)dealloc
- (void) dealloc
{
[altContents release];
[altImage release];
[keyEquivalent release];
[keyEquivalentFont release];
[altContents release];
[altImage release];
[keyEquivalent release];
[keyEquivalentFont release];
[super dealloc];
[super dealloc];
}
//
@ -312,19 +312,42 @@
return [NSColor blackColor];
}
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
float backgroundGray = NSLightGray;
// Save last view drawn to
[self setControlView: controlView];
// do nothing if cell's frame rect is zero
if (NSIsEmptyRect(cellFrame))
return;
PSgsave ();
NSRectClip (cellFrame);
// draw the border if needed
if ([self isBordered])
{
if ([self isHighlighted] && ([self highlightsBy] & NSPushInCellMask))
{
NSDrawGrayBezel(cellFrame, cellFrame);
}
else
{
NSDrawButton(cellFrame, cellFrame);
}
}
// Save last view drawn to
[self setControlView: controlView];
[self drawInteriorWithFrame: cellFrame inView: controlView];
}
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
BOOL showAlternate = NO;
unsigned mask;
NSImage *imageToDisplay;
NSString *titleToDisplay;
NSSize imageSize = {0, 0};
NSRect rect;
float backgroundGray = NSLightGray;
cellFrame = NSInsetRect(cellFrame, xDist, yDist);
// determine the background color
if ([self state])
@ -345,37 +368,6 @@
[[NSColor colorWithCalibratedWhite:backgroundGray alpha:1.0] set];
NSRectFill(cellFrame);
// draw the border if needed
if ([self isBordered])
{
if ([self isHighlighted] && ([self highlightsBy] & NSPushInCellMask))
{
NSDrawGrayBezel (cellFrame, cellFrame);
cellFrame = NSInsetRect (cellFrame, 2, 2);
}
else
{
NSDrawButton (cellFrame, cellFrame);
cellFrame = NSInsetRect (cellFrame, 2, 2);
}
}
[self drawInteriorWithFrame: cellFrame inView: controlView];
PSgrestore ();
}
- (void)drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
{
BOOL showAlternate = NO;
unsigned int mask;
NSImage *imageToDisplay;
NSString *titleToDisplay;
NSSize imageSize = {0, 0};
NSRect rect;
cellFrame = NSInsetRect (cellFrame, xDist, yDist);
// Determine the image and the title that will be
// displayed. If the NSContentsCellMask is set the
// image and title are swapped only if state is 1 or
@ -391,6 +383,8 @@
if (showAlternate || [self isHighlighted])
{
imageToDisplay = [self alternateImage];
if (!imageToDisplay)
imageToDisplay = [self image];
titleToDisplay = [self alternateTitle];
if (!titleToDisplay)
titleToDisplay = [self title];
@ -403,83 +397,85 @@
if (imageToDisplay)
imageSize = [imageToDisplay size];
rect = NSMakeRect (cellFrame.origin.x, cellFrame.origin.y,
imageSize.width, imageSize.height);
switch ([self imagePosition])
{
case NSNoImage:
// draw title only
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
// draw title only
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
case NSImageOnly:
// draw image only
[self _drawImage: imageToDisplay inFrame: cellFrame];
break;
// draw image only
[self _drawImage: imageToDisplay inFrame: cellFrame];
break;
case NSImageLeft:
// draw image to the left of the title
rect.origin = cellFrame.origin;
rect.size.width = imageSize.width;
rect.size.height = cellFrame.size.height;
[self _drawImage: imageToDisplay inFrame: rect];
// draw image to the left of the title
rect.origin = cellFrame.origin;
rect.size.width = imageSize.width;
rect.size.height = cellFrame.size.height;
[self _drawImage: imageToDisplay inFrame: rect];
// draw title
rect.origin.x += imageSize.width + xDist;
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
[self _drawText: titleToDisplay inFrame: rect];
break;
// draw title
rect.origin.x += imageSize.width + xDist;
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
[self _drawText: titleToDisplay inFrame: rect];
break;
case NSImageRight:
// draw image to the right of the title
rect.origin.x = NSMaxX (cellFrame) - imageSize.width;
rect.origin.y = cellFrame.origin.y;
rect.size.width = imageSize.width;
rect.size.height = cellFrame.size.height;
[self _drawImage:imageToDisplay inFrame:rect];
// draw image to the right of the title
rect.origin.x = NSMaxX (cellFrame) - imageSize.width;
rect.origin.y = cellFrame.origin.y;
rect.size.width = imageSize.width;
rect.size.height = cellFrame.size.height;
[self _drawImage:imageToDisplay inFrame:rect];
// draw title
rect.origin = cellFrame.origin;
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
rect.size.height = cellFrame.size.height;
[self _drawText: titleToDisplay inFrame: rect];
break;
// draw title
rect.origin = cellFrame.origin;
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
rect.size.height = cellFrame.size.height;
[self _drawText: titleToDisplay inFrame: rect];
break;
case NSImageBelow:
// draw image below title
cellFrame.size.height /= 2;
[self _drawImage: imageToDisplay inFrame: cellFrame];
cellFrame.origin.y += cellFrame.size.height;
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
// draw image below title
cellFrame.size.height /= 2;
[self _drawImage: imageToDisplay inFrame: cellFrame];
cellFrame.origin.y += cellFrame.size.height;
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
case NSImageAbove:
// draw image above title
cellFrame.size.height /= 2;
[self _drawText: titleToDisplay inFrame: cellFrame];
cellFrame.origin.y += cellFrame.size.height;
[self _drawImage: imageToDisplay inFrame: cellFrame];
break;
// draw image above title
cellFrame.size.height /= 2;
[self _drawText: titleToDisplay inFrame: cellFrame];
cellFrame.origin.y += cellFrame.size.height;
[self _drawImage: imageToDisplay inFrame: cellFrame];
break;
case NSImageOverlaps:
// draw title over the image
[self _drawImage: imageToDisplay inFrame: cellFrame];
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
// draw title over the image
[self _drawImage: imageToDisplay inFrame: cellFrame];
[self _drawText: titleToDisplay inFrame: cellFrame];
break;
}
}
- (id)copyWithZone:(NSZone*)zone
- (id) copyWithZone: (NSZone*)zone
{
NSButtonCell* c = [super copyWithZone:zone];
NSButtonCell *c = [super copyWithZone: zone];
c->altContents = [[altContents copy] retain];
if(altImage)
c->altImage = [altImage retain];
c->keyEquivalent = [[keyEquivalent copy] retain];
if(keyEquivalentFont)
c->keyEquivalentFont = [keyEquivalentFont retain];
c->altContents = [altContents copyWithZone: zone];
if (altImage)
c->altImage = [altImage retain];
c->keyEquivalent = [keyEquivalent copyWithZone: zone];
if (keyEquivalentFont)
c->keyEquivalentFont = [keyEquivalentFont retain];
c->keyEquivalentModifierMask = keyEquivalentModifierMask;
c->transparent = transparent;
c->highlightsByMask = highlightsByMask;
@ -491,24 +487,28 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
NSDebugLog(@"NSButtonCell: start encoding\n");
[aCoder encodeObject: keyEquivalent];
[aCoder encodeObject: keyEquivalentFont];
[aCoder encodeObject: altContents];
[aCoder encodeObject: altImage];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSDebugLog(@"NSButtonCell: finish encoding\n");
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
NSDebugLog(@"NSButtonCell: start decoding\n");
altContents = [aDecoder decodeObject];
altImage = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &keyEquivalent];
[aDecoder decodeValueOfObjCType: @encode(id) at: &keyEquivalentFont];
[aDecoder decodeValueOfObjCType: @encode(id) at: &altContents];
[aDecoder decodeValueOfObjCType: @encode(id) at: &altImage];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSDebugLog(@"NSButtonCell: finish decoding\n");

View file

@ -551,10 +551,11 @@ return NSZeroSize;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{}
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return nil;
}

View file

@ -108,11 +108,11 @@
}
// NSCoding protocol
- (void) encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}

View file

@ -616,7 +616,14 @@
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
cellFrame = NSInsetRect (cellFrame, xDist, yDist);
cellFrame = NSInsetRect(cellFrame, xDist, yDist);
// Clear the cell frame
if ([self isOpaque])
{
[[NSColor lightGrayColor] set];
NSRectFill(cellFrame);
}
switch ([self type])
{
@ -631,42 +638,31 @@
}
}
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
NSDebugLog (@"NSCell drawWithFrame: inView:");
// We apply a clipping rectangle so save the graphics state
PSgsave ();
// Save last view drawn to
[self setControlView: controlView];
// Clear the cell frame
if ([self isOpaque])
{
[[NSColor lightGrayColor] set];
NSRectFill(cellFrame);
}
// do nothing if cell's frame rect is zero
if (NSIsEmptyRect(cellFrame))
return;
// draw the border if needed
if ([self isBordered])
{
if ([self isBezeled])
{
NSDrawWhiteBezel (cellFrame, cellFrame);
cellFrame = NSInsetRect (cellFrame, 2, 2);
NSDrawWhiteBezel(cellFrame, cellFrame);
}
else
{
NSFrameRect (cellFrame);
cellFrame = NSInsetRect (cellFrame, 1, 1);
NSFrameRect(cellFrame);
}
}
NSRectClip(cellFrame);
[self drawInteriorWithFrame: cellFrame inView: controlView];
PSgrestore ();
}
- (BOOL) isHighlighted
@ -676,10 +672,13 @@
- (void) highlight: (BOOL)lit
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView // FIX ME
inView: (NSView*)controlView
{
cell_highlighted = lit;
[self drawWithFrame: cellFrame inView: controlView];
if (cell_highlighted != lit)
{
cell_highlighted = lit;
[self drawWithFrame: cellFrame inView: controlView];
}
}
//
@ -958,9 +957,9 @@
- (id) copyWithZone: (NSZone*)zone
{
NSCell* c = [[isa allocWithZone: zone] init];
NSCell *c = [[isa allocWithZone: zone] init];
c->contents = [contents copy];
c->contents = [contents copyWithZone: zone];
ASSIGN(c->cell_image, cell_image);
ASSIGN(c->cell_font, cell_font);
c->cell_state = cell_state;

View file

@ -1062,7 +1062,7 @@ static NSMutableDictionary *colorStrings = nil;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
// Version 1
[aCoder encodeValueOfObjCType: @encode(float) at: &RGB_component.red];
@ -1087,7 +1087,7 @@ static NSMutableDictionary *colorStrings = nil;
[aCoder encodeValueOfObjCType: @encode(int) at: &valid_components];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
NSString *s;
@ -1105,9 +1105,9 @@ static NSMutableDictionary *colorStrings = nil;
// +++ Coding cannot return class version yet
// if ([aDecoder versionForClassName: s] > 1)
{
colorspace_name = [[aDecoder decodeObject] retain];
catalog_name = [[aDecoder decodeObject] retain];
color_name = [[aDecoder decodeObject] retain];
[aDecoder decodeValueOfObjCType: @encode(id) at: &colorspace_name];
[aDecoder decodeValueOfObjCType: @encode(id) at: &catalog_name];
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_name];
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.cyan];
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.magenta];
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.yellow];

View file

@ -280,7 +280,7 @@ static NSLock *gnustep_color_list_lock;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeObject: list_name];
[aCoder encodeObject: color_list];
@ -288,12 +288,12 @@ static NSLock *gnustep_color_list_lock;
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_editable];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
list_name = [aDecoder decodeObject];
color_list = [aDecoder decodeObject];
color_list_keys = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_editable];
[aDecoder decodeValueOfObjCType: @encode(id) at: &list_name];
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_list];
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_list_keys];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
return self;
}

View file

@ -148,14 +148,14 @@ fromView:(NSView *)sourceView
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -144,20 +144,20 @@ NSRect inside = rect;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: the_color];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_active];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_bordered];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_active];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_bordered];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
the_color = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_active];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_bordered];
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: @encode(id) at: &the_color];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_active];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_bordered];
return self;
}

View file

@ -86,14 +86,14 @@ static id _NSCONTROL_CELL_CLASS = nil;
//
// Creating copies
//
- copyWithZone:(NSZone *)zone
- (id) copyWithZone: (NSZone*)zone
{
id c = NSCopyObject (self, 0, zone);
id c = NSCopyObject(self, 0, zone);
NSCell *o = [cell copy];
[cell retain]; // give new control
[c setCell: [[cell copy] autorelease]]; // a copy of cell
return c;
[c setCell: o];
[o release];
return c;
}
//
@ -439,22 +439,22 @@ unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask |
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeValueOfObjCType: "i" at: &tag];
[aCoder encodeObject: cell];
[aCoder encodeValueOfObjCType: @encode(int) at: &tag];
[aCoder encodeObject: cell];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: "i" at: &tag];
cell = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(int) at: &tag];
[aDecoder decodeValueOfObjCType: @encode(id) at: &cell];
return self;
return self;
}
@end

View file

@ -215,11 +215,11 @@ static BOOL gnustep_gui_hidden_until_move;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}

View file

@ -32,7 +32,7 @@
@implementation NSCustomImageRep
- (id) initWithDrawSelector: (SEL)aSelector
delegate: (id)anObject
delegate: (id)anObject
{
[super init];
@ -66,20 +66,20 @@
}
// NSCoding protocol
- (void) encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeObject: delegate];
// FIXME: [aCoder encodeSelector: selector];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &selector];
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
self = [super initWithCoder: aDecoder];
delegate = [[aDecoder decodeObject] retain];
// FIXME: selector = [aDecoder decodeSelector];
[aDecoder decodeValueOfObjCType: @encode(id) at: &delegate];
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &selector];
return self;
}

View file

@ -184,11 +184,11 @@ supportingTypes:(NSArray *)newTypes
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}

View file

@ -236,11 +236,11 @@ cheapCopyAllowed:(BOOL)flag
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}

View file

@ -113,14 +113,14 @@ isMultiple:(BOOL)flag
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -71,12 +71,12 @@
}
// NSCoding protocol
- (void) encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[self notImplemented: _cmd];
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[self notImplemented: _cmd];
return self;

View file

@ -451,100 +451,100 @@ NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeValueOfObjCType: @encode(NSEventType) at: &event_type];
[aCoder encodePoint: location_point];
[aCoder encodeValueOfObjCType: "I" at: &modifier_flags];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
[aCoder encodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
[aCoder encodeValueOfObjCType: "i" at: &window_num];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &window_num];
// We don't want to encode the context, right?
// DPSContext doesn't conform to NSCoding
//[aCoder encodeObjectReference: event_context withName: @"Context"];
// Encode the event date based upon the event type
switch (event_type)
{
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
case NSRightMouseUp:
case NSMouseMoved:
case NSLeftMouseDragged:
case NSRightMouseDragged:
[aCoder encodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
&event_data.mouse.click, &event_data.mouse.pressure];
break;
{
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
case NSRightMouseUp:
case NSMouseMoved:
case NSLeftMouseDragged:
case NSRightMouseDragged:
[aCoder encodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
&event_data.mouse.click, &event_data.mouse.pressure];
break;
case NSMouseEntered:
case NSMouseExited:
case NSCursorUpdate:
// Can't do anything with the user_data!?
[aCoder encodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
&event_data.tracking.tracking_num];
break;
case NSMouseEntered:
case NSMouseExited:
case NSCursorUpdate:
// Can't do anything with the user_data!?
[aCoder encodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
&event_data.tracking.tracking_num];
break;
case NSKeyDown:
case NSKeyUp:
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &event_data.key.repeat];
[aCoder encodeObject: event_data.key.char_keys];
[aCoder encodeObject: event_data.key.unmodified_keys];
[aCoder encodeValueOfObjCType: "S" at: &event_data.key.key_code];
break;
case NSKeyDown:
case NSKeyUp:
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &event_data.key.repeat];
[aCoder encodeObject: event_data.key.char_keys];
[aCoder encodeObject: event_data.key.unmodified_keys];
[aCoder encodeValueOfObjCType: "S" at: &event_data.key.key_code];
break;
case NSFlagsChanged:
case NSPeriodic:
[aCoder encodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
&event_data.misc.data1, &event_data.misc.data2];
break;
}
case NSFlagsChanged:
case NSPeriodic:
[aCoder encodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
&event_data.misc.data1, &event_data.misc.data2];
break;
}
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[aDecoder decodeValueOfObjCType: @encode(NSEventType) at: &event_type];
location_point = [aDecoder decodePoint];
[aDecoder decodeValueOfObjCType: "I" at: &modifier_flags];
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
[aDecoder decodeValueOfObjCType: "i" at: &window_num];
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &window_num];
// Decode the event date based upon the event type
switch (event_type)
{
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
case NSRightMouseUp:
case NSMouseMoved:
case NSLeftMouseDragged:
case NSRightMouseDragged:
[aDecoder decodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
&event_data.mouse.click, &event_data.mouse.pressure];
break;
{
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
case NSRightMouseUp:
case NSMouseMoved:
case NSLeftMouseDragged:
case NSRightMouseDragged:
[aDecoder decodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
&event_data.mouse.click, &event_data.mouse.pressure];
break;
case NSMouseEntered:
case NSMouseExited:
case NSCursorUpdate:
// Can't do anything with the user_data!?
[aDecoder decodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
&event_data.tracking.tracking_num];
break;
case NSMouseEntered:
case NSMouseExited:
case NSCursorUpdate:
// Can't do anything with the user_data!?
[aDecoder decodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
&event_data.tracking.tracking_num];
break;
case NSKeyDown:
case NSKeyUp:
[aDecoder decodeValueOfObjCType: @encode(BOOL)
at: &event_data.key.repeat];
event_data.key.char_keys = [aDecoder decodeObject];
event_data.key.unmodified_keys = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: "S" at: &event_data.key.key_code];
break;
case NSKeyDown:
case NSKeyUp:
[aDecoder decodeValueOfObjCType: @encode(BOOL)
at: &event_data.key.repeat];
event_data.key.char_keys = [aDecoder decodeObject];
event_data.key.unmodified_keys = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: "S" at: &event_data.key.key_code];
break;
case NSFlagsChanged:
case NSPeriodic:
[aDecoder decodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
&event_data.misc.data1, &event_data.misc.data2];
break;
}
case NSFlagsChanged:
case NSPeriodic:
[aDecoder decodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
&event_data.misc.data1, &event_data.misc.data2];
break;
}
return self;
}

View file

@ -202,16 +202,16 @@
//
// Archiving
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
return self;
}
@end

View file

@ -237,16 +237,16 @@ void setNSFont(NSString* key, NSFont* font)
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeObject:fontName];
[aCoder encodeArrayOfObjCType:"f" count:6 at:matrix];
[aCoder encodeObject: fontName];
[aCoder encodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
fontName = [aDecoder decodeObject];
[aDecoder decodeArrayOfObjCType:"f" count:6 at:matrix];
[aDecoder decodeValueOfObjCType: @encode(id) at: &fontName];
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
return self;
}

View file

@ -115,16 +115,16 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: panel_font];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
panel_font = [aDecoder decodeObject];

View file

@ -196,14 +196,14 @@ static Class defaultCellClass = nil;
- (void)selectTextAtIndex:(int)index
{}
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -114,8 +114,7 @@
return 0;
}
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView*)controlView
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
NSRect titleFrame;
NSRect textFrame;
@ -123,18 +122,18 @@
NSDivideRect(cellFrame, &titleFrame, &textFrame,
[self titleWidth] + 4, NSMinXEdge);
[titleCell drawWithFrame:titleFrame inView:controlView];
[super drawWithFrame:textFrame inView:controlView];
[titleCell drawWithFrame: titleFrame inView: controlView];
[super drawWithFrame: textFrame inView: controlView];
}
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -114,14 +114,14 @@ to:(id)anObject
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -906,11 +906,11 @@ static NSDictionary* nsmapping = nil;
}
// NSCoding
- (void)encodeWithCoder:(NSCoder *)coder
- (void) encodeWithCoder: (NSCoder*)coder
{
}
- (id)initWithCoder:(NSCoder *)coder
- (id) initWithCoder: (NSCoder*)coder
{
return self;
}

View file

@ -370,7 +370,7 @@ extension(NSString *name)
}
// NSCoding protocol
- (void) encodeWithCoder: aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeObject: _colorSpace];
[aCoder encodeSize: size];
@ -381,9 +381,9 @@ extension(NSString *name)
[aCoder encodeValueOfObjCType: @encode(int) at: &_pixelsHigh];
}
- initWithCoder: aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
_colorSpace = [[aDecoder decodeObject] retain];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_colorSpace];
size = [aDecoder decodeSize];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hasAlpha];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &isOpaque];

View file

@ -1400,14 +1400,14 @@ int r, c; // only the cell and
}
}
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -302,16 +302,16 @@ static Class menuCellClass = nil;
- (id)copyWithZone:(NSZone*)zone
{
NSMenu* copy = NSAllocateObject (isa, 0, zone);
int i, count;
NSArray* cells;
NSMenu *copy = NSAllocateObject (isa, 0, zone);
unsigned i, count;
NSArray *cells;
NSDebugLog (@"copy menu with title '%@'", [self title]);
copy->title = [title copyWithZone:zone];
copy->title = [title copyWithZone: zone];
copy->menuCells = [menuCells copyWithZone:zone];
[copy->menuCells setMenu:copy];
copy->menuCells = [menuCells copyWithZone: zone];
[copy->menuCells setMenu: copy];
/* Change the supermenu object of the new cells to the new menu */
cells = [copy->menuCells itemArray];
@ -602,12 +602,12 @@ static Class menuCellClass = nil;
return menuCells;
}
- initWithCoder:(NSCoder*)aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}
- (void)encodeWithCoder:(NSCoder*)aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}

View file

@ -74,7 +74,7 @@ static BOOL usesUserKeyEquivalents = YES;
- (id) copyWithZone: (NSZone*)zone
{
NSMenuItem* copy = [super copyWithZone:zone];
NSMenuItem *copy = [super copyWithZone: zone];
NSDebugLog (@"menu item '%@' copy", [self title]);
copy->representedObject = [representedObject retain];

View file

@ -199,9 +199,9 @@ static NSOpenPanel *gnustep_gui_open_panel = nil;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: the_filenames];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &multiple_select];
@ -209,11 +209,11 @@ static NSOpenPanel *gnustep_gui_open_panel = nil;
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &choose_file];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
the_filenames = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &the_filenames];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &multiple_select];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_dir];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_file];

View file

@ -115,14 +115,14 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -159,12 +159,12 @@
//
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder: (NSCoder*)aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -75,7 +75,7 @@
return self;
}
- (void)dealloc
- (void) dealloc
{
[list_items release];
[super dealloc];
@ -326,26 +326,26 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: list_items];
[aCoder encodeRect: list_rect];
[aCoder encodeValueOfObjCType: "i" at: &selected_item];
[aCoder encodeConditionalObject:pub_target];
[aCoder encodeValueOfObjCType: @encode(int) at: &selected_item];
[aCoder encodeConditionalObject: pub_target];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &pub_action];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_up];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &pulls_down];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
list_items = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &list_items];
list_rect = [aDecoder decodeRect];
[aDecoder decodeValueOfObjCType: "i" at: &selected_item];
[aDecoder decodeValueOfObjCType: @encode(int) at: &selected_item];
pub_target = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &pub_action];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_up];

View file

@ -338,14 +338,14 @@ NSDictionary *paperSizes = nil;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodePropertyList:info];
[aCoder encodePropertyList: info];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
info = [aDecoder decodePropertyList];
info = [[aDecoder decodePropertyList] retain];
return self;
}

View file

@ -98,14 +98,14 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
return self;
}

View file

@ -872,44 +872,44 @@ andOptionTranslation:(NSString *)optionTranslation
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
// [super encodeWithCoder:aCoder];
[aCoder encodeObject:printerHost];
[aCoder encodeObject:printerName];
[aCoder encodeObject:printerNote];
[aCoder encodeObject:printerType];
[aCoder encodeObject: printerHost];
[aCoder encodeObject: printerName];
[aCoder encodeObject: printerNote];
[aCoder encodeObject: printerType];
[aCoder encodeValueOfObjCType:"i" at:&cacheAcceptsBinary];
[aCoder encodeValueOfObjCType:"i" at:&cacheOutputOrder];
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&isRealPrinter];
[aCoder encodeValueOfObjCType: @encode(int) at: &cacheAcceptsBinary];
[aCoder encodeValueOfObjCType: @encode(int) at: &cacheOutputOrder];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &isRealPrinter];
[aCoder encodeObject:PPD];
[aCoder encodeObject:PPDOptionTranslation];
[aCoder encodeObject:PPDArgumentTranslation];
[aCoder encodeObject:PPDOrderDependency];
[aCoder encodeObject:PPDUIConstraints];
[aCoder encodeObject: PPD];
[aCoder encodeObject: PPDOptionTranslation];
[aCoder encodeObject: PPDArgumentTranslation];
[aCoder encodeObject: PPDOrderDependency];
[aCoder encodeObject: PPDUIConstraints];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
// self = [super initWithCoder:aDecoder];
printerHost = [aDecoder decodeObject];
printerName = [aDecoder decodeObject];
printerNote = [aDecoder decodeObject];
printerType = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerHost];
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerName];
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerNote];
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerType];
[aDecoder decodeValueOfObjCType:"i" at:&cacheAcceptsBinary];
[aDecoder decodeValueOfObjCType:"i" at:&cacheOutputOrder];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at:&isRealPrinter];
[aDecoder decodeValueOfObjCType: @encode(int) at: &cacheAcceptsBinary];
[aDecoder decodeValueOfObjCType: @encode(int) at: &cacheOutputOrder];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &isRealPrinter];
PPD = [aDecoder decodeObject];
PPDOptionTranslation = [aDecoder decodeObject];
PPDArgumentTranslation = [aDecoder decodeObject];
PPDOrderDependency = [aDecoder decodeObject];
PPDUIConstraints = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPD];
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDOptionTranslation];
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDArgumentTranslation];
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDOrderDependency];
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDUIConstraints];
return self;
}

View file

@ -238,22 +238,14 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
#if 0
[aCoder encodeObjectReference: next_responder withName: @"Next responder"];
#else
[aCoder encodeConditionalObject:next_responder];
#endif
[aCoder encodeConditionalObject: next_responder];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
#if 0
[aDecoder decodeObjectAt: &next_responder withName: NULL];
#else
next_responder = [aDecoder decodeObject];
#endif
return self;
}

View file

@ -428,7 +428,7 @@ shouldShowFilename:(NSString *)filename
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeObject: _accessoryView];
[aCoder encodeObject: panel_title];
@ -437,14 +437,10 @@ shouldShowFilename:(NSString *)filename
[aCoder encodeObject: file_name];
[aCoder encodeObject: required_type];
[aCoder encodeValueOfObjCType: @encode(BOOL) at:&required_type];
#if 0
[aCoder encodeObjectReference: delegate withName: @"Delegate"];
#else
[aCoder encodeConditionalObject:delegate];
#endif
[aCoder encodeConditionalObject: delegate];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
_accessoryView = [aDecoder decodeObject];
panel_title = [aDecoder decodeObject];
@ -453,11 +449,7 @@ shouldShowFilename:(NSString *)filename
file_name = [aDecoder decodeObject];
required_type = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&required_type];
#if 0
[aDecoder decodeObjectAt: &delegate withName: NULL];
#else
delegate = [aDecoder decodeObject];
#endif
return self;
}

View file

@ -108,11 +108,11 @@
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
return self;
}

View file

@ -81,30 +81,30 @@
- (NSRect)knobRectFlipped:(BOOL)flipped
{
NSImage* image = [_knobCell image];
NSSize size;
NSPoint origin;
float floatValue;
NSImage* image = [_knobCell image];
NSSize size;
NSPoint origin;
float floatValue;
if (_isVertical && flipped)
_floatValue = _maxValue + _minValue - _floatValue;
if (_isVertical && flipped)
_floatValue = _maxValue + _minValue - _floatValue;
floatValue = (_floatValue - _minValue) / (_maxValue - _minValue);
floatValue = (_floatValue - _minValue) / (_maxValue - _minValue);
size = [image size];
size = [image size];
if (_isVertical)
{
origin.x = 2;
origin.y = ((_trackRect.size.height - size.height) * floatValue) + 2;
}
else
{
origin.x = ((_trackRect.size.width - size.width) * floatValue) + 2;
origin.y = 2;
}
if (_isVertical)
{
origin.x = 0;
origin.y = (_trackRect.size.height - size.height) * floatValue;
}
else
{
origin.x = (_trackRect.size.width - size.width) * floatValue;
origin.y = 0;
}
return NSMakeRect (origin.x, origin.y, size.width, size.height);
return NSMakeRect (origin.x, origin.y, size.width, size.height);
}
- (void)drawKnob
@ -204,18 +204,19 @@ float floatValue;
- (double)maxValue { return _maxValue; }
- (float)floatValue { return _floatValue; }
- (id)initWithCoder:(NSCoder*)decoder
- (id) initWithCoder: (NSCoder*)decoder
{
self = [super initWithCoder:decoder];
self = [super initWithCoder: decoder];
[decoder decodeValuesOfObjCTypes:"ffff",
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
return self;
}
- (void)encodeWithCoder:(NSCoder*)coder
- (void) encodeWithCoder: (NSCoder*)coder
{
[super encodeWithCoder: coder];
[coder encodeValuesOfObjCTypes:"ffff",
_minValue, _maxValue, _floatValue, _altIncrementValue];
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
}
@end

View file

@ -2231,54 +2231,55 @@ NSLog(@"opti hook 2");
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{ [super encodeWithCoder:aCoder];
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeConditionalObject:delegate];
[aCoder encodeConditionalObject:delegate];
[aCoder encodeObject: plainContent];
[aCoder encodeObject: rtfContent];
[aCoder encodeObject: plainContent];
[aCoder encodeObject: rtfContent];
[aCoder encodeValueOfObjCType: "I" at: &alignment];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_editable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
[aCoder encodeObject: background_color];
[aCoder encodeObject: text_color];
[aCoder encodeObject: default_font];
[aCoder encodeValueOfObjCType: @encode(NSRange) at: &selected_range];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &alignment];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_editable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
[aCoder encodeObject: background_color];
[aCoder encodeObject: text_color];
[aCoder encodeObject: default_font];
[aCoder encodeValueOfObjCType: @encode(NSRange) at: &selected_range];
}
- initWithCoder:aDecoder
{ [super initWithCoder:aDecoder];
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder: aDecoder];
delegate = [aDecoder decodeObject];
delegate = [aDecoder decodeObject];
plainContent= [aDecoder decodeObject];
rtfContent= [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &plainContent];
[aDecoder decodeValueOfObjCType: @encode(id) at: &rtfContent];
[aDecoder decodeValueOfObjCType: "I" at: &alignment];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
background_color = [aDecoder decodeObject];
text_color = [aDecoder decodeObject];
default_font = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(NSRange) at: &selected_range];
return self;
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &alignment];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
[aDecoder decodeValueOfObjCType: @encode(id) at: &text_color];
[aDecoder decodeValueOfObjCType: @encode(id) at: &default_font];
[aDecoder decodeValueOfObjCType: @encode(NSRange) at: &selected_range];
return self;
}
//

View file

@ -100,14 +100,14 @@ id _nsTextfieldCellClass = nil;
text_cursor = aCursor;
}
- copyWithZone:(NSZone *)zone
- (id) copyWithZone: (NSZone*)zone
{
id c;
id c;
c = [super copyWithZone: zone];
[c setTextCursor: [NSCursor IBeamCursor]];
c = [super copyWithZone: zone];
[c setTextCursor: [NSCursor IBeamCursor]];
return c;
return c;
}
//
@ -420,35 +420,23 @@ id nextResponder;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
#if 0
[aCoder encodeObjectReference: next_text withName: @"Next text"];
[aCoder encodeObjectReference: previous_text withName: @"Previous text"];
[aCoder encodeObjectReference: text_delegate withName: @"Text delegate"];
#else
[aCoder encodeConditionalObject:next_text];
[aCoder encodeConditionalObject:previous_text];
[aCoder encodeConditionalObject:text_delegate];
#endif
[aCoder encodeConditionalObject: next_text];
[aCoder encodeConditionalObject: previous_text];
[aCoder encodeConditionalObject: text_delegate];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &error_action];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
#if 0
[aDecoder decodeObjectAt: &next_text withName: NULL];
[aDecoder decodeObjectAt: &previous_text withName: NULL];
[aDecoder decodeObjectAt: &text_delegate withName: NULL];
#else
next_text = [aDecoder decodeObject];
previous_text = [aDecoder decodeObject];
text_delegate = [aDecoder decodeObject];
#endif
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &error_action];
return self;

View file

@ -93,9 +93,9 @@
[super dealloc];
}
- (id)copyWithZone:(NSZone*)zone
- (id) copyWithZone: (NSZone*)zone
{
NSTextFieldCell* c = [super copyWithZone:zone];
NSTextFieldCell *c = [super copyWithZone: zone];
[c setBackgroundColor: background_color];
[c setTextColor: text_color];
@ -229,35 +229,24 @@
[super setStringValue:aString];
}
//
// Displaying
//
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{
// Save last view drawn to
control_view = controlView;
[super drawWithFrame:cellFrame inView:controlView];
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
[aCoder encodeObject: background_color];
[aCoder encodeObject: text_color];
[aCoder encodeValueOfObjCType: @encode(id) at: &background_color];
[aCoder encodeValueOfObjCType: @encode(id) at: &text_color];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &draw_background];
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
background_color = [aDecoder decodeObject];
text_color = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
[aDecoder decodeValueOfObjCType: @encode(id) at: &text_color];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &draw_background];
return self;

View file

@ -58,8 +58,8 @@
static NSString *viewThreadKey = @"NSViewThreadKey";
static NSAffineTransform *flip = nil;
static void (*concatImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
static SEL concatSel = @selector(concatenateWith:);
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
static SEL appSel = @selector(appendTransform:);
static void (*invalidateImp)(NSView*, SEL) = 0;
static SEL invalidateSel = @selector(_invalidateCoordinates);
@ -74,8 +74,8 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
Class matrixClass = [NSAffineTransform class];
NSAffineTransformStruct ats = { 1, 0, 0, -1, 0, 1 };
concatImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
[matrixClass instanceMethodForSelector: concatSel];
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
[matrixClass instanceMethodForSelector: appSel];
invalidateImp = (void (*)(NSView*, SEL))
[self instanceMethodForSelector: invalidateSel];
@ -1879,13 +1879,13 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
[pMatrix getMatrix: vals];
[matrixToWindow setMatrix: vals];
(*concatImp)(matrixToWindow, concatSel, frameMatrix);
(*appImp)(matrixToWindow, appSel, frameMatrix);
if ([self isFlipped] != wasFlipped)
{
flip->matrix.ty = bounds.size.height;
(*concatImp)(matrixToWindow, concatSel, flip);
(*appImp)(matrixToWindow, appSel, flip);
}
(*concatImp)(matrixToWindow, concatSel, boundsMatrix);
(*appImp)(matrixToWindow, appSel, boundsMatrix);
[matrixToWindow getMatrix: vals];
[matrixFromWindow setMatrix: vals];
[matrixFromWindow inverse];

View file

@ -1327,93 +1327,87 @@ id result = nil;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[self setNextResponder: nil];
[super encodeWithCoder:aCoder];
[super encodeWithCoder: aCoder];
NSDebugLog(@"NSWindow: start encoding\n");
[aCoder encodeRect:frame];
[aCoder encodeObject:content_view];
// [aCoder encodeObjectReference: first_responder withName:NULL];
// [aCoder encodeObjectReference: original_responder withName:NULL];
// [aCoder encodeObjectReference: delegate withName:NULL];
[aCoder encodeValueOfObjCType:"i" at:&window_num];
[aCoder encodeObject:background_color];
[aCoder encodeObject:represented_filename];
[aCoder encodeObject:miniaturized_title];
[aCoder encodeObject:window_title];
[aCoder encodePoint:last_point];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &visible];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_key];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_main];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_edited];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized];
[aCoder encodeValueOfObjCType:"I" at: &style_mask];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &menu_exclude];
[aCoder encodeRect: frame];
[aCoder encodeObject: content_view];
[aCoder encodeValueOfObjCType: @encode(int) at: &window_num];
[aCoder encodeObject: background_color];
[aCoder encodeObject: represented_filename];
[aCoder encodeObject: miniaturized_title];
[aCoder encodeObject: window_title];
[aCoder encodePoint: last_point];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &visible];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_key];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_main];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_edited];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_miniaturized];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &style_mask];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &menu_exclude];
// Version 2
[aCoder encodeSize:minimum_size];
[aCoder encodeSize:maximum_size];
[aCoder encodeObject:miniaturized_image];
[aCoder encodeValueOfObjCType:@encode(NSBackingStoreType) at: &backing_type];
[aCoder encodeValueOfObjCType:@encode(int) at: &window_level];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_one_shot];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_autodisplay];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &optimize_drawing];
[aCoder encodeValueOfObjCType:@encode(NSWindowDepth) at: &depth_limit];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &dynamic_depth_limit];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &cursor_rects_enabled];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_released_when_closed];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &disable_flush_window];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &hides_on_deactivate];
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &accepts_mouse_moved];
[aCoder encodeSize: minimum_size];
[aCoder encodeSize: maximum_size];
[aCoder encodeObject: miniaturized_image];
[aCoder encodeValueOfObjCType: @encode(NSBackingStoreType) at: &backing_type];
[aCoder encodeValueOfObjCType: @encode(int) at: &window_level];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
[aCoder encodeValueOfObjCType: @encode(NSWindowDepth) at: &depth_limit];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
NSDebugLog(@"NSWindow: finish encoding\n");
}
- initWithCoder:aDecoder
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder:aDecoder];
[super initWithCoder: aDecoder];
NSDebugLog(@"NSWindow: start decoding\n");
frame = [aDecoder decodeRect];
content_view = [aDecoder decodeObject];
// [aDecoder decodeObjectAt: &first_responder withName:NULL];
// [aDecoder decodeObjectAt: &original_responder withName:NULL];
// [aDecoder decodeObjectAt: &delegate withName:NULL];
[aDecoder decodeValueOfObjCType:"i" at:&window_num];
background_color = [aDecoder decodeObject];
represented_filename = [aDecoder decodeObject];
miniaturized_title = [aDecoder decodeObject];
window_title = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(int) at: &window_num];
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
[aDecoder decodeValueOfObjCType: @encode(id) at: &represented_filename];
[aDecoder decodeValueOfObjCType: @encode(id) at: &miniaturized_title];
[aDecoder decodeValueOfObjCType: @encode(id) at: &window_title];
last_point = [aDecoder decodePoint];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &visible];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_key];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_main];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_edited];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized];
[aDecoder decodeValueOfObjCType:"I" at: &style_mask];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &menu_exclude];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &visible];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_key];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_main];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_edited];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_miniaturized];
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &style_mask];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &menu_exclude];
// Version 2
minimum_size = [aDecoder decodeSize];
maximum_size = [aDecoder decodeSize];
miniaturized_image = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType:@encode(NSBackingStoreType)
[aDecoder decodeValueOfObjCType: @encode(id) at: &miniaturized_image];
[aDecoder decodeValueOfObjCType: @encode(NSBackingStoreType)
at: &backing_type];
[aDecoder decodeValueOfObjCType:@encode(int) at: &window_level];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_one_shot];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_autodisplay];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &optimize_drawing];
[aDecoder decodeValueOfObjCType:@encode(NSWindowDepth) at: &depth_limit];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &dynamic_depth_limit];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &cursor_rects_enabled];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_released_when_closed];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &disable_flush_window];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &hides_on_deactivate];
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &accepts_mouse_moved];
[aDecoder decodeValueOfObjCType: @encode(int) at: &window_level];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
[aDecoder decodeValueOfObjCType: @encode(NSWindowDepth) at: &depth_limit];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
NSDebugLog(@"NSWindow: finish decoding\n");

View file

@ -5,8 +5,8 @@
GNUSTEP_GUI_GCC=2.8.0
# Versions for libraries that gnustep-gui is dependent upon
GNUSTEP_GUI_BASE=0.5.0
LIB_FOUNDATION=0.7.1
GNUSTEP_GUI_BASE=0.5.5
LIB_FOUNDATION=0.8.1
GNUSTEP_GUI_LIBTIFF=3.4
GNUSTEP_GUI_DGS=0.5.0
GNUSTEP_GUI_DPSCLIENT=6.1
@ -14,7 +14,7 @@ GNUSTEP_GUI_DPSCLIENT=6.1
# The version number of this release.
GNUSTEP_GUI_MAJOR_VERSION=0
GNUSTEP_GUI_MINOR_VERSION=5
GNUSTEP_GUI_SUBMINOR_VERSION=0
GNUSTEP_GUI_SUBMINOR_VERSION=5
GNUSTEP_GUI_VERSION=${GNUSTEP_GUI_MAJOR_VERSION}.${GNUSTEP_GUI_MINOR_VERSION}.${GNUSTEP_GUI_SUBMINOR_VERSION}
VERSION=${GNUSTEP_GUI_VERSION}