mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +00:00
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:
parent
ac6ec019f7
commit
55b55d3fee
65 changed files with 794 additions and 774 deletions
27
ANNOUNCE
27
ANNOUNCE
|
@ -1,7 +1,7 @@
|
||||||
ANNOUNCE
|
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?
|
What is the GNUstep GUI Library?
|
||||||
================================
|
================================
|
||||||
|
@ -31,7 +31,15 @@ component like the GNUstep X/DPS GUI Backend.
|
||||||
What's new in this release?
|
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'
|
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
|
the GNUstep Web Pages for more information regarding GNUstep resources
|
||||||
`http://www.gnustep.org/'
|
`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?
|
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'.
|
`ftp.gnustep.org' in `pub/gnustep/core'.
|
||||||
|
|
||||||
The program requires gcc 2.8.0 or higher.
|
The program requires gcc 2.8.0 or higher.
|
||||||
|
|
||||||
It requires the Display Ghostscript System version 0.5.0 and the
|
The Display Ghostscript System version 0.5.0 and the TIFF Graphics
|
||||||
TIFF Graphics library version 3.4.
|
library version 3.4 may be required depending on the backend you choose.
|
||||||
|
|
||||||
It also requires a FoundationKit library as specified by the OpenStep
|
It also requires a FoundationKit library as specified by the OpenStep
|
||||||
specification. The FoundationKit libraries known to work are the
|
specification. The FoundationKit libraries known to work are the
|
||||||
GNUstep Base Library version `0.5.0' and libFoundation version
|
GNUstep Base Library version `0.5.5'.
|
||||||
`0.7.1'.
|
|
||||||
|
|
||||||
The `.tar' file is compressed with GNU gzip. Gzip can be obtained by
|
The `.tar' file is compressed with GNU gzip. Gzip can be obtained by
|
||||||
anonymous ftp at any of the GNU archive sites.
|
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
|
Bug reports can be sent to the GNUstep discussion list
|
||||||
<discussion@gnustep.org> or to NET-Community Technical Support
|
<discuss-gnustep@gnu.org>.
|
||||||
<support@net-community.com>.
|
|
||||||
|
|
||||||
Creators rejoice!
|
Creators rejoice!
|
||||||
Scott Christley
|
Scott Christley
|
||||||
|
|
53
ChangeLog
53
ChangeLog
|
@ -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>
|
Mon Mar 1 20:06:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
Removed PSMatrix - replaced by NSAffineTransform
|
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.
|
* 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>
|
Thu Feb 25 15:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
Added support for the new (MacOS-X) NSGraphicsContext class by
|
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
|
* Source/NSView.m: Bugfix in update, plus partial code for improved
|
||||||
coordinate handling.
|
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>
|
Fri Feb 19 20:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSClipView.m: coordinate fixes.
|
* Source/NSClipView.m: coordinate fixes.
|
||||||
|
|
|
@ -42,10 +42,6 @@ discussion mailing list for general questions and discussion. Look at
|
||||||
the GNUstep Web Pages for more information regarding GNUstep resources
|
the GNUstep Web Pages for more information regarding GNUstep resources
|
||||||
@url{http://www.gnustep.org/}
|
@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?
|
@section Where can you get it? How can you compile it?
|
||||||
|
|
||||||
@ifset GNUSTEP-GUI-FTP-MACHINE
|
@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.
|
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-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
|
It also requires a FoundationKit library as specified by the OpenStep
|
||||||
specification. The FoundationKit libraries known to work are the GNUstep
|
specification. The FoundationKit libraries known to work are the GNUstep
|
||||||
Base Library version @samp{@value{GNUSTEP-GUI-BASE}} and libFoundation
|
Base Library version @samp{@value{GNUSTEP-GUI-BASE}}.
|
||||||
version @samp{@value{LIB-FOUNDATION}}.
|
|
||||||
|
|
||||||
The @samp{.tar} file is compressed with GNU gzip. Gzip can be obtained by
|
The @samp{.tar} file is compressed with GNU gzip. Gzip can be obtained by
|
||||||
anonymous ftp at any of the GNU archive sites.
|
anonymous ftp at any of the GNU archive sites.
|
||||||
|
@ -83,8 +79,7 @@ be placed in
|
||||||
@section Where do I send bug reports?
|
@section Where do I send bug reports?
|
||||||
|
|
||||||
Bug reports can be sent to the GNUstep discussion list
|
Bug reports can be sent to the GNUstep discussion list
|
||||||
@email{discussion@@gnustep.org} or to NET-Community Technical
|
@email{discuss-gnustep@@gnu.org}.
|
||||||
Support @email{support@@net-community.com}.
|
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Creators rejoice!@*
|
Creators rejoice!@*
|
||||||
|
|
|
@ -22,7 +22,8 @@ make
|
||||||
make install
|
make install
|
||||||
@end example
|
@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
|
@enumerate
|
||||||
@item
|
@item
|
||||||
|
|
|
@ -9,6 +9,17 @@
|
||||||
|
|
||||||
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
|
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}
|
@section Noteworthy changes in version @samp{0.5.0}
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
|
|
@ -26,14 +26,10 @@ The file @file{INSTALL} gives instructions for installing the library.
|
||||||
@section How can you help?
|
@section How can you help?
|
||||||
|
|
||||||
@itemize @bullet
|
@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
|
@item
|
||||||
Give me feedback! Tell me what you like; tell me what you think
|
Give us feedback! Tell us what you like; tell us what you think
|
||||||
could be better. Send me bug reports.
|
could be better. Send bug reports to @email{bug-gnustep@@gnu.org}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
|
|
@ -5,13 +5,7 @@
|
||||||
@include version.texi
|
@include version.texi
|
||||||
@end ifset
|
@end ifset
|
||||||
|
|
||||||
Last updated March 1998. The most up-to-date version of this status
|
Last updated March 1998. This list is probably out of date.
|
||||||
report is available at:
|
|
||||||
|
|
||||||
@example
|
|
||||||
@url{http://www.gnustep.org/Documentation/gnustep-gui/gnustep-gui_toc.html}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Please send corrections to @email{scottc@@net-community.com}.
|
Please send corrections to @email{scottc@@net-community.com}.
|
||||||
|
|
||||||
@emph{Key:}
|
@emph{Key:}
|
||||||
|
|
|
@ -14,7 +14,7 @@ help is greatly appreciated. Send email to @email{scottc@@net-community.com}.
|
||||||
|
|
||||||
@itemize @bullet
|
@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.
|
Also fix or document whatever bugs are there.
|
||||||
|
|
||||||
@item Need an rtf parser [6 - Objective-C, RTF] (980820).
|
@item Need an rtf parser [6 - Objective-C, RTF] (980820).
|
||||||
|
|
5
INSTALL
5
INSTALL
|
@ -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
|
may copy, distribute, and modify it freely as long as you preserve this
|
||||||
copyright notice and permission notice.
|
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'
|
Installing `gnustep-gui'
|
||||||
========================
|
========================
|
||||||
|
@ -17,7 +17,8 @@ Installing `gnustep-gui'
|
||||||
make
|
make
|
||||||
make install
|
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.
|
1. Install `gcc'. The library requires gcc version 2.8.0 or later.
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ endif
|
||||||
ADDITIONAL_OBJCFLAGS = -Wall
|
ADDITIONAL_OBJCFLAGS = -Wall
|
||||||
ADDITIONAL_CPPFLAGS += $(RUNTIME_DEFINE) $(GUI_DEFINE) $(BACKEND_DEFINE)
|
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_TOOL_LIBS += -lgmodel
|
||||||
ADDITIONAL_OBJC_FLAGS += $(BACKEND_DEFINE)
|
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
|
# systems where building a shared library requires to pass to the linker
|
||||||
# all the libraries the target library depends upon.
|
# all the libraries the target library depends upon.
|
||||||
|
|
||||||
LIBRARIES_DEPEND_UPON = $(FND_LIBS) $(GUI_LIBS) \
|
#LIBRARIES_DEPEND_UPON = $(BACKEND_LIBS) $(GUI_LIBS) $(FND_LIBS) $(SYSTEM_LIBS)
|
||||||
$(BACKEND_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
|
-include GNUmakefile.local
|
||||||
|
|
||||||
|
|
18
NEWS
18
NEWS
|
@ -1,11 +1,25 @@
|
||||||
NEWS
|
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
|
* Two important optimizations that speed up the displaying of views
|
||||||
and flushing of windows have been implemented. Only the views that
|
and flushing of windows have been implemented. Only the views that
|
||||||
need display and those that produce visible effects on the screen
|
need display and those that produce visible effects on the screen
|
||||||
|
|
|
@ -38,10 +38,10 @@ prefix = $(GNUSTEP_INSTALLATION_DIR)
|
||||||
PANELS = SavePanel.gmodel
|
PANELS = SavePanel.gmodel
|
||||||
|
|
||||||
before-install::
|
before-install::
|
||||||
if [ ! -e $(prefix)/Library ]; then \
|
if [ ! -d $(prefix)/Library ]; then \
|
||||||
mkdir $(prefix)/Library; \
|
mkdir $(prefix)/Library; \
|
||||||
fi
|
fi
|
||||||
if [ ! -e $(prefix)/Library/Model ]; then \
|
if [ ! -d $(prefix)/Library/Model ]; then \
|
||||||
mkdir $(prefix)/Library/Model; \
|
mkdir $(prefix)/Library/Model; \
|
||||||
fi
|
fi
|
||||||
for f in $(PANELS); do \
|
for f in $(PANELS); do \
|
||||||
|
|
10
README
10
README
|
@ -1,7 +1,7 @@
|
||||||
README
|
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:
|
Here is some introductory info to get you started:
|
||||||
|
|
||||||
|
@ -18,12 +18,8 @@ Initial reading
|
||||||
How can you help?
|
How can you help?
|
||||||
=================
|
=================
|
||||||
|
|
||||||
* Read the projects and questions in the `TODO' file. If you can
|
* Give us feedback! Tell us what you like; tell us what you think
|
||||||
volunteer for any of the projects, or if you have any useful
|
could be better. Send bug reports to <bug-gnustep@gnu.org>.
|
||||||
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.
|
|
||||||
|
|
||||||
Creators rejoice!
|
Creators rejoice!
|
||||||
Scott Christley
|
Scott Christley
|
||||||
|
|
|
@ -64,20 +64,20 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[owner release];
|
[owner release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSRect)rectangle
|
- (NSRect) rectangle
|
||||||
{
|
{
|
||||||
return rectangle;
|
return rectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSTrackingRectTag)tag
|
- (NSTrackingRectTag)tag
|
||||||
{
|
{
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- owner
|
- owner
|
||||||
|
@ -98,21 +98,21 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeRect:rectangle];
|
[aCoder encodeRect: rectangle];
|
||||||
[aCoder encodeValueOfObjCType:@encode(NSTrackingRectTag) at:&tag];
|
[aCoder encodeValueOfObjCType: @encode(NSTrackingRectTag) at: &tag];
|
||||||
[aCoder encodeObject:owner];
|
[aCoder encodeObject: owner];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&inside];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &inside];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
rectangle = [aDecoder decodeRect];
|
rectangle = [aDecoder decodeRect];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(NSTrackingRectTag) at:&tag];
|
[aDecoder decodeValueOfObjCType: @encode(NSTrackingRectTag) at: &tag];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at:&inside];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &owner];
|
||||||
owner = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &inside];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -210,9 +210,9 @@
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone*)zone
|
- (id) copyWithZone: (NSZone*)zone
|
||||||
{
|
{
|
||||||
NSActionCell* c = [super copyWithZone:zone];
|
NSActionCell *c = [super copyWithZone: zone];
|
||||||
|
|
||||||
c->tag = tag;
|
c->tag = tag;
|
||||||
c->target = target;
|
c->target = target;
|
||||||
|
@ -224,17 +224,17 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
[aCoder encodeValueOfObjCType: "i" at: &tag];
|
[aCoder encodeValueOfObjCType: "i" at: &tag];
|
||||||
[aCoder encodeConditionalObject:target];
|
[aCoder encodeConditionalObject: target];
|
||||||
[aCoder encodeValueOfObjCType:@encode(SEL) at: &action];
|
[aCoder encodeValueOfObjCType: @encode(SEL) at: &action];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &tag];
|
[aDecoder decodeValueOfObjCType: "i" at: &tag];
|
||||||
target = [aDecoder decodeObject];
|
target = [aDecoder decodeObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &action];
|
||||||
|
|
|
@ -105,25 +105,25 @@ NSApplication *NSApp = nil;
|
||||||
//
|
//
|
||||||
+ (void)initialize
|
+ (void)initialize
|
||||||
{
|
{
|
||||||
if (self == [NSApplication class])
|
if (self == [NSApplication class])
|
||||||
{
|
{
|
||||||
NSDebugLog(@"Initialize NSApplication class\n");
|
NSDebugLog(@"Initialize NSApplication class\n");
|
||||||
// Initial version
|
// Initial version
|
||||||
[self setVersion:1];
|
[self setVersion:1];
|
||||||
// So the application knows
|
// So the application knows
|
||||||
gnustep_gui_app_is_in_dealloc = NO; // it's within dealloc and
|
gnustep_gui_app_is_in_dealloc = NO; // it's within dealloc and
|
||||||
} // can prevent -release
|
} // can prevent -release
|
||||||
} // loops.
|
} // loops.
|
||||||
|
|
||||||
+ (NSApplication *)sharedApplication
|
+ (NSApplication *)sharedApplication
|
||||||
{ // If the global application does
|
{ // If the global application does
|
||||||
if (!NSApp) // not yet exist then create it
|
if (!NSApp) // not yet exist then create it
|
||||||
{
|
{
|
||||||
NSApp = [self alloc]; // Don't combine the following two
|
NSApp = [self alloc]; // Don't combine the following two
|
||||||
[NSApp init]; // statements into one to avoid
|
[NSApp init]; // statements into one to avoid
|
||||||
} // problems with some classes'
|
} // problems with some classes'
|
||||||
// initialization code that tries
|
// initialization code that tries
|
||||||
return NSApp; // to get the shared application.
|
return NSApp; // to get the shared application.
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -137,31 +137,31 @@ NSApplication *NSApp = nil;
|
||||||
return [NSApplication sharedApplication];
|
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;
|
main_menu = nil;
|
||||||
windows_need_update = YES;
|
windows_need_update = YES;
|
||||||
|
|
||||||
event_queue = [NSMutableArray new]; // allocate event queue
|
event_queue = [NSMutableArray new]; // allocate event queue
|
||||||
current_event = [NSEvent new]; // no current event
|
current_event = [NSEvent new]; // no current event
|
||||||
null_event = [NSEvent new]; // create dummy event
|
null_event = [NSEvent new]; // create dummy event
|
||||||
|
|
||||||
[self setNextResponder:NULL]; // We are the end of
|
[self setNextResponder:NULL]; // We are the end of
|
||||||
// the responder chain
|
// the responder chain
|
||||||
|
|
||||||
// Set up the run loop
|
// Set up the run loop
|
||||||
// object for the
|
// object for the
|
||||||
// current thread
|
// current thread
|
||||||
[self setupRunLoopInputSourcesForMode:NSDefaultRunLoopMode];
|
[self setupRunLoopInputSourcesForMode:NSDefaultRunLoopMode];
|
||||||
[self setupRunLoopInputSourcesForMode:NSConnectionReplyMode];
|
[self setupRunLoopInputSourcesForMode:NSConnectionReplyMode];
|
||||||
[self setupRunLoopInputSourcesForMode:NSModalPanelRunLoopMode];
|
[self setupRunLoopInputSourcesForMode:NSModalPanelRunLoopMode];
|
||||||
[self setupRunLoopInputSourcesForMode:NSEventTrackingRunLoopMode];
|
[self setupRunLoopInputSourcesForMode:NSEventTrackingRunLoopMode];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)finishLaunching
|
- (void)finishLaunching
|
||||||
|
@ -1801,26 +1801,27 @@ BOOL result = YES;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeConditionalObject:key_window];
|
[aCoder encodeConditionalObject: delegate];
|
||||||
[aCoder encodeConditionalObject:main_window];
|
[aCoder encodeObject: main_menu];
|
||||||
[aCoder encodeConditionalObject:delegate];
|
[aCoder encodeConditionalObject: windows_menu];
|
||||||
[aCoder encodeObject:main_menu];
|
|
||||||
[aCoder encodeConditionalObject:windows_menu];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
id obj;
|
||||||
|
|
||||||
key_window = [aDecoder decodeObject];
|
[super initWithCoder: aDecoder];
|
||||||
main_window = [aDecoder decodeObject];
|
|
||||||
delegate = [aDecoder decodeObject];
|
obj = [aDecoder decodeObject];
|
||||||
main_menu = [aDecoder decodeObject];
|
[self setDelegate: obj];
|
||||||
windows_menu = [aDecoder decodeObject];
|
obj = [aDecoder decodeObject];
|
||||||
|
[self setMainMenu: obj];
|
||||||
|
obj = [aDecoder decodeObject];
|
||||||
|
[self setWindowsMenu: obj];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -406,12 +406,12 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
return nil;
|
return nil;
|
||||||
|
|
|
@ -78,12 +78,12 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
if (cell)
|
if (cell)
|
||||||
[cell release];
|
[cell release];
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -297,9 +297,9 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: cell];
|
[aCoder encodeObject: cell];
|
||||||
[aCoder encodeObject: content_view];
|
[aCoder encodeObject: content_view];
|
||||||
|
@ -310,18 +310,19 @@
|
||||||
[aCoder encodeValueOfObjCType: @encode(NSTitlePosition) at: &title_position];
|
[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];
|
content_view = [aDecoder decodeObject];
|
||||||
offsets = [aDecoder decodeSize];
|
offsets = [aDecoder decodeSize];
|
||||||
border_rect = [aDecoder decodeRect];
|
border_rect = [aDecoder decodeRect];
|
||||||
title_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)
|
[aDecoder decodeValueOfObjCType: @encode(NSTitlePosition)
|
||||||
at: &title_position];
|
at: &title_position];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1340,12 +1340,12 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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];
|
||||||
|
|
||||||
|
|
|
@ -146,13 +146,13 @@ static NSImage *highlight_image;
|
||||||
|
|
||||||
- (id) copyWithZone: (NSZone*)zone
|
- (id) copyWithZone: (NSZone*)zone
|
||||||
{
|
{
|
||||||
NSBrowserCell* c = [super copyWithZone: zone];
|
NSBrowserCell *c = [super copyWithZone: zone];
|
||||||
// Copy the image cells
|
|
||||||
c->_branchImage = [_branchImage retain];
|
c->_branchImage = [_branchImage retain];
|
||||||
if (_alternateImage)
|
if (_alternateImage)
|
||||||
c->_alternateImage = [_alternateImage retain];
|
c->_alternateImage = [_alternateImage retain];
|
||||||
c->_highlightBranchImage = [_highlightBranchImage 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->_isLeaf = _isLeaf;
|
||||||
c->_isLoaded = _isLoaded;
|
c->_isLoaded = _isLoaded;
|
||||||
|
|
||||||
|
@ -309,11 +309,6 @@ static NSImage *highlight_image;
|
||||||
[self _drawImage: image inFrame: image_rect];
|
[self _drawImage: image inFrame: image_rect];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
|
|
||||||
{
|
|
||||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Editing Text
|
// Editing Text
|
||||||
//
|
//
|
||||||
|
|
|
@ -329,14 +329,14 @@ id _nsbuttonCellClass = nil;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
NSButtonCell.m
|
NSButtonCell.m
|
||||||
|
|
||||||
The button cell class
|
The button cell class
|
||||||
|
@ -10,14 +10,14 @@
|
||||||
Date: 1996
|
Date: 1996
|
||||||
Author: Felipe A. Rodriguez <far@ix.netcom.com>
|
Author: Felipe A. Rodriguez <far@ix.netcom.com>
|
||||||
Date: August 1998
|
Date: August 1998
|
||||||
|
|
||||||
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
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
version 2 of the License, or (at your option) any later version.
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
License along with this library; see the file COPYING.LIB.
|
License along with this library; see the file COPYING.LIB.
|
||||||
If not, write to the Free Software Foundation,
|
If not, write to the Free Software Foundation,
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gnustep/gui/config.h>
|
#include <gnustep/gui/config.h>
|
||||||
#include <Foundation/NSLock.h>
|
#include <Foundation/NSLock.h>
|
||||||
|
@ -72,45 +72,45 @@
|
||||||
delayInterval = 0.4;
|
delayInterval = 0.4;
|
||||||
repeatInterval = 0.075;
|
repeatInterval = 0.075;
|
||||||
altContents = nil;
|
altContents = nil;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- init
|
- init
|
||||||
{
|
{
|
||||||
[self initTextCell:@"Button"];
|
[self initTextCell:@"Button"];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- initImageCell:(NSImage *)anImage
|
- initImageCell:(NSImage *)anImage
|
||||||
{
|
{
|
||||||
[super initImageCell:anImage];
|
[super initImageCell:anImage];
|
||||||
|
|
||||||
contents = nil;
|
contents = nil;
|
||||||
|
|
||||||
return [self _init];
|
return [self _init];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initTextCell:(NSString *)aString
|
- initTextCell:(NSString *)aString
|
||||||
{
|
{
|
||||||
[super initTextCell:aString];
|
[super initTextCell:aString];
|
||||||
|
|
||||||
return [self _init];
|
return [self _init];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[altContents release];
|
[altContents release];
|
||||||
[altImage release];
|
[altImage release];
|
||||||
[keyEquivalent release];
|
[keyEquivalent release];
|
||||||
[keyEquivalentFont release];
|
[keyEquivalentFont release];
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the Titles
|
// Setting the Titles
|
||||||
//
|
//
|
||||||
- (NSString *)title { return [self stringValue]; }
|
- (NSString *)title { return [self stringValue]; }
|
||||||
- (NSString *)alternateTitle { return altContents; }
|
- (NSString *)alternateTitle { return altContents; }
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the Images
|
// Setting the Images
|
||||||
//
|
//
|
||||||
- (NSImage *)alternateImage { return altImage; }
|
- (NSImage *)alternateImage { return altImage; }
|
||||||
- (NSCellImagePosition)imagePosition { return image_position; }
|
- (NSCellImagePosition)imagePosition { return image_position; }
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the Repeat Interval
|
// Setting the Repeat Interval
|
||||||
//
|
//
|
||||||
- (void)getPeriodicDelay:(float *)delay interval:(float *)interval
|
- (void)getPeriodicDelay:(float *)delay interval:(float *)interval
|
||||||
{
|
{
|
||||||
|
@ -161,8 +161,8 @@
|
||||||
|
|
||||||
- (void) performClick: (id)sender
|
- (void) performClick: (id)sender
|
||||||
{
|
{
|
||||||
NSView *cv = [self controlView];
|
NSView *cv = [self controlView];
|
||||||
|
|
||||||
[self highlight: YES withFrame: [cv frame] inView: cv];
|
[self highlight: YES withFrame: [cv frame] inView: cv];
|
||||||
if (action && target)
|
if (action && target)
|
||||||
{
|
{
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the Key Equivalent
|
// Setting the Key Equivalent
|
||||||
//
|
//
|
||||||
- (NSString*) keyEquivalent
|
- (NSString*) keyEquivalent
|
||||||
{
|
{
|
||||||
|
@ -193,13 +193,13 @@
|
||||||
return keyEquivalentFont;
|
return keyEquivalentFont;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (unsigned int) keyEquivalentModifierMask
|
- (unsigned int) keyEquivalentModifierMask
|
||||||
{
|
{
|
||||||
return keyEquivalentModifierMask;
|
return keyEquivalentModifierMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setKeyEquivalent: (NSString*)key
|
- (void) setKeyEquivalent: (NSString*)key
|
||||||
{
|
{
|
||||||
if (keyEquivalent != key)
|
if (keyEquivalent != key)
|
||||||
{
|
{
|
||||||
[keyEquivalent release];
|
[keyEquivalent release];
|
||||||
|
@ -223,18 +223,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Modifying Graphic Attributes
|
// Modifying Graphic Attributes
|
||||||
//
|
//
|
||||||
- (BOOL)isTransparent { return transparent; }
|
- (BOOL)isTransparent { return transparent; }
|
||||||
- (void)setTransparent:(BOOL)flag { transparent = flag; }
|
- (void)setTransparent:(BOOL)flag { transparent = flag; }
|
||||||
|
|
||||||
- (BOOL)isOpaque
|
- (BOOL)isOpaque
|
||||||
{
|
{
|
||||||
return !transparent && [self isBordered];
|
return !transparent && [self isBordered];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Modifying Graphic Attributes
|
// Modifying Graphic Attributes
|
||||||
//
|
//
|
||||||
- (int)highlightsBy { return highlightsByMask; }
|
- (int)highlightsBy { return highlightsByMask; }
|
||||||
- (void)setHighlightsBy:(int)mask { highlightsByMask = mask; }
|
- (void)setHighlightsBy:(int)mask { highlightsByMask = mask; }
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
{
|
{
|
||||||
[super setType:buttonType];
|
[super setType:buttonType];
|
||||||
|
|
||||||
switch (buttonType)
|
switch (buttonType)
|
||||||
{
|
{
|
||||||
case NSMomentaryLight:
|
case NSMomentaryLight:
|
||||||
[self setHighlightsBy:NSChangeBackgroundCellMask];
|
[self setHighlightsBy:NSChangeBackgroundCellMask];
|
||||||
|
@ -307,37 +307,60 @@
|
||||||
- (NSColor *)textColor
|
- (NSColor *)textColor
|
||||||
{
|
{
|
||||||
if (([self state] && ([self showsStateBy] & NSChangeGrayCellMask))
|
if (([self state] && ([self showsStateBy] & NSChangeGrayCellMask))
|
||||||
|| ([self isHighlighted] && ([self highlightsBy] & NSChangeGrayCellMask)))
|
|| ([self isHighlighted] && ([self highlightsBy] & NSChangeGrayCellMask)))
|
||||||
return [NSColor lightGrayColor];
|
return [NSColor lightGrayColor];
|
||||||
return [NSColor blackColor];
|
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
|
// do nothing if cell's frame rect is zero
|
||||||
if (NSIsEmptyRect(cellFrame))
|
if (NSIsEmptyRect(cellFrame))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PSgsave ();
|
// draw the border if needed
|
||||||
NSRectClip (cellFrame);
|
if ([self isBordered])
|
||||||
|
{
|
||||||
|
if ([self isHighlighted] && ([self highlightsBy] & NSPushInCellMask))
|
||||||
|
{
|
||||||
|
NSDrawGrayBezel(cellFrame, cellFrame);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSDrawButton(cellFrame, cellFrame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Save last view drawn to
|
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||||
[self setControlView: 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
|
// determine the background color
|
||||||
if ([self state])
|
if ([self state])
|
||||||
{
|
{
|
||||||
if ( [self showsStateBy]
|
if ( [self showsStateBy]
|
||||||
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
||||||
backgroundGray = NSWhite;
|
backgroundGray = NSWhite;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([self isHighlighted])
|
if ([self isHighlighted])
|
||||||
{
|
{
|
||||||
if ( [self highlightsBy]
|
if ( [self highlightsBy]
|
||||||
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
||||||
backgroundGray = NSWhite;
|
backgroundGray = NSWhite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,57 +368,28 @@
|
||||||
[[NSColor colorWithCalibratedWhite:backgroundGray alpha:1.0] set];
|
[[NSColor colorWithCalibratedWhite:backgroundGray alpha:1.0] set];
|
||||||
NSRectFill(cellFrame);
|
NSRectFill(cellFrame);
|
||||||
|
|
||||||
// draw the border if needed
|
// Determine the image and the title that will be
|
||||||
if ([self isBordered])
|
// displayed. If the NSContentsCellMask is set the
|
||||||
{
|
// image and title are swapped only if state is 1 or
|
||||||
if ([self isHighlighted] && ([self highlightsBy] & NSPushInCellMask))
|
// if highlighting is set (when a button is pushed it's
|
||||||
{
|
|
||||||
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
|
|
||||||
// if highlighting is set (when a button is pushed it's
|
|
||||||
// content is changed to the face of reversed state).
|
// content is changed to the face of reversed state).
|
||||||
if ([self isHighlighted])
|
if ([self isHighlighted])
|
||||||
mask = [self highlightsBy];
|
mask = [self highlightsBy];
|
||||||
else
|
else
|
||||||
mask = [self showsStateBy];
|
mask = [self showsStateBy];
|
||||||
if (mask & NSContentsCellMask)
|
if (mask & NSContentsCellMask)
|
||||||
showAlternate = [self state];
|
showAlternate = [self state];
|
||||||
|
|
||||||
if (showAlternate || [self isHighlighted])
|
if (showAlternate || [self isHighlighted])
|
||||||
{
|
{
|
||||||
imageToDisplay = [self alternateImage];
|
imageToDisplay = [self alternateImage];
|
||||||
|
if (!imageToDisplay)
|
||||||
|
imageToDisplay = [self image];
|
||||||
titleToDisplay = [self alternateTitle];
|
titleToDisplay = [self alternateTitle];
|
||||||
if (!titleToDisplay)
|
if (!titleToDisplay)
|
||||||
titleToDisplay = [self title];
|
titleToDisplay = [self title];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
imageToDisplay = [self image];
|
imageToDisplay = [self image];
|
||||||
titleToDisplay = [self title];
|
titleToDisplay = [self title];
|
||||||
|
@ -403,83 +397,85 @@
|
||||||
|
|
||||||
if (imageToDisplay)
|
if (imageToDisplay)
|
||||||
imageSize = [imageToDisplay size];
|
imageSize = [imageToDisplay size];
|
||||||
|
|
||||||
rect = NSMakeRect (cellFrame.origin.x, cellFrame.origin.y,
|
rect = NSMakeRect (cellFrame.origin.x, cellFrame.origin.y,
|
||||||
imageSize.width, imageSize.height);
|
imageSize.width, imageSize.height);
|
||||||
|
|
||||||
switch ([self imagePosition])
|
switch ([self imagePosition])
|
||||||
{
|
{
|
||||||
case NSNoImage:
|
case NSNoImage:
|
||||||
// draw title only
|
// draw title only
|
||||||
[self _drawText: titleToDisplay inFrame: cellFrame];
|
[self _drawText: titleToDisplay inFrame: cellFrame];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSImageOnly:
|
case NSImageOnly:
|
||||||
// draw image only
|
// draw image only
|
||||||
[self _drawImage: imageToDisplay inFrame: cellFrame];
|
[self _drawImage: imageToDisplay inFrame: cellFrame];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSImageLeft:
|
case NSImageLeft:
|
||||||
// draw image to the left of the title
|
// draw image to the left of the title
|
||||||
rect.origin = cellFrame.origin;
|
rect.origin = cellFrame.origin;
|
||||||
rect.size.width = imageSize.width;
|
rect.size.width = imageSize.width;
|
||||||
rect.size.height = cellFrame.size.height;
|
rect.size.height = cellFrame.size.height;
|
||||||
[self _drawImage: imageToDisplay inFrame: rect];
|
[self _drawImage: imageToDisplay inFrame: rect];
|
||||||
|
|
||||||
// draw title
|
// draw title
|
||||||
rect.origin.x += imageSize.width + xDist;
|
rect.origin.x += imageSize.width + xDist;
|
||||||
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
|
rect.size.width = cellFrame.size.width - imageSize.width - xDist;
|
||||||
[self _drawText: titleToDisplay inFrame: rect];
|
[self _drawText: titleToDisplay inFrame: rect];
|
||||||
break;
|
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 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;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
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 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;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
case NSImageOverlaps:
|
case NSImageOverlaps:
|
||||||
// draw title over the image
|
// draw title over the image
|
||||||
[self _drawImage: imageToDisplay inFrame: cellFrame];
|
[self _drawImage: imageToDisplay inFrame: cellFrame];
|
||||||
[self _drawText: titleToDisplay inFrame: cellFrame];
|
[self _drawText: titleToDisplay inFrame: cellFrame];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone*)zone
|
- (id) copyWithZone: (NSZone*)zone
|
||||||
{
|
{
|
||||||
NSButtonCell* c = [super copyWithZone:zone];
|
NSButtonCell *c = [super copyWithZone: zone];
|
||||||
|
|
||||||
c->altContents = [[altContents copy] retain];
|
c->altContents = [altContents copyWithZone: zone];
|
||||||
if(altImage)
|
if (altImage)
|
||||||
c->altImage = [altImage retain];
|
c->altImage = [altImage retain];
|
||||||
c->keyEquivalent = [[keyEquivalent copy] retain];
|
c->keyEquivalent = [keyEquivalent copyWithZone: zone];
|
||||||
if(keyEquivalentFont)
|
if (keyEquivalentFont)
|
||||||
c->keyEquivalentFont = [keyEquivalentFont retain];
|
c->keyEquivalentFont = [keyEquivalentFont retain];
|
||||||
c->keyEquivalentModifierMask = keyEquivalentModifierMask;
|
c->keyEquivalentModifierMask = keyEquivalentModifierMask;
|
||||||
c->transparent = transparent;
|
c->transparent = transparent;
|
||||||
c->highlightsByMask = highlightsByMask;
|
c->highlightsByMask = highlightsByMask;
|
||||||
|
@ -491,24 +487,28 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder:aCoder];
|
||||||
|
|
||||||
NSDebugLog(@"NSButtonCell: start encoding\n");
|
NSDebugLog(@"NSButtonCell: start encoding\n");
|
||||||
|
[aCoder encodeObject: keyEquivalent];
|
||||||
|
[aCoder encodeObject: keyEquivalentFont];
|
||||||
[aCoder encodeObject: altContents];
|
[aCoder encodeObject: altContents];
|
||||||
[aCoder encodeObject: altImage];
|
[aCoder encodeObject: altImage];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent];
|
||||||
NSDebugLog(@"NSButtonCell: finish encoding\n");
|
NSDebugLog(@"NSButtonCell: finish encoding\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
NSDebugLog(@"NSButtonCell: start decoding\n");
|
NSDebugLog(@"NSButtonCell: start decoding\n");
|
||||||
altContents = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &keyEquivalent];
|
||||||
altImage = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &keyEquivalentFont];
|
||||||
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &altContents];
|
||||||
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &altImage];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent];
|
||||||
NSDebugLog(@"NSButtonCell: finish decoding\n");
|
NSDebugLog(@"NSButtonCell: finish decoding\n");
|
||||||
|
|
||||||
|
|
|
@ -551,10 +551,11 @@ return NSZeroSize;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,11 +108,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -616,7 +616,14 @@
|
||||||
|
|
||||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
- (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])
|
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:");
|
NSDebugLog (@"NSCell drawWithFrame: inView:");
|
||||||
|
|
||||||
// We apply a clipping rectangle so save the graphics state
|
|
||||||
PSgsave ();
|
|
||||||
|
|
||||||
// Save last view drawn to
|
// Save last view drawn to
|
||||||
[self setControlView: controlView];
|
[self setControlView: controlView];
|
||||||
|
|
||||||
// Clear the cell frame
|
// do nothing if cell's frame rect is zero
|
||||||
if ([self isOpaque])
|
if (NSIsEmptyRect(cellFrame))
|
||||||
{
|
return;
|
||||||
[[NSColor lightGrayColor] set];
|
|
||||||
NSRectFill(cellFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw the border if needed
|
// draw the border if needed
|
||||||
if ([self isBordered])
|
if ([self isBordered])
|
||||||
{
|
{
|
||||||
if ([self isBezeled])
|
if ([self isBezeled])
|
||||||
{
|
{
|
||||||
NSDrawWhiteBezel (cellFrame, cellFrame);
|
NSDrawWhiteBezel(cellFrame, cellFrame);
|
||||||
cellFrame = NSInsetRect (cellFrame, 2, 2);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSFrameRect (cellFrame);
|
NSFrameRect(cellFrame);
|
||||||
cellFrame = NSInsetRect (cellFrame, 1, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSRectClip(cellFrame);
|
|
||||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||||
|
|
||||||
PSgrestore ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isHighlighted
|
- (BOOL) isHighlighted
|
||||||
|
@ -676,10 +672,13 @@
|
||||||
|
|
||||||
- (void) highlight: (BOOL)lit
|
- (void) highlight: (BOOL)lit
|
||||||
withFrame: (NSRect)cellFrame
|
withFrame: (NSRect)cellFrame
|
||||||
inView: (NSView *)controlView // FIX ME
|
inView: (NSView*)controlView
|
||||||
{
|
{
|
||||||
cell_highlighted = lit;
|
if (cell_highlighted != lit)
|
||||||
[self drawWithFrame: cellFrame inView: controlView];
|
{
|
||||||
|
cell_highlighted = lit;
|
||||||
|
[self drawWithFrame: cellFrame inView: controlView];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -958,9 +957,9 @@
|
||||||
|
|
||||||
- (id) copyWithZone: (NSZone*)zone
|
- (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_image, cell_image);
|
||||||
ASSIGN(c->cell_font, cell_font);
|
ASSIGN(c->cell_font, cell_font);
|
||||||
c->cell_state = cell_state;
|
c->cell_state = cell_state;
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ static NSMutableDictionary *colorStrings = nil;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
// Version 1
|
// Version 1
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &RGB_component.red];
|
[aCoder encodeValueOfObjCType: @encode(float) at: &RGB_component.red];
|
||||||
|
@ -1087,7 +1087,7 @@ static NSMutableDictionary *colorStrings = nil;
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &valid_components];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &valid_components];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
|
@ -1105,9 +1105,9 @@ static NSMutableDictionary *colorStrings = nil;
|
||||||
// +++ Coding cannot return class version yet
|
// +++ Coding cannot return class version yet
|
||||||
// if ([aDecoder versionForClassName: s] > 1)
|
// if ([aDecoder versionForClassName: s] > 1)
|
||||||
{
|
{
|
||||||
colorspace_name = [[aDecoder decodeObject] retain];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &colorspace_name];
|
||||||
catalog_name = [[aDecoder decodeObject] retain];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &catalog_name];
|
||||||
color_name = [[aDecoder decodeObject] retain];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_name];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.cyan];
|
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.cyan];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.magenta];
|
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.magenta];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.yellow];
|
[aDecoder decodeValueOfObjCType: @encode(float) at: &CMYK_component.yellow];
|
||||||
|
|
|
@ -280,7 +280,7 @@ static NSLock *gnustep_color_list_lock;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: list_name];
|
[aCoder encodeObject: list_name];
|
||||||
[aCoder encodeObject: color_list];
|
[aCoder encodeObject: color_list];
|
||||||
|
@ -288,12 +288,12 @@ static NSLock *gnustep_color_list_lock;
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_editable];
|
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_editable];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
list_name = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &list_name];
|
||||||
color_list = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_list];
|
||||||
color_list_keys = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &color_list_keys];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_editable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,14 +148,14 @@ fromView:(NSView *)sourceView
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,20 +144,20 @@ NSRect inside = rect;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
[aCoder encodeObject: the_color];
|
[aCoder encodeObject: the_color];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_active];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_active];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_bordered];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_bordered];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
the_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &the_color];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_active];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_active];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_bordered];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_bordered];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,14 +86,14 @@ static id _NSCONTROL_CELL_CLASS = nil;
|
||||||
//
|
//
|
||||||
// Creating copies
|
// 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: o];
|
||||||
[c setCell: [[cell copy] autorelease]]; // a copy of cell
|
[o release];
|
||||||
|
return c;
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -439,22 +439,22 @@ unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask |
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType: "i" at: &tag];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &tag];
|
||||||
[aCoder encodeObject: cell];
|
[aCoder encodeObject: cell];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &tag];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &tag];
|
||||||
cell = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &cell];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -215,11 +215,11 @@ static BOOL gnustep_gui_hidden_until_move;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
@implementation NSCustomImageRep
|
@implementation NSCustomImageRep
|
||||||
|
|
||||||
- (id) initWithDrawSelector: (SEL)aSelector
|
- (id) initWithDrawSelector: (SEL)aSelector
|
||||||
delegate: (id)anObject
|
delegate: (id)anObject
|
||||||
{
|
{
|
||||||
[super init];
|
[super init];
|
||||||
|
|
||||||
|
@ -66,20 +66,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder: aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: delegate];
|
[aCoder encodeObject: delegate];
|
||||||
// FIXME: [aCoder encodeSelector: selector];
|
[aCoder encodeValueOfObjCType: @encode(SEL) at: &selector];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aDecoder];
|
self = [super initWithCoder: aDecoder];
|
||||||
|
|
||||||
delegate = [[aDecoder decodeObject] retain];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &delegate];
|
||||||
// FIXME: selector = [aDecoder decodeSelector];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &selector];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,11 +184,11 @@ supportingTypes:(NSArray *)newTypes
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,11 +236,11 @@ cheapCopyAllowed:(BOOL)flag
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,14 +113,14 @@ isMultiple:(BOOL)flag
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,12 +71,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder: aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
return self;
|
return self;
|
||||||
|
|
138
Source/NSEvent.m
138
Source/NSEvent.m
|
@ -451,100 +451,100 @@ NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
[aCoder encodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
||||||
[aCoder encodePoint: location_point];
|
[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: @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?
|
// We don't want to encode the context, right?
|
||||||
// DPSContext doesn't conform to NSCoding
|
// DPSContext doesn't conform to NSCoding
|
||||||
//[aCoder encodeObjectReference: event_context withName: @"Context"];
|
//[aCoder encodeObjectReference: event_context withName: @"Context"];
|
||||||
|
|
||||||
// Encode the event date based upon the event type
|
// Encode the event date based upon the event type
|
||||||
switch (event_type)
|
switch (event_type)
|
||||||
{
|
{
|
||||||
case NSLeftMouseDown:
|
case NSLeftMouseDown:
|
||||||
case NSLeftMouseUp:
|
case NSLeftMouseUp:
|
||||||
case NSRightMouseDown:
|
case NSRightMouseDown:
|
||||||
case NSRightMouseUp:
|
case NSRightMouseUp:
|
||||||
case NSMouseMoved:
|
case NSMouseMoved:
|
||||||
case NSLeftMouseDragged:
|
case NSLeftMouseDragged:
|
||||||
case NSRightMouseDragged:
|
case NSRightMouseDragged:
|
||||||
[aCoder encodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
|
[aCoder encodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
|
||||||
&event_data.mouse.click, &event_data.mouse.pressure];
|
&event_data.mouse.click, &event_data.mouse.pressure];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSMouseEntered:
|
case NSMouseEntered:
|
||||||
case NSMouseExited:
|
case NSMouseExited:
|
||||||
case NSCursorUpdate:
|
case NSCursorUpdate:
|
||||||
// Can't do anything with the user_data!?
|
// Can't do anything with the user_data!?
|
||||||
[aCoder encodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
|
[aCoder encodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
|
||||||
&event_data.tracking.tracking_num];
|
&event_data.tracking.tracking_num];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSKeyDown:
|
case NSKeyDown:
|
||||||
case NSKeyUp:
|
case NSKeyUp:
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &event_data.key.repeat];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &event_data.key.repeat];
|
||||||
[aCoder encodeObject: event_data.key.char_keys];
|
[aCoder encodeObject: event_data.key.char_keys];
|
||||||
[aCoder encodeObject: event_data.key.unmodified_keys];
|
[aCoder encodeObject: event_data.key.unmodified_keys];
|
||||||
[aCoder encodeValueOfObjCType: "S" at: &event_data.key.key_code];
|
[aCoder encodeValueOfObjCType: "S" at: &event_data.key.key_code];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSFlagsChanged:
|
case NSFlagsChanged:
|
||||||
case NSPeriodic:
|
case NSPeriodic:
|
||||||
[aCoder encodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
|
[aCoder encodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
|
||||||
&event_data.misc.data1, &event_data.misc.data2];
|
&event_data.misc.data1, &event_data.misc.data2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[aDecoder decodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
[aDecoder decodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
||||||
location_point = [aDecoder decodePoint];
|
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: @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
|
// Decode the event date based upon the event type
|
||||||
switch (event_type)
|
switch (event_type)
|
||||||
{
|
{
|
||||||
case NSLeftMouseDown:
|
case NSLeftMouseDown:
|
||||||
case NSLeftMouseUp:
|
case NSLeftMouseUp:
|
||||||
case NSRightMouseDown:
|
case NSRightMouseDown:
|
||||||
case NSRightMouseUp:
|
case NSRightMouseUp:
|
||||||
case NSMouseMoved:
|
case NSMouseMoved:
|
||||||
case NSLeftMouseDragged:
|
case NSLeftMouseDragged:
|
||||||
case NSRightMouseDragged:
|
case NSRightMouseDragged:
|
||||||
[aDecoder decodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
|
[aDecoder decodeValuesOfObjCTypes: "iif", &event_data.mouse.event_num,
|
||||||
&event_data.mouse.click, &event_data.mouse.pressure];
|
&event_data.mouse.click, &event_data.mouse.pressure];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSMouseEntered:
|
case NSMouseEntered:
|
||||||
case NSMouseExited:
|
case NSMouseExited:
|
||||||
case NSCursorUpdate:
|
case NSCursorUpdate:
|
||||||
// Can't do anything with the user_data!?
|
// Can't do anything with the user_data!?
|
||||||
[aDecoder decodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
|
[aDecoder decodeValuesOfObjCTypes: "ii", &event_data.tracking.event_num,
|
||||||
&event_data.tracking.tracking_num];
|
&event_data.tracking.tracking_num];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSKeyDown:
|
case NSKeyDown:
|
||||||
case NSKeyUp:
|
case NSKeyUp:
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
||||||
at: &event_data.key.repeat];
|
at: &event_data.key.repeat];
|
||||||
event_data.key.char_keys = [aDecoder decodeObject];
|
event_data.key.char_keys = [aDecoder decodeObject];
|
||||||
event_data.key.unmodified_keys = [aDecoder decodeObject];
|
event_data.key.unmodified_keys = [aDecoder decodeObject];
|
||||||
[aDecoder decodeValueOfObjCType: "S" at: &event_data.key.key_code];
|
[aDecoder decodeValueOfObjCType: "S" at: &event_data.key.key_code];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSFlagsChanged:
|
case NSFlagsChanged:
|
||||||
case NSPeriodic:
|
case NSPeriodic:
|
||||||
[aDecoder decodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
|
[aDecoder decodeValuesOfObjCTypes: "sii", &event_data.misc.sub_type,
|
||||||
&event_data.misc.data1, &event_data.misc.data2];
|
&event_data.misc.data1, &event_data.misc.data2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,16 +202,16 @@
|
||||||
//
|
//
|
||||||
// Archiving
|
// 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
|
@end
|
||||||
|
|
|
@ -237,16 +237,16 @@ void setNSFont(NSString* key, NSFont* font)
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeObject:fontName];
|
[aCoder encodeObject: fontName];
|
||||||
[aCoder encodeArrayOfObjCType:"f" count:6 at:matrix];
|
[aCoder encodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
fontName = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &fontName];
|
||||||
[aDecoder decodeArrayOfObjCType:"f" count:6 at:matrix];
|
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,16 +115,16 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: panel_font];
|
[aCoder encodeObject: panel_font];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
panel_font = [aDecoder decodeObject];
|
panel_font = [aDecoder decodeObject];
|
||||||
|
|
||||||
|
|
|
@ -196,14 +196,14 @@ static Class defaultCellClass = nil;
|
||||||
- (void)selectTextAtIndex:(int)index
|
- (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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,7 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)drawWithFrame:(NSRect)cellFrame
|
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||||
inView:(NSView*)controlView
|
|
||||||
{
|
{
|
||||||
NSRect titleFrame;
|
NSRect titleFrame;
|
||||||
NSRect textFrame;
|
NSRect textFrame;
|
||||||
|
@ -123,18 +122,18 @@
|
||||||
NSDivideRect(cellFrame, &titleFrame, &textFrame,
|
NSDivideRect(cellFrame, &titleFrame, &textFrame,
|
||||||
[self titleWidth] + 4, NSMinXEdge);
|
[self titleWidth] + 4, NSMinXEdge);
|
||||||
|
|
||||||
[titleCell drawWithFrame:titleFrame inView:controlView];
|
[titleCell drawWithFrame: titleFrame inView: controlView];
|
||||||
[super drawWithFrame:textFrame 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,14 +114,14 @@ to:(id)anObject
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -906,11 +906,11 @@ static NSDictionary* nsmapping = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSCoding
|
// NSCoding
|
||||||
- (void)encodeWithCoder:(NSCoder *)coder
|
- (void) encodeWithCoder: (NSCoder*)coder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)initWithCoder:(NSCoder *)coder
|
- (id) initWithCoder: (NSCoder*)coder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,7 +370,7 @@ extension(NSString *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
- (void) encodeWithCoder: aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: _colorSpace];
|
[aCoder encodeObject: _colorSpace];
|
||||||
[aCoder encodeSize: size];
|
[aCoder encodeSize: size];
|
||||||
|
@ -381,9 +381,9 @@ extension(NSString *name)
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_pixelsHigh];
|
[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];
|
size = [aDecoder decodeSize];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hasAlpha];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hasAlpha];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &isOpaque];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &isOpaque];
|
||||||
|
|
|
@ -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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,16 +302,16 @@ static Class menuCellClass = nil;
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone*)zone
|
- (id)copyWithZone:(NSZone*)zone
|
||||||
{
|
{
|
||||||
NSMenu* copy = NSAllocateObject (isa, 0, zone);
|
NSMenu *copy = NSAllocateObject (isa, 0, zone);
|
||||||
int i, count;
|
unsigned i, count;
|
||||||
NSArray* cells;
|
NSArray *cells;
|
||||||
|
|
||||||
NSDebugLog (@"copy menu with title '%@'", [self title]);
|
NSDebugLog (@"copy menu with title '%@'", [self title]);
|
||||||
|
|
||||||
copy->title = [title copyWithZone:zone];
|
copy->title = [title copyWithZone: zone];
|
||||||
|
|
||||||
copy->menuCells = [menuCells copyWithZone:zone];
|
copy->menuCells = [menuCells copyWithZone: zone];
|
||||||
[copy->menuCells setMenu:copy];
|
[copy->menuCells setMenu: copy];
|
||||||
|
|
||||||
/* Change the supermenu object of the new cells to the new menu */
|
/* Change the supermenu object of the new cells to the new menu */
|
||||||
cells = [copy->menuCells itemArray];
|
cells = [copy->menuCells itemArray];
|
||||||
|
@ -602,12 +602,12 @@ static Class menuCellClass = nil;
|
||||||
return menuCells;
|
return menuCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:(NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)encodeWithCoder:(NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ static BOOL usesUserKeyEquivalents = YES;
|
||||||
|
|
||||||
- (id) copyWithZone: (NSZone*)zone
|
- (id) copyWithZone: (NSZone*)zone
|
||||||
{
|
{
|
||||||
NSMenuItem* copy = [super copyWithZone:zone];
|
NSMenuItem *copy = [super copyWithZone: zone];
|
||||||
|
|
||||||
NSDebugLog (@"menu item '%@' copy", [self title]);
|
NSDebugLog (@"menu item '%@' copy", [self title]);
|
||||||
copy->representedObject = [representedObject retain];
|
copy->representedObject = [representedObject retain];
|
||||||
|
|
|
@ -199,9 +199,9 @@ static NSOpenPanel *gnustep_gui_open_panel = nil;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: the_filenames];
|
[aCoder encodeObject: the_filenames];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &multiple_select];
|
[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];
|
[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: &multiple_select];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_dir];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_dir];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_file];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &choose_file];
|
||||||
|
|
|
@ -115,14 +115,14 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,12 +159,12 @@
|
||||||
//
|
//
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[list_items release];
|
[list_items release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
@ -326,26 +326,26 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: list_items];
|
[aCoder encodeObject: list_items];
|
||||||
[aCoder encodeRect: list_rect];
|
[aCoder encodeRect: list_rect];
|
||||||
[aCoder encodeValueOfObjCType: "i" at: &selected_item];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &selected_item];
|
||||||
[aCoder encodeConditionalObject:pub_target];
|
[aCoder encodeConditionalObject: pub_target];
|
||||||
[aCoder encodeValueOfObjCType: @encode(SEL) at: &pub_action];
|
[aCoder encodeValueOfObjCType: @encode(SEL) at: &pub_action];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_up];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_up];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &pulls_down];
|
[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];
|
list_rect = [aDecoder decodeRect];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &selected_item];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &selected_item];
|
||||||
pub_target = [aDecoder decodeObject];
|
pub_target = [aDecoder decodeObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &pub_action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &pub_action];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_up];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_up];
|
||||||
|
|
|
@ -338,14 +338,14 @@ NSDictionary *paperSizes = nil;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,14 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// 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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -872,44 +872,44 @@ andOptionTranslation:(NSString *)optionTranslation
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
// [super encodeWithCoder:aCoder];
|
// [super encodeWithCoder:aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject:printerHost];
|
[aCoder encodeObject: printerHost];
|
||||||
[aCoder encodeObject:printerName];
|
[aCoder encodeObject: printerName];
|
||||||
[aCoder encodeObject:printerNote];
|
[aCoder encodeObject: printerNote];
|
||||||
[aCoder encodeObject:printerType];
|
[aCoder encodeObject: printerType];
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType:"i" at:&cacheAcceptsBinary];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &cacheAcceptsBinary];
|
||||||
[aCoder encodeValueOfObjCType:"i" at:&cacheOutputOrder];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &cacheOutputOrder];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at:&isRealPrinter];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &isRealPrinter];
|
||||||
|
|
||||||
[aCoder encodeObject:PPD];
|
[aCoder encodeObject: PPD];
|
||||||
[aCoder encodeObject:PPDOptionTranslation];
|
[aCoder encodeObject: PPDOptionTranslation];
|
||||||
[aCoder encodeObject:PPDArgumentTranslation];
|
[aCoder encodeObject: PPDArgumentTranslation];
|
||||||
[aCoder encodeObject:PPDOrderDependency];
|
[aCoder encodeObject: PPDOrderDependency];
|
||||||
[aCoder encodeObject:PPDUIConstraints];
|
[aCoder encodeObject: PPDUIConstraints];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
// self = [super initWithCoder:aDecoder];
|
// self = [super initWithCoder:aDecoder];
|
||||||
|
|
||||||
printerHost = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerHost];
|
||||||
printerName = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerName];
|
||||||
printerNote = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerNote];
|
||||||
printerType = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &printerType];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType:"i" at:&cacheAcceptsBinary];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &cacheAcceptsBinary];
|
||||||
[aDecoder decodeValueOfObjCType:"i" at:&cacheOutputOrder];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &cacheOutputOrder];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at:&isRealPrinter];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &isRealPrinter];
|
||||||
|
|
||||||
PPD = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPD];
|
||||||
PPDOptionTranslation = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDOptionTranslation];
|
||||||
PPDArgumentTranslation = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDArgumentTranslation];
|
||||||
PPDOrderDependency = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDOrderDependency];
|
||||||
PPDUIConstraints = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &PPDUIConstraints];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,22 +238,14 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
#if 0
|
[aCoder encodeConditionalObject: next_responder];
|
||||||
[aCoder encodeObjectReference: next_responder withName: @"Next responder"];
|
|
||||||
#else
|
|
||||||
[aCoder encodeConditionalObject:next_responder];
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
[aDecoder decodeObjectAt: &next_responder withName: NULL];
|
|
||||||
#else
|
|
||||||
next_responder = [aDecoder decodeObject];
|
next_responder = [aDecoder decodeObject];
|
||||||
#endif
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,7 +428,7 @@ shouldShowFilename:(NSString *)filename
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: _accessoryView];
|
[aCoder encodeObject: _accessoryView];
|
||||||
[aCoder encodeObject: panel_title];
|
[aCoder encodeObject: panel_title];
|
||||||
|
@ -437,14 +437,10 @@ shouldShowFilename:(NSString *)filename
|
||||||
[aCoder encodeObject: file_name];
|
[aCoder encodeObject: file_name];
|
||||||
[aCoder encodeObject: required_type];
|
[aCoder encodeObject: required_type];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at:&required_type];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at:&required_type];
|
||||||
#if 0
|
[aCoder encodeConditionalObject: delegate];
|
||||||
[aCoder encodeObjectReference: delegate withName: @"Delegate"];
|
|
||||||
#else
|
|
||||||
[aCoder encodeConditionalObject:delegate];
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
_accessoryView = [aDecoder decodeObject];
|
_accessoryView = [aDecoder decodeObject];
|
||||||
panel_title = [aDecoder decodeObject];
|
panel_title = [aDecoder decodeObject];
|
||||||
|
@ -453,11 +449,7 @@ shouldShowFilename:(NSString *)filename
|
||||||
file_name = [aDecoder decodeObject];
|
file_name = [aDecoder decodeObject];
|
||||||
required_type = [aDecoder decodeObject];
|
required_type = [aDecoder decodeObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&required_type];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at:&required_type];
|
||||||
#if 0
|
|
||||||
[aDecoder decodeObjectAt: &delegate withName: NULL];
|
|
||||||
#else
|
|
||||||
delegate = [aDecoder decodeObject];
|
delegate = [aDecoder decodeObject];
|
||||||
#endif
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,11 +108,11 @@
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
|
|
||||||
Author: Ovidiu Predescu <ovidiu@net-community.com>
|
Author: Ovidiu Predescu <ovidiu@net-community.com>
|
||||||
Date: September 1997
|
Date: September 1997
|
||||||
|
|
||||||
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
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
version 2 of the License, or (at your option) any later version.
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
@ -75,36 +75,36 @@
|
||||||
if ([self image])
|
if ([self image])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[[NSColor darkGrayColor] set];
|
[[NSColor darkGrayColor] set];
|
||||||
NSRectFill(rect); // draw the bar
|
NSRectFill(rect); // draw the bar
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSRect)knobRectFlipped:(BOOL)flipped
|
- (NSRect)knobRectFlipped:(BOOL)flipped
|
||||||
{
|
{
|
||||||
NSImage* image = [_knobCell image];
|
NSImage* image = [_knobCell image];
|
||||||
NSSize size;
|
NSSize size;
|
||||||
NSPoint origin;
|
NSPoint origin;
|
||||||
float floatValue;
|
float floatValue;
|
||||||
|
|
||||||
if (_isVertical && flipped)
|
if (_isVertical && flipped)
|
||||||
_floatValue = _maxValue + _minValue - _floatValue;
|
_floatValue = _maxValue + _minValue - _floatValue;
|
||||||
|
|
||||||
floatValue = (_floatValue - _minValue) / (_maxValue - _minValue);
|
floatValue = (_floatValue - _minValue) / (_maxValue - _minValue);
|
||||||
|
|
||||||
size = [image size];
|
size = [image size];
|
||||||
|
|
||||||
if (_isVertical)
|
if (_isVertical)
|
||||||
{
|
{
|
||||||
origin.x = 2;
|
origin.x = 0;
|
||||||
origin.y = ((_trackRect.size.height - size.height) * floatValue) + 2;
|
origin.y = (_trackRect.size.height - size.height) * floatValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
origin.x = ((_trackRect.size.width - size.width) * floatValue) + 2;
|
origin.x = (_trackRect.size.width - size.width) * floatValue;
|
||||||
origin.y = 2;
|
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
|
- (void)drawKnob
|
||||||
|
@ -204,18 +204,19 @@ float floatValue;
|
||||||
- (double)maxValue { return _maxValue; }
|
- (double)maxValue { return _maxValue; }
|
||||||
- (float)floatValue { return _floatValue; }
|
- (float)floatValue { return _floatValue; }
|
||||||
|
|
||||||
- (id)initWithCoder:(NSCoder*)decoder
|
- (id) initWithCoder: (NSCoder*)decoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder:decoder];
|
self = [super initWithCoder: decoder];
|
||||||
[decoder decodeValuesOfObjCTypes:"ffff",
|
[decoder decodeValuesOfObjCTypes:"ffff",
|
||||||
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
|
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)encodeWithCoder:(NSCoder*)coder
|
- (void) encodeWithCoder: (NSCoder*)coder
|
||||||
{
|
{
|
||||||
|
[super encodeWithCoder: coder];
|
||||||
[coder encodeValuesOfObjCTypes:"ffff",
|
[coder encodeValuesOfObjCTypes:"ffff",
|
||||||
_minValue, _maxValue, _floatValue, _altIncrementValue];
|
&_minValue, &_maxValue, &_floatValue, &_altIncrementValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -2231,54 +2231,55 @@ NSLog(@"opti hook 2");
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{ [super encodeWithCoder:aCoder];
|
{
|
||||||
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeConditionalObject:delegate];
|
[aCoder encodeConditionalObject:delegate];
|
||||||
|
|
||||||
[aCoder encodeObject: plainContent];
|
[aCoder encodeObject: plainContent];
|
||||||
[aCoder encodeObject: rtfContent];
|
[aCoder encodeObject: rtfContent];
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType: "I" at: &alignment];
|
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &alignment];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_editable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_editable];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
|
||||||
[aCoder encodeObject: background_color];
|
[aCoder encodeObject: background_color];
|
||||||
[aCoder encodeObject: text_color];
|
[aCoder encodeObject: text_color];
|
||||||
[aCoder encodeObject: default_font];
|
[aCoder encodeObject: default_font];
|
||||||
[aCoder encodeValueOfObjCType: @encode(NSRange) at: &selected_range];
|
[aCoder encodeValueOfObjCType: @encode(NSRange) at: &selected_range];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{ [super initWithCoder:aDecoder];
|
{
|
||||||
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
delegate = [aDecoder decodeObject];
|
delegate = [aDecoder decodeObject];
|
||||||
|
|
||||||
plainContent= [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &plainContent];
|
||||||
rtfContent= [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &rtfContent];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: "I" at: &alignment];
|
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &alignment];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_editable];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_rich_text];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_selectable];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &imports_graphics];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &uses_font_panel];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_horizontally_resizable];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_vertically_resizable];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
|
||||||
background_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
|
||||||
text_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &text_color];
|
||||||
default_font = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &default_font];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(NSRange) at: &selected_range];
|
[aDecoder decodeValueOfObjCType: @encode(NSRange) at: &selected_range];
|
||||||
|
return self;
|
||||||
return self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -100,14 +100,14 @@ id _nsTextfieldCellClass = nil;
|
||||||
text_cursor = aCursor;
|
text_cursor = aCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
- copyWithZone:(NSZone *)zone
|
- (id) copyWithZone: (NSZone*)zone
|
||||||
{
|
{
|
||||||
id c;
|
id c;
|
||||||
|
|
||||||
c = [super copyWithZone: zone];
|
c = [super copyWithZone: zone];
|
||||||
[c setTextCursor: [NSCursor IBeamCursor]];
|
[c setTextCursor: [NSCursor IBeamCursor]];
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -420,35 +420,23 @@ id nextResponder;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
#if 0
|
[aCoder encodeConditionalObject: next_text];
|
||||||
[aCoder encodeObjectReference: next_text withName: @"Next text"];
|
[aCoder encodeConditionalObject: previous_text];
|
||||||
[aCoder encodeObjectReference: previous_text withName: @"Previous text"];
|
[aCoder encodeConditionalObject: text_delegate];
|
||||||
[aCoder encodeObjectReference: text_delegate withName: @"Text delegate"];
|
|
||||||
#else
|
|
||||||
[aCoder encodeConditionalObject:next_text];
|
|
||||||
[aCoder encodeConditionalObject:previous_text];
|
|
||||||
[aCoder encodeConditionalObject:text_delegate];
|
|
||||||
#endif
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(SEL) at: &error_action];
|
[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];
|
next_text = [aDecoder decodeObject];
|
||||||
previous_text = [aDecoder decodeObject];
|
previous_text = [aDecoder decodeObject];
|
||||||
text_delegate = [aDecoder decodeObject];
|
text_delegate = [aDecoder decodeObject];
|
||||||
#endif
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &error_action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &error_action];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -93,9 +93,9 @@
|
||||||
[super dealloc];
|
[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 setBackgroundColor: background_color];
|
||||||
[c setTextColor: text_color];
|
[c setTextColor: text_color];
|
||||||
|
@ -229,35 +229,24 @@
|
||||||
[super setStringValue:aString];
|
[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
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeObject: background_color];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &background_color];
|
||||||
[aCoder encodeObject: text_color];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &text_color];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &draw_background];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &draw_background];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
background_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
|
||||||
text_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &text_color];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &draw_background];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &draw_background];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
static NSString *viewThreadKey = @"NSViewThreadKey";
|
static NSString *viewThreadKey = @"NSViewThreadKey";
|
||||||
static NSAffineTransform *flip = nil;
|
static NSAffineTransform *flip = nil;
|
||||||
|
|
||||||
static void (*concatImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
|
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
|
||||||
static SEL concatSel = @selector(concatenateWith:);
|
static SEL appSel = @selector(appendTransform:);
|
||||||
|
|
||||||
static void (*invalidateImp)(NSView*, SEL) = 0;
|
static void (*invalidateImp)(NSView*, SEL) = 0;
|
||||||
static SEL invalidateSel = @selector(_invalidateCoordinates);
|
static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
|
@ -74,8 +74,8 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
Class matrixClass = [NSAffineTransform class];
|
Class matrixClass = [NSAffineTransform class];
|
||||||
NSAffineTransformStruct ats = { 1, 0, 0, -1, 0, 1 };
|
NSAffineTransformStruct ats = { 1, 0, 0, -1, 0, 1 };
|
||||||
|
|
||||||
concatImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
||||||
[matrixClass instanceMethodForSelector: concatSel];
|
[matrixClass instanceMethodForSelector: appSel];
|
||||||
|
|
||||||
invalidateImp = (void (*)(NSView*, SEL))
|
invalidateImp = (void (*)(NSView*, SEL))
|
||||||
[self instanceMethodForSelector: invalidateSel];
|
[self instanceMethodForSelector: invalidateSel];
|
||||||
|
@ -1879,13 +1879,13 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
|
|
||||||
[pMatrix getMatrix: vals];
|
[pMatrix getMatrix: vals];
|
||||||
[matrixToWindow setMatrix: vals];
|
[matrixToWindow setMatrix: vals];
|
||||||
(*concatImp)(matrixToWindow, concatSel, frameMatrix);
|
(*appImp)(matrixToWindow, appSel, frameMatrix);
|
||||||
if ([self isFlipped] != wasFlipped)
|
if ([self isFlipped] != wasFlipped)
|
||||||
{
|
{
|
||||||
flip->matrix.ty = bounds.size.height;
|
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];
|
[matrixToWindow getMatrix: vals];
|
||||||
[matrixFromWindow setMatrix: vals];
|
[matrixFromWindow setMatrix: vals];
|
||||||
[matrixFromWindow inverse];
|
[matrixFromWindow inverse];
|
||||||
|
|
|
@ -1327,93 +1327,87 @@ id result = nil;
|
||||||
//
|
//
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
//
|
//
|
||||||
- (void)encodeWithCoder:aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[self setNextResponder: nil];
|
[self setNextResponder: nil];
|
||||||
|
|
||||||
[super encodeWithCoder:aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
NSDebugLog(@"NSWindow: start encoding\n");
|
NSDebugLog(@"NSWindow: start encoding\n");
|
||||||
[aCoder encodeRect:frame];
|
[aCoder encodeRect: frame];
|
||||||
[aCoder encodeObject:content_view];
|
[aCoder encodeObject: content_view];
|
||||||
// [aCoder encodeObjectReference: first_responder withName:NULL];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &window_num];
|
||||||
// [aCoder encodeObjectReference: original_responder withName:NULL];
|
[aCoder encodeObject: background_color];
|
||||||
// [aCoder encodeObjectReference: delegate withName:NULL];
|
[aCoder encodeObject: represented_filename];
|
||||||
[aCoder encodeValueOfObjCType:"i" at:&window_num];
|
[aCoder encodeObject: miniaturized_title];
|
||||||
[aCoder encodeObject:background_color];
|
[aCoder encodeObject: window_title];
|
||||||
[aCoder encodeObject:represented_filename];
|
[aCoder encodePoint: last_point];
|
||||||
[aCoder encodeObject:miniaturized_title];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &visible];
|
||||||
[aCoder encodeObject:window_title];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_key];
|
||||||
[aCoder encodePoint:last_point];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_main];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &visible];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_edited];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_key];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_miniaturized];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_main];
|
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &style_mask];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_edited];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &menu_exclude];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized];
|
|
||||||
[aCoder encodeValueOfObjCType:"I" at: &style_mask];
|
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &menu_exclude];
|
|
||||||
|
|
||||||
// Version 2
|
// Version 2
|
||||||
[aCoder encodeSize:minimum_size];
|
[aCoder encodeSize: minimum_size];
|
||||||
[aCoder encodeSize:maximum_size];
|
[aCoder encodeSize: maximum_size];
|
||||||
[aCoder encodeObject:miniaturized_image];
|
[aCoder encodeObject: miniaturized_image];
|
||||||
[aCoder encodeValueOfObjCType:@encode(NSBackingStoreType) at: &backing_type];
|
[aCoder encodeValueOfObjCType: @encode(NSBackingStoreType) at: &backing_type];
|
||||||
[aCoder encodeValueOfObjCType:@encode(int) at: &window_level];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &window_level];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_one_shot];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_autodisplay];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &optimize_drawing];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
|
||||||
[aCoder encodeValueOfObjCType:@encode(NSWindowDepth) at: &depth_limit];
|
[aCoder encodeValueOfObjCType: @encode(NSWindowDepth) at: &depth_limit];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &dynamic_depth_limit];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &cursor_rects_enabled];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &is_released_when_closed];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &disable_flush_window];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &hides_on_deactivate];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
|
||||||
[aCoder encodeValueOfObjCType:@encode(BOOL) at: &accepts_mouse_moved];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
|
||||||
|
|
||||||
NSDebugLog(@"NSWindow: finish encoding\n");
|
NSDebugLog(@"NSWindow: finish encoding\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithCoder:aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
[super initWithCoder:aDecoder];
|
[super initWithCoder: aDecoder];
|
||||||
|
|
||||||
NSDebugLog(@"NSWindow: start decoding\n");
|
NSDebugLog(@"NSWindow: start decoding\n");
|
||||||
frame = [aDecoder decodeRect];
|
frame = [aDecoder decodeRect];
|
||||||
content_view = [aDecoder decodeObject];
|
content_view = [aDecoder decodeObject];
|
||||||
// [aDecoder decodeObjectAt: &first_responder withName:NULL];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &window_num];
|
||||||
// [aDecoder decodeObjectAt: &original_responder withName:NULL];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &background_color];
|
||||||
// [aDecoder decodeObjectAt: &delegate withName:NULL];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &represented_filename];
|
||||||
[aDecoder decodeValueOfObjCType:"i" at:&window_num];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &miniaturized_title];
|
||||||
background_color = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &window_title];
|
||||||
represented_filename = [aDecoder decodeObject];
|
|
||||||
miniaturized_title = [aDecoder decodeObject];
|
|
||||||
window_title = [aDecoder decodeObject];
|
|
||||||
last_point = [aDecoder decodePoint];
|
last_point = [aDecoder decodePoint];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &visible];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &visible];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_key];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_key];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_main];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_main];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_edited];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_edited];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_miniaturized];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_miniaturized];
|
||||||
[aDecoder decodeValueOfObjCType:"I" at: &style_mask];
|
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &style_mask];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &menu_exclude];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &menu_exclude];
|
||||||
|
|
||||||
// Version 2
|
// Version 2
|
||||||
minimum_size = [aDecoder decodeSize];
|
minimum_size = [aDecoder decodeSize];
|
||||||
maximum_size = [aDecoder decodeSize];
|
maximum_size = [aDecoder decodeSize];
|
||||||
miniaturized_image = [aDecoder decodeObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &miniaturized_image];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(NSBackingStoreType)
|
[aDecoder decodeValueOfObjCType: @encode(NSBackingStoreType)
|
||||||
at: &backing_type];
|
at: &backing_type];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(int) at: &window_level];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &window_level];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_one_shot];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_autodisplay];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &optimize_drawing];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(NSWindowDepth) at: &depth_limit];
|
[aDecoder decodeValueOfObjCType: @encode(NSWindowDepth) at: &depth_limit];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &dynamic_depth_limit];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &cursor_rects_enabled];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &is_released_when_closed];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &disable_flush_window];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &hides_on_deactivate];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
|
||||||
[aDecoder decodeValueOfObjCType:@encode(BOOL) at: &accepts_mouse_moved];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
|
||||||
|
|
||||||
NSDebugLog(@"NSWindow: finish decoding\n");
|
NSDebugLog(@"NSWindow: finish decoding\n");
|
||||||
|
|
||||||
|
|
6
Version
6
Version
|
@ -5,8 +5,8 @@
|
||||||
GNUSTEP_GUI_GCC=2.8.0
|
GNUSTEP_GUI_GCC=2.8.0
|
||||||
|
|
||||||
# Versions for libraries that gnustep-gui is dependent upon
|
# Versions for libraries that gnustep-gui is dependent upon
|
||||||
GNUSTEP_GUI_BASE=0.5.0
|
GNUSTEP_GUI_BASE=0.5.5
|
||||||
LIB_FOUNDATION=0.7.1
|
LIB_FOUNDATION=0.8.1
|
||||||
GNUSTEP_GUI_LIBTIFF=3.4
|
GNUSTEP_GUI_LIBTIFF=3.4
|
||||||
GNUSTEP_GUI_DGS=0.5.0
|
GNUSTEP_GUI_DGS=0.5.0
|
||||||
GNUSTEP_GUI_DPSCLIENT=6.1
|
GNUSTEP_GUI_DPSCLIENT=6.1
|
||||||
|
@ -14,7 +14,7 @@ GNUSTEP_GUI_DPSCLIENT=6.1
|
||||||
# The version number of this release.
|
# The version number of this release.
|
||||||
GNUSTEP_GUI_MAJOR_VERSION=0
|
GNUSTEP_GUI_MAJOR_VERSION=0
|
||||||
GNUSTEP_GUI_MINOR_VERSION=5
|
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}
|
GNUSTEP_GUI_VERSION=${GNUSTEP_GUI_MAJOR_VERSION}.${GNUSTEP_GUI_MINOR_VERSION}.${GNUSTEP_GUI_SUBMINOR_VERSION}
|
||||||
VERSION=${GNUSTEP_GUI_VERSION}
|
VERSION=${GNUSTEP_GUI_VERSION}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue