Merge 0.6.6 branch into main.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7188 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-08-07 22:06:04 +00:00
parent d1bbe54ace
commit 8298410a10
28 changed files with 728 additions and 709 deletions

257
ANNOUNCE
View file

@ -1,7 +1,7 @@
ANNOUNCE
********
This is version 0.6.5 of the GNUstep GUI library (`gnustep-gui').
This is version 0.6.6 of the GNUstep GUI library (`gnustep-gui').
What is the GNUstep GUI Library?
================================
@ -31,132 +31,44 @@ component like the GNUstep X/DPS GUI Backend.
What's new in this release?
===========================
The currently released version of the library is `0.6.5'.
The currently released version of the library is `0.6.6'.
Noteworthy changes in version `0.6.5'
Noteworthy changes in version `0.6.6'
=====================================
Many of the basic GUI classes have been vastly improved or
rewritten, thanks to Nicola Pero <n.pero@mi.flashnet.it> and many
others.
* Window hints for motif and generic window managers.
* New Info Panel support
* Major improvements to the text handling classes (NSText,
NSTextView, etc)
* New NSBezierPath
* Pasting of fonts and rulers.
* Rewrite of several classes including Cell and Button classes.
* Much better RTF handling
* Rewrite of NSBrowser, NSSavePanel, menus, text classes,
NSTableHeader.
* DnD for NSColorWell
* RTF Parser
* Much improved NSSplitView
* Implemented image caching.
* New classes - NSColorPanel, NSTableView
* Implemented editing in Forms, Matricies.
* NSScreen rewritten with full support for all methods and functions.
* New autolayout classes GSHBox, GSTable, and GSVBox.
* Can use image reading routines from WindowMaker if available to
read a variety of image formats besides TIFF.
* Almost all back-end classes have been removed and code incorporated
in a DPS-like graphics context structure.
* Many fixes to get the AppKit to work better with WindowMaker.
* Better keyboard handling.
* Much better gmodel support (particularly with nibs translated from
NeXT or OPENSTEP 4.2).
* NSHelpManager, NSComboBox, ProgressIndicator written.
In addition a preliminary version of an Interface Builder (Gorm) has
been written, thanks to Richard Frith-Macdonald
<richard@brainstorm.co.uk>
Noteworthy changes in version `0.6.0'
=====================================
A Huge amount of progress, although a lot still needs to be done.
It's usable for a large base of moderately simple apps. Several
NeXT/OpenStep apps and libraries have been ported with little changes.
* Drag and Drop support fleshed out but not completed.
* NSText and related classes rewritten. Basic functionality but much
needs to be done to finish them off.
* nib2gmodel app works with MacOS-X
* Work done in minimizing the backend which allowed a lot of
functionality to move to the GNU library.
* Menu code rewritten.
* PopupButtons now work.
* Many new images
* Basic functionality for NSTabView
* Much better lockFocus support in NSView. Flipped views handled.
* Rewrite of NSSavePanel and NSOpenPanel
* Several fixes that at least double the speed of the gui.
Noteworthy changes in version `0.5.5'
=====================================
Too extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
Noteworthy changes in version `0.5.0'
=====================================
* NSBrowser and NSBrowserCell have been implemented. There is one
odd display artifact; lists which are smaller than the browser
column area have the list justified to the bottom of the column
versus the top of the column. This is actually an issue with
NSMatrix and will be remedied when flip views are implemented.
* Two important optimizations that speed up the displaying of views
and flushing of windows have been implemented. Only the views that
need display and those that produce visible effects on the screen
receive the -drawRect: message. Flushing of windows occurs only
in rectangles that get displayed not in the whole window.
* Rotation and scaling of views have been finally implemented. The
code requires backend support for changing the state of the
graphics context accordingly.
* NSScrollView and NSClipView have been implemented. The current
implemented behavior is to call the document view to display the
exposed region. Copying on scroll will be supported soon, at least
on Solaris DPS, where it seems the Postscript language has
provisions for copying drawn regions of screen. Hopefully DGS
will also have this facility by the end of the year.
* NSScroller has been completely reworked to gain speed by using
timer events.
* NSSlider has been implemented. Thanks to Frank Knobloch for
supporting this and the NSScrollView implementation.
* NSBox has been implemented.
* The library has been ported to work under Solaris with the native
DPS and the NeXT/Apple's Portable Distributed Objects (PDO)
environment.
* The library has been integrated with the makefile package so we
now benefit from all of the features the makefile package gives
us, especially the possibility to build shared libraries on
various systems and having different types (debug and profile) of
the library compiled at the same time.
* NSCell is able to continuosly send the action to the target while
the user is tracking the mouse.
* Several cleanups and as usual, many bug fixes.
* Muh improved font classes and font support.
In addition both the xgps and xdps backends have seen some large
efficiency improvements. Much better font support. The xdps backend
itself has seen speed improvements by at least a factor of 4. Note
however, that the xdps backend is still considered experimental and you
may have to deal with many problems in order to get it working. We
recommend sticking with the xgps backend (the default) for now.
How can I get support for this software?
========================================
@ -165,22 +77,22 @@ How can I get support for this software?
GNUstep GUI Library; however, you may wish to use the GNUstep
discussion mailing list for general questions and discussion. Look at
the GNUstep Web Pages for more information regarding GNUstep resources
`http://www.gnustep.org/'
<http://www.gnustep.org/>
Where can you get it? How can you compile it?
==============================================
The gstep-gui-0.6.5.tar.gz distribution file has been placed on
The gstep-gui-0.6.6.tar.gz distribution file has been placed on
`ftp.gnustep.org' in `pub/gnustep/core'.
The program requires gcc 2.8.0 or higher.
The Display Ghostscript System version 0.5.7 and the TIFF Graphics
The Display Ghostscript System version 0.5.10 and the TIFF Graphics
library version 3.4 may be required depending on the backend you choose.
It also requires a FoundationKit library as specified by the OpenStep
specification. The FoundationKit libraries known to work are the
GNUstep Base Library version `0.6.5'.
GNUstep Base Library version `0.6.6'.
The `.tar' file is compressed with GNU gzip. Gzip can be obtained by
anonymous ftp at any of the GNU archive sites.
@ -190,7 +102,7 @@ with no subject line, and two-line body with line one `help' and line
two `quit'.
The most recent (not necessarily tested) snapshots of the library
will be placed in `ftp://alpha.gnu.org/gnu/gnustep'.
will be placed in <ftp://alpha.gnu.org/gnu/gnustep>.
Where do I send bug reports?
============================
@ -200,118 +112,13 @@ Where do I send bug reports?
Obtaining GNU Software
======================
Check out the GNU web site. (`http://www.gnu.org/')
Check out the GNU web site. (<http://www.gnu.org/>)
Check out the GNUstep web site. (`http://www.gnustep.org/')
Check out the GNUstep web site. (<http://www.gnustep.org/>)
The GNUstep GUI Library was donated to the Free Software Foundation
as part of the On-line Community project of NET-Community.
NET-Community is a company that develops and supports free software.
Check out their web site to learn more.
(`http://www.net-community.com/')
Most GNU software is packed using the GNU `gzip' compression program.
Source code is available on most sites distributing GNU software.
For information on how to order GNU software on tape, floppy or
cd-rom, or printed GNU manuals, check the file etc/ORDERS in the GNU
Emacs distribution or in GNUinfo/ORDERS on prep, or e-mail a request to:
<gnu@gnu.org>
By ordering your GNU software from the FSF, you help us continue to
develop more free software. Media revenues are our primary source of
support. Donations to FSF are deductible on US tax returns.
The above software will soon be at these ftp sites as well. Please
try them before `ftp.gnu.org' as it is very busy!
thanx <gnu@gnu.org>
*ASIA:*
- `ftp://ftp.cs.titech.ac.jp'
- `ftp://utsun.s.u-tokyo.ac.jp/ftpsync/prep'
- `ftp://cair.kaist.ac.kr/pub/gnu'
- `ftp://ftp.nectec.or.th/pub/mirrors/gnu'
*AUSTRALIA:*
- `ftp://archie.au/gnu' (archie.oz or archie.oz.au for ACSnet)
*AFRICA:*
- `ftp://ftp.sun.ac.za/pub/gnu'
*MIDDLE-EAST:*
- `ftp://ftp.technion.ac.il/pub/unsupported/gnu'
*EUROPE:*
- `ftp://irisa.irisa.fr/pub/gnu'
- `ftp://ftp.univ-lyon1.fr/pub/gnu'
- `ftp://ftp.mcc.ac.uk'
- `ftp://unix.hensa.ac.uk/pub/uunet/systems/gnu'
- `ftp://src.doc.ic.ac.uk/gnu'
- `ftp://ftp.ieunet.ie/pub/gnu'
- `ftp://ftp.eunet.ch'
- `ftp://nic.switch.ch/mirror/gnu'
- `ftp://ftp.informatik.rwth-aachen.de/pub/gnu'
- `ftp://ftp.informatik.tu-muenchen.de'
- `ftp://ftp.win.tue.nl/pub/gnu'
- `ftp://ftp.funet.fi/pub/gnu'
- `ftp://ftp.denet.dk'
- `ftp://ftp.stacken.kth.se'
- `ftp://isy.liu.se'
- `ftp://ftp.luth.se/pub/unix/gnu'
- `ftp://ftp.sunet.se/pub/gnu'
- `ftp://archive.eu.net'
*SOUTH AMERICA:*
- `ftp://ftp.unicamp.br/pub/gnu'
*WESTERN CANADA:*
- `ftp://ftp.cs.ubc.ca/mirror2/gnu'
*USA:*
- `ftp://wuarchive.wustl.edu/systems/gnu'
- `ftp://labrea.stanford.edu'
- `ftp://ftp.digex.net/pub/gnu'
- `ftp://ftp.kpc.com/pub/mirror/gnu'
- `ftp://f.ms.uky.edu/pub3/gnu'
- `ftp://jaguar.utah.edu/gnustuff'
- `ftp://ftp.hawaii.edu/mirrors/gnu'
- `ftp://vixen.cso.uiuc.edu/gnu'
- `ftp://mrcnext.cso.uiuc.edu/pub/gnu'
- `ftp://ftp.cs.columbia.edu/archives/gnu/prep'
- `ftp://col.hp.com/mirrors/gnu'
- `ftp://gatekeeper.dec.com/pub/GNU'
- `ftp://ftp.uu.net/systems/gnu'
(<http://www.net-community.com/>)

35
BUGS
View file

@ -7,23 +7,18 @@ Bugs in the GUI library
Windows
-------
* Code to manage window decorations is not finished. The reported
frame origin of a window might be wrong.
* Getting and releasing keyboard focus is still buggy. This is mostly
annoying for users trying to type in a GNUstep or non-GNUstep
window.
* Windows never get released. Setting isReleasedWhenClosed does not
work.
Fixing these bugs requires touching delicate parts of the library.
This is why fixing them has been postponed after 0.6.5, to keep
0.6.5 reasonably stable.
Texts
-----
* The NSText code is particularly complex to work on and it has not
improved much since 0.6.0. Many bugs are know in the code - it is
somewhat usable though. We hope on a big improvement of this area
for next release.
* There have been a lot of improvements in the NSText code, but is
particularly complex. It is somewhat usable though. We hope to
keep improving it.
Matrices
--------
@ -49,10 +44,8 @@ Images anf Graphics
you may set manually the background color of your image when
displaying it.
* Only TIFF images are supported in 0.6.5. Support at least for PNG
and JPEG images is planned for next release.
* alpha drawing and compositing of graphics doesn't work.
* alpha drawing and compositing of graphics works, but only to a
limited degree.
Alert, Info Panels
@ -67,14 +60,8 @@ Unimplemented Classes
The following classes are currently unimplemented or unfinished to
such a degree to be unusable.
* NSColorPanel
* NSDataLink
* NSFontManager
* NSFontPanel
* NSHelpPanel
* NSLayoutManager
@ -87,7 +74,3 @@ such a degree to be unusable.
* NSSpellChecker
* NSTableView
* NSTextView

138
ChangeLog
View file

@ -1,3 +1,7 @@
2000-08-07 Adam Fedor <fedor@gnu.org>
* Merge 0.6.6 branch into main.
2000-08-03 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/gnustep/gui/NSEvent.h: Support middle mouse button
@ -18,6 +22,140 @@
* Source/NSBundleAdditions.m: patch by borgheron@yahoo.com to simplify
loading of gmodel files.
2000-08-06 Adam Fedor <fedor@gnu.org>
* Version 0.6.6 released.
Sun Aug 6 18:43:13 2000 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSBrowser.m ([NSBrowser -doClick:]): Removed safety check
which was preventing subclasses of NSBrowserCell to work properly
with a browser.
Sat Aug 5 02:03:24 2000 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSTextFieldCell.m ([NSTextFieldCell -initTextCell:]):
Reverted last change - do not draw background by default.
2000-08-04 Adam Fedor <fedor@gnu.org>
* Source/NSWorkspace.m ([_GSWorkspaceCenter -postNotification:]):
Add user default "GSLogWorkspaceTimeout" to log rather than raise
an exception during remote notification.
2000-08-03 Adam Fedor <fedor@gnu.org>
* Source/NSWindow.m (-setFrameFromString:): Don't set display flag
if window not visible.
* Source/NSBezierPath.m (-initWithCoder): Don't call super.
(encodeWithCoder:): Likewise.
2000-08-02 Adam Fedor <fedor@gnu.org>
* Version: Update version number
* Documentation/announce.tmpl.texi: Update
* Documentation/readme.tmpl.texi: Likewise.
* Documentation/news.tmpl.texi: Likewise.
* Documentation/todo.tmpl.texi: Likewise.
* ANNOUNCE, BUGS, NEWS, README: Regenerate
2000-08-2 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSText.m
Changed the handling of the selection. The selection now only gets
drawn inside of drawRect: otherwise it is just flaged as needing a
redraw.
2000-08-01 Adam Fedor <fedor@gnu.org>
* Source/NSWindow.m ([NSMiniWindow -mouseDown:]): Use NSWindow's
-deminiaturize.
2000-07-31 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBundleAdditions.m
Removed super calls in coding for GSNibContainer and GSNibItem
to remove compiler warnings
* Source/NSTextFieldCell.m
[initTextCell:] switch drawsBackground on.
* Source/NSText.m
[initWithFrame:] switch drawsBackground on.
2000-07-31 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSColor.m: ([-description]) corrected to remove quotes from
string listing color components. problem reported by Benhur Stein
2000-07-31 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m
Use [drawRect:] from super.
* Source/NSText.m
Added method [undrawSelectionAsRange:], this only shows the cursor
if [shouldDrawInsertionPoint] is YES. In [mouseDown:] only make
first responder if editable. Also increase the proposed range to
include the last character into the selection.
2000-07-30 Adam Fedor <fedor@gnu.org>
* Source/NSBundleAdditions.m
(+loadNibFile:externalNameTable:withZone:): Read as gmodel if it has
proper extension.
(-loadNibFile:externalNameTable:withZone:): Fix a few bugs in
determining proper extension. (patch from Gregory Casamento
<borgheron@yahoo.com>).
Sun Jul 30 01:33:15 2000 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSText.m ([NSText -moveRight:]): ([NSText -moveLeft:]),
([NSText -moveUp:]), ([NSText -moveDown:]): Tidied; removed call
to selectionRangeForProposedRange:granularity:.
([NSText -selectionRangeForProposedRange:granularity:]): Tidied,
fixed some bugs showing upon selecting text by words and deleting
text.
2000-07-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSFileWrapper.m
[initWithPath:] always store full pathname in filename. This may
be wrong but now it is consistent in this file.
[writeToFile:atomically:updateFilenames:] set attributes for
normal files.
* Source/NSAttributedString.m
[fixAttributesInRange:] added fix of attachments
Thu Jul 20 16:00:14 2000 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSApplication.m ([-init]): Enclosed all initialization
into an autorelease pool as per specifications; moved
initialize_gnustep_backend () here so it is enclosed in the
autorelease pool too.
2000-07-19 Adam Fedor <fedor@gnu.org>
* Source/NSApplication.m (+sharedApplication): Initialize
backend here instead of NSApplicationMain().
* Source/NSGraphicContext.m (+waitAllContexts): New method.
* Documentation/news.tmpl.texi: Update.
* Documentation/todo.tmpl.texi: Update.
2000-07-16 Adam Fedor <fedor@gnu.org>
* GNUmakefile: Make PrinterTypes subdir.
* PrinterTypes/GNUmakefile: New file to install ppd files.
* PrinterTypes/GNUmakefile.postamble: Likewise.
* Source/NSPrinter.m (getFile): Use NSBundle methods.
(+printerTypes): Simplify with use of NSBundle methods.
2000-07-14 Adam Fedor <fedor@gnu.org>
* Source/NSApplication.m (-run): Do appIconInit
here so NSApp can be set-up without showing icon.
2000-07-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GNUmakefile: Install GSFontInfo.h

View file

@ -16,4 +16,6 @@ version.tmpl.texi
*.pg
*.ps
*.vrs
*.cl
*.pr

View file

@ -92,95 +92,3 @@ as part of the On-line Community project of NET-Community. NET-Community is
a company that develops and supports free software. Check out
their web site to learn more. (@url{http://www.net-community.com/})
Most GNU software is packed using the GNU `gzip' compression program.
Source code is available on most sites distributing GNU software.
For information on how to order GNU software on tape, floppy or cd-rom,
or printed GNU manuals, check the file etc/ORDERS in the GNU Emacs
distribution or in GNUinfo/ORDERS on prep, or e-mail a request to:
@email{gnu@@gnu.org}
By ordering your GNU software from the FSF, you help us continue to
develop more free software. Media revenues are our primary source of
support. Donations to FSF are deductible on US tax returns.
The above software will soon be at these ftp sites as well.
Please try them before @samp{ftp.gnu.org} as it is very busy!
thanx @email{gnu@@gnu.org}
@table @strong
@item ASIA:
@itemize @minus
@item @url{ftp://ftp.cs.titech.ac.jp}
@item @url{ftp://utsun.s.u-tokyo.ac.jp/ftpsync/prep}
@item @url{ftp://cair.kaist.ac.kr/pub/gnu}
@item @url{ftp://ftp.nectec.or.th/pub/mirrors/gnu}
@end itemize
@item AUSTRALIA:
@itemize @minus
@item @url{ftp://archie.au/gnu} (archie.oz or archie.oz.au for ACSnet)
@end itemize
@item AFRICA:
@itemize @minus
@item @url{ftp://ftp.sun.ac.za/pub/gnu}
@end itemize
@item MIDDLE-EAST:
@itemize @minus
@item @url{ftp://ftp.technion.ac.il/pub/unsupported/gnu}
@end itemize
@item EUROPE:
@itemize @minus
@item @url{ftp://irisa.irisa.fr/pub/gnu}
@item @url{ftp://ftp.univ-lyon1.fr/pub/gnu}
@item @url{ftp://ftp.mcc.ac.uk}
@item @url{ftp://unix.hensa.ac.uk/pub/uunet/systems/gnu}
@item @url{ftp://src.doc.ic.ac.uk/gnu}
@item @url{ftp://ftp.ieunet.ie/pub/gnu}
@item @url{ftp://ftp.eunet.ch}
@item @url{ftp://nic.switch.ch/mirror/gnu}
@item @url{ftp://ftp.informatik.rwth-aachen.de/pub/gnu}
@item @url{ftp://ftp.informatik.tu-muenchen.de}
@item @url{ftp://ftp.win.tue.nl/pub/gnu}
@item @url{ftp://ftp.funet.fi/pub/gnu}
@item @url{ftp://ftp.denet.dk}
@item @url{ftp://ftp.stacken.kth.se}
@item @url{ftp://isy.liu.se}
@item @url{ftp://ftp.luth.se/pub/unix/gnu}
@item @url{ftp://ftp.sunet.se/pub/gnu}
@item @url{ftp://archive.eu.net}
@end itemize
@item SOUTH AMERICA:
@itemize @minus
@item @url{ftp://ftp.unicamp.br/pub/gnu}
@end itemize
@item WESTERN CANADA:
@itemize @minus
@item @url{ftp://ftp.cs.ubc.ca/mirror2/gnu}
@end itemize
@item USA:
@itemize @minus
@item @url{ftp://wuarchive.wustl.edu/systems/gnu}
@item @url{ftp://labrea.stanford.edu}
@item @url{ftp://ftp.digex.net/pub/gnu}
@item @url{ftp://ftp.kpc.com/pub/mirror/gnu}
@item @url{ftp://f.ms.uky.edu/pub3/gnu}
@item @url{ftp://jaguar.utah.edu/gnustuff}
@item @url{ftp://ftp.hawaii.edu/mirrors/gnu}
@item @url{ftp://vixen.cso.uiuc.edu/gnu}
@item @url{ftp://mrcnext.cso.uiuc.edu/pub/gnu}
@item @url{ftp://ftp.cs.columbia.edu/archives/gnu/prep}
@item @url{ftp://col.hp.com/mirrors/gnu}
@item @url{ftp://gatekeeper.dec.com/pub/GNU}
@item @url{ftp://ftp.uu.net/systems/gnu}
@end itemize
@end table

View file

@ -31,23 +31,13 @@ Install @samp{gcc}. The library requires gcc version
@value{GNUSTEP-GUI-GCC} or later.
@item
Install @samp{gnustep-base} or @samp{libFoundation}. This library requires the
classes either in the GNUstep Base Library or libFoundation. You must also
apply the Objective-C Runtime patches to GCC which makes the runtime
thread-safe, if your version of GCC lacks them.
Install the @samp{gnustep-base} library.
@item
Install the @samp{TIFF} library. This library requires the header files
in the TIFF library to compile; the TIFF library is used for the NSImage
and associated classes for reading, writing, and manipulating tiff files.
@item
Install @samp{DGS}. Though this library does not directly use the Display
Ghostscript System; it does require the DPS client library headers
in order to compile. You should have at least version
@value{GNUSTEP-GUI-DGS}; likewise, you could just install the DPS client
library itself in which use version @value{GNUSTEP-GUI-DPSCLIENT}.
@item
Configure the package for your system. In the directory that this
file is in, type @file{./configure}. If you're using @file{csh} on an old

View file

@ -9,6 +9,36 @@
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
@section Noteworthy changes in version @samp{0.6.6}
@itemize @bullet
@item Window hints for motif and generic window managers.
@item Major improvements to the text handling classes (NSText, NSTextView, etc)
@item Pasting of fonts and rulers.
@item Much better RTF handling
@item DnD for NSColorWell
@item Much improved NSSplitView
@item New classes - NSColorPanel, NSTableView
@item NSScreen rewritten with full support for all methods and functions.
@item Can use image reading routines from WindowMaker if available to read
a variety of image formats besides TIFF.
@item Many fixes to get the AppKit to work better with WindowMaker.
@item Much better gmodel support (particularly with nibs translated from
NeXT or OPENSTEP 4.2).
@item Muh improved font classes and font support.
@end itemize
In addition both the xgps and xdps backends have seen some large efficiency
improvements. Much better font support. The xdps backend itself has seen
speed improvements by at least a factor of 4. Note however, that the xdps
backend is still considered experimental and you may have to deal with
many problems in order to get it working. We recommend sticking with the
xgps backend (the default) for now.
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.6.5}
Many of the basic GUI classes have been vastly improved or rewritten, thanks
@ -124,10 +154,6 @@ Several cleanups and as usual, many bug fixes.
@end itemize
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.3.0}
@itemize @bullet

View file

@ -12,24 +12,19 @@
@subsection Windows
@itemize @bullet
@item Code to manage window decorations is not finished.
The reported frame origin of a window might be wrong.
@item Getting and releasing keyboard focus is still buggy. This is mostly
annoying for users trying to type in a GNUstep or non-GNUstep window.
@item Windows never get released. Setting isReleasedWhenClosed
does not work.
Fixing these bugs requires touching delicate parts of the library.
This is why fixing them has been postponed after 0.6.5, to keep 0.6.5
reasonably stable.
@end itemize
@subsection Texts
@itemize @bullet
@item The NSText code is particularly complex to work on and it has not
improved much since 0.6.0. Many bugs are know in the code -- it is
somewhat usable though. We hope on a big improvement of this area
for next release.
@item There have been a lot of improvements in the NSText code, but is
particularly complex. It is
somewhat usable though. We hope to keep improving it.
@end itemize
@subsection Matrices
@ -56,10 +51,8 @@ This restriction will hopefully be removed in next releases.
@item There are problems with alpha composing. To avoid these problems,
you may set manually the background color of your image when displaying it.
@item Only TIFF images are supported in 0.6.5. Support at least for PNG and
JPEG images is planned for next release.
@item alpha drawing and compositing of graphics doesn't work.
@item alpha drawing and compositing of graphics works, but only to a limited
degree.
@end itemize
@ -76,16 +69,11 @@ The following classes are currently unimplemented or unfinished
to such a degree to be unusable.
@itemize @bullet
@item NSColorPanel
@item NSDataLink
@item NSFontManager
@item NSFontPanel
@item NSHelpPanel
@item NSLayoutManager
@item NSPageLayout
@item NSPrintPanel
@item NSSecureTextField
@item NSSpellChecker
@item NSTableView
@item NSTextView
@end itemize

View file

@ -34,7 +34,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
#
# The list of subproject directories
#
SUBPROJECTS = Source Images Model Tools Panels
SUBPROJECTS = Source Images Model Tools Panels PrinterTypes
-include GNUmakefile.preamble

View file

@ -125,6 +125,7 @@ typedef enum _GSWindowInputState
- (void) restoreGraphicsState;
- (void) saveGraphicsState;
- (void) wait;
+ (void) waitAllContexts;
@end
#ifndef NO_GNUSTEP

22
INSTALL
View file

@ -6,7 +6,7 @@ This file documents the installation of the GNUstep GUI Library,
may copy, distribute, and modify it freely as long as you preserve this
copyright notice and permission notice.
This is version 0.6.5 of the GNUstep GUI library.
This is version 0.6.6 of the GNUstep GUI library.
Installing `gnustep-gui'
========================
@ -22,23 +22,15 @@ for instructions on how to install the entire GNUstep system.
1. Install `gcc'. The library requires gcc version 2.8.0 or later.
2. Install `gnustep-base' or `libFoundation'. This library requires
the classes either in the GNUstep Base Library or libFoundation.
You must also apply the Objective-C Runtime patches to GCC which
makes the runtime thread-safe, if your version of GCC lacks them.
2. Install `gnustep-base'. This library requires the classes the
GNUstep Base Library.
3. Install the `TIFF' library. This library requires the header files
in the TIFF library to compile; the TIFF library is used for the
NSImage and associated classes for reading, writing, and
manipulating tiff files.
4. Install `DGS'. Though this library does not directly use the
Display Ghostscript System; it does require the DPS client library
headers in order to compile. You should have at least version
0.5.7; likewise, you could just install the DPS client library
itself in which use version 6.1.
5. Configure the package for your system. In the directory that this
4. Configure the package for your system. In the directory that this
file is in, type `./configure'. If you're using `csh' on an old
version of System V, you might need to type `sh configure' instead
to prevent `csh' from trying to execute `configure' itself.
@ -131,14 +123,14 @@ for instructions on how to install the entire GNUstep system.
to do them, and mail diffs or instructions to the address given in
the `README' so we can include them in the next release.
6. Type `make' to compile the package. If you want, you can override
5. Type `make' to compile the package. If you want, you can override
the `make' variables `CFLAGS' and `LDFLAGS' like this:
make CFLAGS=-O2 LDFLAGS=-s
7. Type `make install' to install the library, data files, header
6. Type `make install' to install the library, data files, header
files, and documentation.
8. You can remove the program binaries and object files from the
7. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the
Makefile(s), and `config.status' (all the files that `configure'
created), type `make distclean'.

39
NEWS
View file

@ -1,7 +1,44 @@
NEWS
****
The currently released version of the library is `0.6.5'.
The currently released version of the library is `0.6.6'.
Noteworthy changes in version `0.6.6'
=====================================
* Window hints for motif and generic window managers.
* Major improvements to the text handling classes (NSText,
NSTextView, etc)
* Pasting of fonts and rulers.
* Much better RTF handling
* DnD for NSColorWell
* Much improved NSSplitView
* New classes - NSColorPanel, NSTableView
* NSScreen rewritten with full support for all methods and functions.
* Can use image reading routines from WindowMaker if available to
read a variety of image formats besides TIFF.
* Many fixes to get the AppKit to work better with WindowMaker.
* Much better gmodel support (particularly with nibs translated from
NeXT or OPENSTEP 4.2).
* Muh improved font classes and font support.
In addition both the xgps and xdps backends have seen some large
efficiency improvements. Much better font support. The xdps backend
itself has seen speed improvements by at least a factor of 4. Note
however, that the xdps backend is still considered experimental and you
may have to deal with many problems in order to get it working. We
recommend sticking with the xgps backend (the default) for now.
Noteworthy changes in version `0.6.5'
=====================================

52
PrinterTypes/GNUmakefile Normal file
View file

@ -0,0 +1,52 @@
#
# Images makefile for GNUstep GUI Library
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Date: September 1997
#
# This file is part of the GNUstep GUI Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
INSTALL_DIR = $(GNUSTEP_RESOURCES)/PrinterTypes
RESOURCE_DIRS = \
English.lproj \
French.lproj \
German.lproj \
Italian.lproj \
Spanish.lproj \
Swedish.lproj
RESOURCE_FILES = Printers
-include GNUmakefile.preamble
-include GNUmakefile.local
# We don't actually build anything in this directory so
# just include the common makefile rules
include $(GNUSTEP_MAKEFILES)/rules.make
-include GNUmakefile.postamble

View file

@ -0,0 +1,86 @@
#
# GNUmakefile.postamble
#
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
#
# This file is part of the GNUstep GUI Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# If you are interested in a warranty or support for this source code,
# contact Scott Christley at scottc@net-community.com
#
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# GNUmakefile.postamble
#
# Project specific makefile rules
#
# Uncomment the targets you want.
# The double colons (::) are important, do not make them single colons
# otherwise the normal makefile rules will not be performed.
#
# Things to do before compiling
# before-all::
# Things to do after compiling
# after-all::
# Things to do before installing
before-install::
$(MKDIRS) $(INSTALL_DIR)
for file in $(RESOURCE_DIRS); do \
$(MKDIRS) $(INSTALL_DIR)/$$file ; \
done
# Things to do after installing
after-install::
for dirs in $(RESOURCE_DIRS); do \
cp $$dirs/*ppd $(INSTALL_DIR)/$$dirs/ ; \
done
for file in $(RESOURCE_FILES); do \
$(INSTALL_DATA) $$file $(INSTALL_DIR) ; \
done
# Things to do before uninstalling
# before-uninstall::
# Things to do after uninstalling
after-uninstall::
for file in $(RESOURCE_DIRS); do \
rm -rf $(INSTALL_DIR)/$$file ; \
done
rm -rf $(INSTALL_DIR)
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
# after-clean::
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
# after-distclean::
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::

7
PrinterTypes/Printers Normal file
View file

@ -0,0 +1,7 @@
{ /* A Sample printers file */
Unknown = (
"Apple_LaserWriter_II_NTX",
"localhost",
"A Note"
);
}

2
README
View file

@ -1,7 +1,7 @@
README
******
This is version 0.6.5 of the GNUstep GUI library (`gnustep-gui').
This is version 0.6.6 of the GNUstep GUI library (`gnustep-gui').
Here is some introductory info to get you started:

View file

@ -580,7 +580,7 @@ documentAttributes: (NSDictionary**)dict
{
[self fixFontAttributeInRange: range];
[self fixParagraphStyleAttributeInRange: range];
// [self fixAttachmentAttributeInRange: range];
[self fixAttachmentAttributeInRange: range];
}
- (void) fixFontAttributeInRange: (NSRange)range

View file

@ -142,17 +142,15 @@ NSPoint rotatePoint(NSPoint p, NSPoint centre, float angle);
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeValueOfObjCType: @encode(NSBezierPathElement) at: &type];
[aCoder encodeValueOfObjCType: @encode(NSPoint *) at: &p];
[aCoder encodeValueOfObjCType: @encode(NSBezierPathElement) at: &type];
[aCoder encodeValueOfObjCType: @encode(NSPoint *) at: &p];
}
- (id)initWithCoder:(NSCoder *)aCoder
{
self = [super initWithCoder: aCoder];
[aCoder decodeValueOfObjCType: @encode(NSBezierPathElement) at: &type];
[aCoder decodeValueOfObjCType: @encode(NSPoint *) at: &p];
return self;
[aCoder decodeValueOfObjCType: @encode(NSBezierPathElement) at: &type];
[aCoder decodeValueOfObjCType: @encode(NSPoint *) at: &p];
return self;
}
- (id)copyWithZone:(NSZone *)zone

View file

@ -1978,7 +1978,7 @@
a = [sender selectedCells];
if (([a count] > 0) && (_browserCellClass == [NSBrowserCell class]))
if ([a count] > 0)
{
// Single selection
if ([a count] == 1)

View file

@ -475,7 +475,6 @@
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeObject: nameTable];
[aCoder encodeObject: connections];
}
@ -492,7 +491,6 @@
- (id) initWithCoder: (NSCoder*)aCoder
{
self = [super initWithCoder: aCoder];
[aCoder decodeValueOfObjCType: @encode(id) at: &nameTable];
[aCoder decodeValueOfObjCType: @encode(id) at: &connections];
return self;
@ -515,7 +513,6 @@
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeObject: theClass];
[aCoder encodeRect: theFrame];
}

View file

@ -660,7 +660,7 @@ static NSMutableDictionary *colorStrings = nil;
*/
if ([colorspace_name isEqualToString: NSCalibratedRGBColorSpace] &&
alpha_component == 1.0)
return [NSString stringWithFormat: @"\"%f %f %f\"",
return [NSString stringWithFormat: @"%f %f %f",
RGB_component.red, RGB_component.green, RGB_component.blue];
/*
@ -1294,16 +1294,18 @@ static NSMutableDictionary *colorStrings = nil;
colorName: col];
}
}
else if (str)
else if (str != nil)
{
const char *ptr = [str cString];
float r, g, b;
float r, g, b;
sscanf(ptr, "%f %f %f", &r, &g, &b);
return [self colorWithCalibratedRed: r
green: g
blue: b
alpha: 1.0];
if (sscanf(ptr, "%f %f %f", &r, &g, &b) == 3)
{
return [self colorWithCalibratedRed: r
green: g
blue: b
alpha: 1.0];
}
}
return nil;
}

View file

@ -106,6 +106,7 @@
NSDebugLLog(@"NSFileWrapper", @"initWithPath: %@", path);
// Store the full path in filename, the specification is unclear in this point
[self setFilename: path];
[self setPreferredFilename: [path lastPathComponent]];
[self setFileAttributes: [fm fileAttributesAtPath: path traverseLink: NO]];
@ -178,18 +179,11 @@
updateFilenames: (BOOL)updateFilenamesFlag
{
NSFileManager *fm = [NSFileManager defaultManager];
BOOL pathExists = [fm fileExistsAtPath: path];
BOOL success = NO;
NSDebugLLog(@"NSFileWrapper",
@"writeToFile: %@ atomically: updateFilenames: ", path);
// don't overwrite existing paths
if (pathExists && atomicFlag)
return NO;
if (updateFilenamesFlag == YES)
[self setFilename: [path lastPathComponent]];
switch (_wrapperType)
{
case GSFileWrapperDirectoryType:
@ -207,18 +201,26 @@
atomically: atomicFlag
updateFilenames: updateFilenamesFlag];
}
return YES;
success = YES;
break;
}
case GSFileWrapperRegularFileType:
{
return [_wrapperData writeToFile: path atomically: atomicFlag];
if ([_wrapperData writeToFile: path atomically: atomicFlag])
success = [fm changeFileAttributes: _fileAttributes
atPath: path];
break;
}
case GSFileWrapperSymbolicLinkType:
{
return [fm createSymbolicLinkAtPath: path pathContent: _wrapperData];
success = [fm createSymbolicLinkAtPath: path pathContent: _wrapperData];
break;
}
}
return NO;
if (success && updateFilenamesFlag)
[self setFilename: path];
return success;
}
- (NSData*) serializedRepresentation

View file

@ -70,7 +70,7 @@
[NSCharacterSet whitespaceAndNewlineCharacterSet]\
intoString:NULL]
static NSString *NSPrinter_PATH = @"gnustep/PrinterTypes";
static NSString *NSPrinter_PATH = @"PrinterTypes";
static NSString *NSPrinter_INDEXFILE = @"Printers";
//
@ -82,8 +82,6 @@ static NSMapTable *typeMap = NULL;
static NSMapTable *nameMap = NULL;
// Dictionary of real printers, from which NSPrinters can be made
static NSDictionary *nameDict = nil;
// Bundles used to load printer related information, such as PPDs.
static NSBundle *userBundle = nil, *localBundle = nil, *systemBundle = nil;
// An array to cache the available printer types
static NSArray *printerTypesAvailable = nil;
@ -160,6 +158,7 @@ static int gethex(unichar character)
raise:NSPPDParseException
format:@"Badly formatted hexadeximal substring in PPD printer file."];
// NOT REACHED
return 0; /* Quiet compiler warnings */
}
// Function to convert hexadecimal substrings
@ -214,23 +213,9 @@ static NSString *interpretQuotedValue(NSString *qString)
static NSString *getFile(NSString *name, NSString *type)
{
NSString *path;
path = [userBundle pathForResource:name
ofType:type
inDirectory:NSPrinter_PATH];
if (path && [path length])
return path;
path = [localBundle pathForResource:name
ofType:type
inDirectory:NSPrinter_PATH];
if (path && [path length])
return path;
path = [systemBundle pathForResource:name
ofType:type
inDirectory:NSPrinter_PATH];
if (path && [path length])
return path;
return nil;
return [NSBundle pathForGNUstepResource: name
ofType: type
inDirectory: NSPrinter_PATH];
}
@ -363,39 +348,11 @@ andOptionTranslation:(NSString *)optionTranslation
+ (NSArray *)printerTypes
{
/*
NSDirectoryEnumerator *files;
NSMutableArray *printers;
NSString *fileName;
int length;
NSRange range;
if (printerTypesAvailable)
return printerTypesAvailable;
files = [[NSFileManager defaultManager] enumeratorAtPath:NSPrinter_PATH];
printers = [NSMutableArray array];
while ((fileName = [files nextObject]))
{
length = [fileName length];
if ([[fileName substringFromIndex:length - 4] isEqual:@".ppd"])
{
range = [fileName rangeOfString:@"/" options:NSBackwardsSearch];
if (range.length)
{
range.location++;
range.length = length - range.location - 4;
fileName = [fileName substringFromRange:range];
}
else
fileName = [fileName substringToIndex:length - 4];
if (![printers containsObject:fileName])
[printers addObject:fileName];
}
}
*/
// userBundle, localBundle, systemBundle
NSArray *userPaths = nil, *localPaths = nil, *systemPaths = nil;
NSBundle *lbdle;
NSArray *lpaths;
NSMutableArray *printers;
NSString *path;
NSDictionary *env;
NSAutoreleasePool *subpool; // There's a lot of temp strings used...
int i, max;
@ -404,28 +361,34 @@ andOptionTranslation:(NSString *)optionTranslation
printers = [[NSMutableArray array] retain];
subpool = [[NSAutoreleasePool alloc] init];
userPaths = [userBundle pathsForResourcesOfType:@"ppd"
inDirectory:NSPrinter_PATH];
localPaths = [localBundle pathsForResourcesOfType:@"ppd"
inDirectory:NSPrinter_PATH];
systemPaths = [systemBundle pathsForResourcesOfType:@"ppd"
env = [[NSProcessInfo processInfo] environment];
lbdle = [NSBundle bundleWithPath: [env objectForKey: @"GNUSTEP_USER_ROOT"]];
lpaths = [lbdle pathsForResourcesOfType:@"ppd"
inDirectory:NSPrinter_PATH];
max = [userPaths count];
max = [lpaths count];
for(i=0 ; i<max ; i++)
{
path = [[userPaths objectAtIndex:i] lastPathComponent];
path = [[lpaths objectAtIndex:i] lastPathComponent];
[printers addObject:[path substringToIndex:[path length]-4]];
}
max = [localPaths count];
lbdle = [NSBundle bundleWithPath: [env objectForKey: @"GNUSTEP_LOCAL_ROOT"]];
lpaths = [lbdle pathsForResourcesOfType:@"ppd"
inDirectory:NSPrinter_PATH];
max = [lpaths count];
for(i=0 ; i<max ; i++)
{
path = [[localPaths objectAtIndex:i] lastPathComponent];
path = [[lpaths objectAtIndex:i] lastPathComponent];
[printers addObject:[path substringToIndex:[path length]-4]];
}
max = [systemPaths count];
lpaths = [[NSBundle gnustepBundle] pathsForResourcesOfType:@"ppd"
inDirectory:NSPrinter_PATH];
max = [lpaths count];
for(i=0 ; i<max ; i++)
{
path = [[systemPaths objectAtIndex:i] lastPathComponent];
path = [[lpaths objectAtIndex:i] lastPathComponent];
[printers addObject:[path substringToIndex:[path length]-4]];
}
[subpool release];
@ -924,8 +887,6 @@ andOptionTranslation:(NSString *)optionTranslation
+ allocMaps
{
NSString *path;
NSMutableString *user, *local, *system;
NSDictionary *env;
// Allocate name and type maps
typeMap = NSCreateMapTable(NSObjectMapKeyCallBacks,
@ -935,25 +896,6 @@ andOptionTranslation:(NSString *)optionTranslation
NSNonRetainedObjectMapValueCallBacks,
NAMEMAPSIZE);
// Create the printer bundles
env = [[NSProcessInfo processInfo] environment];
user = [[[env objectForKey: @"GNUSTEP_USER_ROOT"]
mutableCopy] autorelease];
[user appendString: @"/Libraries"];
local = [[[env objectForKey: @"GNUSTEP_LOCAL_ROOT"]
mutableCopy] autorelease];
[local appendString: @"/Libraries"];
system = [[[env objectForKey: @"GNUSTEP_SYSTEM_ROOT"]
mutableCopy] autorelease];
[system appendString: @"/Libraries"];
if (user)
userBundle = [NSBundle bundleWithPath: user];
if (local)
localBundle = [NSBundle bundleWithPath: local];
if (system)
systemBundle = [NSBundle bundleWithPath: system];
// Load the index file
path = getFile(NSPrinter_INDEXFILE, nil);
// If not found

View file

@ -237,9 +237,8 @@ static NSRange MakeRangeFromAbs (int a1,int a2) // not the same as NSMakeRange!
*/
- (unsigned) characterIndexForPoint: (NSPoint)point;
- (NSRect) rectForCharacterIndex: (unsigned)index;
- (NSRect) rectForCharacterRange: (NSRange)aRange;
- (void) _buildUpLayout;
- (void) drawRect: (NSRect)rect
withSelection: (NSRange)range;
- (NSRect) _textBounds;
/*
@ -257,12 +256,10 @@ static NSRange MakeRangeFromAbs (int a1,int a2) // not the same as NSMakeRange!
- (void) _illegalMovement: (int) notNumber;
- (void) deleteRange: (NSRange)aRange backspace: (BOOL)flag;
- (void) setSelectedRangeNoDrawing: (NSRange)range;
- (void) drawInsertionPointAtIndex: (unsigned)index
color: (NSColor*)color
turnedOn: (BOOL)flag;
- (void) drawSelectionAsRangeNoCaret: (NSRange)aRange;
- (void) drawSelectionAsRange: (NSRange)aRange;
@end
@ -295,6 +292,7 @@ static NSRange MakeRangeFromAbs (int a1,int a2) // not the same as NSMakeRange!
- (unsigned) characterIndexForPoint: (NSPoint)point;
- (NSRect) rectForCharacterIndex: (unsigned) index;
- (NSRect) rectForCharacterRange: (NSRange) aRange;
- (NSRange) characterRangeForBoundingRect: (NSRect)bounds;
- (NSRange) lineRangeForRect: (NSRect) aRect;
@ -611,6 +609,38 @@ static NSRange MakeRangeFromAbs (int a1,int a2) // not the same as NSMakeRange!
rect.size.height);
}
- (NSRect) rectForCharacterRange: (NSRange)aRange
{
float maxWidth = [self frame].size.width;
_GNULineLayoutInfo *currentInfo;
unsigned i1, i2;
NSRect rect1, rect2;
if (![_textStorage length])
{
return NSMakeRect (0, 0, maxWidth,
[self _sizeOfRange: NSMakeRange(0,1)].height);
}
i1 = [self lineLayoutIndexForCharacterIndex: aRange.location];
i2 = [self lineLayoutIndexForCharacterIndex: NSMaxRange(aRange)];
// This is not exacty what we need, but should be correct enought
currentInfo = [lineLayoutInformation
objectAtIndex: i1];
rect1 = [currentInfo lineRect];
if (i1 == i2)
{
return rect1;
}
currentInfo = [lineLayoutInformation
objectAtIndex: i2];
rect2 = [currentInfo lineRect];
return NSUnionRect(rect1, rect2);
}
- (void) setNeedsDisplayForLineRange: (NSRange)redrawLineRange
{
NSRect myFrame = [self frame];
@ -670,6 +700,10 @@ static NSRange MakeRangeFromAbs (int a1,int a2) // not the same as NSMakeRange!
{
NSRange lineRange;
// No editing
if (!mask)
return;
lineRange = [self rebuildForRange: aRange
delta: delta];
[self setNeedsDisplayForLineRange: lineRange];
@ -1319,7 +1353,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
_tf.is_selectable = YES;
_tf.is_rich_text = NO;
_tf.imports_graphics = NO;
_tf.draws_background = NO;
_tf.draws_background = YES;
_tf.is_horizontally_resizable = NO;
_tf.is_vertically_resizable = YES;
_tf.uses_font_panel = YES;
@ -1393,7 +1427,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
[self _buildUpLayout];
[self sizeToFit];
[self setSelectedRangeNoDrawing: NSMakeRange (0, 0)];
[self setSelectedRange: NSMakeRange (0, 0)];
[self setNeedsDisplay: YES];
}
@ -1560,32 +1594,28 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
return _selected_range;
}
- (void) setSelectedRange: (NSRange)range
{
BOOL didLock = NO;
NSRange oldRange = _selected_range;
NSRange overlap;
if (!_window)
// Do ntohing if the range is still the same
if (NSEqualRanges(range, oldRange))
return;
if ([[self class] focusView] != self)
{
[self lockFocus];
didLock = YES;
}
//<!> ask delegate for selection validation
if (_selected_range.length == 0) // remove old cursor
{
[self drawInsertionPointAtIndex: _selected_range.location
color: nil turnedOn: NO];
}
else
{
// This does an unhighlight of the old selected region
[self drawSelectionAsRange: _selected_range];
}
_selected_range = range;
[self updateFontPanel];
[self setSelectedRangeNoDrawing: range];
#if 0
[[NSNotificationCenter defaultCenter]
postNotificationName: NSTextViewDidChangeSelectionNotification
object: self
userInfo: [NSDictionary dictionaryWithObjectsAndKeys:
NSStringFromRange (_selected_range),
NSOldSelectedCharacterRange, nil]];
#endif
// display
if (range.length)
@ -1601,12 +1631,36 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
}
// <!>enable caret timed entry
}
[self drawSelectionAsRange: range];
[self scrollRangeToVisible: range];
if (didLock)
if (!_window)
return;
// Make the selected range visible
[self scrollRangeToVisible: _selected_range];
// Redisplay what has changed
// This does an unhighlight of the old selected region
overlap = NSIntersectionRange(oldRange, _selected_range);
if (overlap.length)
{
[self unlockFocus];
// Try to optimize for overlapping ranges
[self setNeedsDisplayInRect:
[self rectForCharacterRange:
MakeRangeFromAbs(MIN(range.location,
oldRange.location),
MAX(range.location,
oldRange.location))]];
[self setNeedsDisplayInRect:
[self rectForCharacterRange:
MakeRangeFromAbs(MIN(NSMaxRange(range),
NSMaxRange(oldRange)),
MAX(NSMaxRange(range),
NSMaxRange (oldRange)))]];
}
else
{
[self setNeedsDisplayInRect: [self rectForCharacterRange: range]];
[self setNeedsDisplayInRect: [self rectForCharacterRange: oldRange]];
}
}
@ -1677,7 +1731,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
- (void) selectAll: (id)sender
{
[self setSelectedRange: NSMakeRange(0,[self textLength])];
[self setSelectedRange: NSMakeRange(0, [self textLength])];
}
/*
@ -2137,11 +2191,8 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
// This makes things so much simpler and stabler for now.
if (_tf.is_field_editor == NO)
{
[self scrollRectToVisible:
NSUnionRect ([self rectForCharacterIndex:
_selected_range.location],
[self rectForCharacterIndex:
NSMaxRange (_selected_range)])];
[self scrollRectToVisible: [self rectForCharacterRange:
_selected_range]];
}
}
@ -2180,17 +2231,18 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
- (void) mouseDown: (NSEvent*)theEvent
{
NSSelectionGranularity granularity = NSSelectByCharacter;
NSRange chosenRange, prevChosenRange, proposedRange;
NSRange chosenRange, proposedRange;
NSPoint point, startPoint;
NSEvent *currentEvent;
unsigned startIndex;
BOOL didDragging = NO;
// If not selectable then don't recognize the mouse down
// If not selectable than don't recognize the mouse down
if (!_tf.is_selectable)
return;
if (![_window makeFirstResponder: self])
// Only try to make first responder if editable, otherwise the
// delegate will stop it in becomeFirstResponder.
if (_tf.is_editable && ![_window makeFirstResponder: self])
return;
switch ([theEvent clickCount])
@ -2206,90 +2258,47 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
startPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil];
startIndex = [self characterIndexForPoint: startPoint];
proposedRange = NSMakeRange (startIndex, 0);
chosenRange = prevChosenRange = [self selectionRangeForProposedRange:
proposedRange
granularity: granularity];
proposedRange = NSMakeRange(startIndex, 0);
chosenRange = [self selectionRangeForProposedRange: proposedRange
granularity: granularity];
[self lockFocus];
// clean up before doing the dragging
if (_selected_range.length == 0) // remove old cursor
{
[self drawInsertionPointAtIndex: _selected_range.location
color: nil turnedOn: NO];
}
else
[self drawSelectionAsRangeNoCaret: _selected_range];
[self setSelectedRange: chosenRange];
// Do an imidiate redisplay for visual feedback
[_window flushWindow];
//<!> make this non - blocking (or make use of timed entries)
// run modal loop
for (currentEvent = [_window
nextEventMatchingMask:
(NSLeftMouseDraggedMask|NSLeftMouseUpMask)];
[currentEvent type] != NSLeftMouseUp;
(currentEvent = [_window
nextEventMatchingMask:
(NSLeftMouseDraggedMask|NSLeftMouseUpMask)]),
prevChosenRange = chosenRange) // run modal loop
(NSLeftMouseDraggedMask|NSLeftMouseUpMask)]))
{
BOOL didScroll = [self autoscroll: currentEvent];
point = [self convertPoint: [currentEvent locationInWindow]
fromView: nil];
proposedRange = MakeRangeFromAbs ([self characterIndexForPoint: point],
startIndex);
// Add one more character as selected, as zero length is cursor.
proposedRange.length++;
chosenRange = [self selectionRangeForProposedRange: proposedRange
granularity: granularity];
if (NSEqualRanges (prevChosenRange, chosenRange))
{
if (!didDragging)
{
[self drawSelectionAsRangeNoCaret: chosenRange];
[_window flushWindow];
}
else
continue;
}
// this changes the selection without needing instance drawing
// (carefully thought out ; - )
if (!didScroll)
{
[self drawSelectionAsRangeNoCaret:
MakeRangeFromAbs (MIN (chosenRange.location,
prevChosenRange.location),
MAX (chosenRange.location,
prevChosenRange.location))];
[self drawSelectionAsRangeNoCaret:
MakeRangeFromAbs (MIN (NSMaxRange (chosenRange),
NSMaxRange (prevChosenRange)),
MAX (NSMaxRange (chosenRange),
NSMaxRange (prevChosenRange)))];
[_window flushWindow];
}
else
{
[self drawRect: [self visibleRect] withSelection: chosenRange];
[_window flushWindow];
}
[self setSelectedRange: chosenRange];
didDragging = YES;
if (didScroll)
[self setNeedsDisplay: YES];
// Do an imidiate redisplay for visual feedback
[_window flushWindow];
}
NSDebugLog(@"chosenRange. location = % d, length = %d\n",
NSDebugLog(@"chosenRange. location = %d, length = %d\n",
(int)chosenRange.location, (int)chosenRange.length);
[self setSelectedRangeNoDrawing: chosenRange];
if (!didDragging)
[self drawSelectionAsRange: chosenRange];
else if (chosenRange.length == 0)
[self drawInsertionPointAtIndex: chosenRange.location
color: _caret_color turnedOn: YES];
// remember for column stable cursor up/down
_currentCursor = [self rectForCharacterIndex: chosenRange.location].origin;
[self unlockFocus];
[_window flushWindow];
}
- (void) keyDown: (NSEvent*)theEvent
@ -2366,6 +2375,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
{
unsigned cursorIndex;
NSPoint cursorPoint;
NSRange newRange;
if (_tf.is_field_editor)
{
@ -2387,15 +2397,17 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
cursorIndex = [self characterIndexForPoint:
NSMakePoint (_currentCursor.x + 0.001,
MAX (0, cursorPoint.y - 0.001))];
[self setSelectedRange: [self selectionRangeForProposedRange:
NSMakeRange (cursorIndex, 0)
granularity: NSSelectByCharacter]];
newRange.location = cursorIndex;
newRange.length = 0;
[self setSelectedRange: newRange];
}
- (void) moveDown: (id) sender
{
unsigned cursorIndex;
NSRect cursorRect;
NSRange newRange;
if (_tf.is_field_editor)
{
@ -2407,7 +2419,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
if (_selected_range.location == [self textLength])
return;
if (_selected_range.length)
if (_selected_range.length != 0)
{
_currentCursor = [self rectForCharacterIndex:
NSMaxRange (_selected_range)].origin;
@ -2417,36 +2429,43 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
cursorIndex = [self characterIndexForPoint:
NSMakePoint (_currentCursor.x + 0.001,
NSMaxY (cursorRect) + 0.001)];
[self setSelectedRange: [self selectionRangeForProposedRange:
NSMakeRange (cursorIndex, 0)
granularity: NSSelectByCharacter]];
newRange.location = cursorIndex;
newRange.length = 0;
[self setSelectedRange: newRange];
}
- (void) moveLeft: (id) sender
{
NSRange newSelectedRange;
/* Do nothing if we are at beginning of text */
if (_selected_range.location == 0)
return;
[self setSelectedRange:
[self selectionRangeForProposedRange:
NSMakeRange (_selected_range.location - 1, 0)
granularity: NSSelectByCharacter]];
newSelectedRange.location = _selected_range.location - 1;
newSelectedRange.length = 0;
[self setSelectedRange: newSelectedRange];
_currentCursor.x = [self rectForCharacterIndex:
_selected_range.location].origin.x;
}
- (void) moveRight: (id) sender
{
NSRange newSelectedRange;
unsigned int length = [self textLength];
/* Do nothing if we are at end of text */
if (_selected_range.location == [self textLength])
if (_selected_range.location == length)
return;
[self setSelectedRange:
[self selectionRangeForProposedRange:
NSMakeRange (MIN (NSMaxRange (_selected_range) + 1,
[self textLength]), 0)
granularity: NSSelectByCharacter]];
newSelectedRange.location = MIN (NSMaxRange (_selected_range) + 1, length);
newSelectedRange.length = 0;
[self setSelectedRange: newSelectedRange];
_currentCursor.x = [self rectForCharacterIndex:
_selected_range.location].origin.x;
}
@ -2469,7 +2488,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
// Add any clean-up stuff here
if ([self shouldDrawInsertionPoint])
{
{
[self lockFocus];
[self drawInsertionPointAtIndex: _selected_range.location
color: nil turnedOn: NO];
@ -2510,7 +2529,34 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
- (void) drawRect: (NSRect)rect
{
[self drawRect: rect withSelection: _selected_range];
NSRange drawnRange;
NSRange newRange;
if (_tf.draws_background)
{
// clear area under text
[[self backgroundColor] set];
NSRectFill(rect);
}
drawnRange = [_layoutManager drawRectCharacters: rect];
// We have to redraw the part of the selection that is inside
// the redrawn lines
newRange = NSIntersectionRange(_selected_range, drawnRange);
// Was there any overlapping with the selection?
if ((_selected_range.length &&
NSLocationInRange(newRange.location, _selected_range)))
{
[self drawSelectionAsRangeNoCaret: newRange];
}
else if ([self shouldDrawInsertionPoint] &&
(_selected_range.location == newRange.location))
{
[self drawInsertionPointAtIndex: _selected_range.location
color: _caret_color
turnedOn: YES];
}
}
// text lays out from top to bottom
@ -2835,7 +2881,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
{
unsigned index;
NSRange aRange;
NSRange newRange = proposedCharRange;
NSRange newRange;
NSString *string = [self string];
unsigned length = [string length];
@ -2845,36 +2891,77 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
proposedCharRange.length = 0;
return proposedCharRange;
}
if (proposedCharRange.length > length - proposedCharRange.location)
if (NSMaxRange(proposedCharRange) > length)
{
proposedCharRange.length = length - proposedCharRange.location;
}
if (!length)
if (length == 0)
{
return proposedCharRange;
}
switch (granularity)
{
case NSSelectByWord:
index = [_textStorage nextWordFromIndex: proposedCharRange.location
forward: NO];
/* FIXME: The following code (or the routines it calls) does the
wrong thing when you double-click on the space between two
words */
if ((proposedCharRange.location + 1) < length)
{
index = [_textStorage nextWordFromIndex:
(proposedCharRange.location + 1)
forward: NO];
}
else
{
/* Exception: end of text */
index = [_textStorage nextWordFromIndex: proposedCharRange.location
forward: NO];
}
newRange.location = index;
index = [_textStorage nextWordFromIndex: NSMaxRange(proposedCharRange)
forward: YES];
if (index > newRange.location)
newRange.length = index - 1 - newRange.location;
index = [_textStorage nextWordFromIndex: NSMaxRange (proposedCharRange)
forward: YES];
if (index <= newRange.location)
{
newRange.length = 0;
}
else
{
if (index == length)
{
/* We are at the end of text ! */
newRange.length = index - newRange.location;
}
else
{
/* FIXME: The following will not work if there is more than a
single character between the two words ! */
newRange.length = index - 1 - newRange.location;
}
}
return newRange;
case NSSelectByParagraph:
return [[self string] lineRangeForRange: proposedCharRange];
return [string lineRangeForRange: proposedCharRange];
case NSSelectByCharacter:
default:
aRange = [string rangeOfComposedCharacterSequenceAtIndex: proposedCharRange.location];
newRange.location = aRange.location;
// If the proposedCharRange is empty we only ajust the beginning
if (!proposedCharRange.length)
return newRange;
aRange = [string rangeOfComposedCharacterSequenceAtIndex: NSMaxRange(proposedCharRange)];
if (proposedCharRange.length == 0)
return proposedCharRange;
/* Expand the beginning character */
index = proposedCharRange.location;
newRange = [string rangeOfComposedCharacterSequenceAtIndex: index];
/* If the proposedCharRange is empty we only ajust the beginning */
if (proposedCharRange.length == 0)
{
return newRange;
}
/* Expand the finishing character */
index = NSMaxRange (proposedCharRange) - 1;
aRange = [string rangeOfComposedCharacterSequenceAtIndex: index];
newRange.length = NSMaxRange(aRange) - newRange.location;
return newRange;
}
@ -3373,6 +3460,11 @@ other than copy/paste or dragging. */
return [_layoutManager rectForCharacterIndex: index];
}
- (NSRect) rectForCharacterRange: (NSRange) aRange
{
return [_layoutManager rectForCharacterRange: aRange];
}
- (void) _buildUpLayout
{
if (_layoutManager == nil)
@ -3388,31 +3480,6 @@ other than copy/paste or dragging. */
return [_layoutManager _textBounds];
}
- (void) drawRect: (NSRect) rect
withSelection: (NSRange) selectedCharacterRange
{
NSRange drawnRange;
NSRange newRange;
if (_tf.draws_background)
{
// clear area under text
[[self backgroundColor] set];
NSRectFill(rect);
}
drawnRange = [_layoutManager drawRectCharacters: rect];
// We have to redraw the part of the selection that is inside
// the redrawn lines
newRange = NSIntersectionRange(selectedCharacterRange, drawnRange);
// Was there any overlapping with the selection?
if ((selectedCharacterRange.length &&
NSLocationInRange(newRange.location, selectedCharacterRange)) ||
(selectedCharacterRange.location == newRange.location))
[self drawSelectionAsRange: newRange];
}
- (void) drawInsertionPointAtIndex: (unsigned) index
color: (NSColor*) color
turnedOn: (BOOL) flag
@ -3478,33 +3545,4 @@ other than copy/paste or dragging. */
}
}
- (void) drawSelectionAsRange: (NSRange) aRange
{
if (aRange.length)
{
[self drawSelectionAsRangeNoCaret: aRange];
}
else
{
[self drawInsertionPointAtIndex: aRange.location
color: _caret_color
turnedOn: YES];
}
}
// low level selection setting including delegation
- (void) setSelectedRangeNoDrawing: (NSRange)range
{
//<!> ask delegate for selection validation
_selected_range = range;
[self updateFontPanel];
#if 0
[[NSNotificationCenter defaultCenter]
postNotificationName: NSTextViewDidChangeSelectionNotification
object: self
userInfo: [NSDictionary dictionaryWithObjectsAndKeys:
NSStringFromRange (_selected_range),
NSOldSelectedCharacterRange, nil]];
#endif
}
@end

View file

@ -1069,6 +1069,10 @@ container, returning the modified location. */
- (void) drawRect: (NSRect)aRect
{
// currently use super implementation, which is working,
// although the code here is correcter
[super drawRect: aRect];
/*
NSRange glyphRange;
NSLayoutManager *layoutManager = [self layoutManager];
@ -1083,6 +1087,7 @@ container, returning the modified location. */
[layoutManager drawGlyphsForGlyphRange: glyphRange
atPoint: [self frame].origin];
}
*/
}
@end

View file

@ -2942,7 +2942,7 @@ resetCursorRectsForView(NSView *theView)
{
fRect.size.height = minimum_size.height;
}
[self setFrame: fRect display: YES];
[self setFrame: fRect display: (_f.visible) ? YES : NO];
}
- (BOOL) setFrameUsingName: (NSString*)name

View file

@ -76,10 +76,19 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
if (self != nil)
{
remote = RETAIN([NSDistributedNotificationCenter defaultCenter]);
[remote addObserver: self
selector: @selector(_handleRemoteNotification:)
name: nil
object: GSWorkspaceNotification];
NS_DURING
[remote addObserver: self
selector: @selector(_handleRemoteNotification:)
name: nil
object: GSWorkspaceNotification];
NS_HANDLER
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
if ([defs boolForKey: @"GSLogWorkspaceTimeout"])
NSLog(@"NSWorkspace caught exception %@: %@",
[localException name], [localException reason]);
else
[localException raise];
NS_ENDHANDLER
}
return self;
}
@ -96,7 +105,16 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
rem = [NSNotification notificationWithName: [aNotification name]
object: GSWorkspaceNotification
userInfo: [aNotification userInfo]];
[remote postNotification: rem];
NS_DURING
[remote postNotification: rem];
NS_HANDLER
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
if ([defs boolForKey: @"GSLogWorkspaceTimeout"])
NSLog(@"NSWorkspace caught exception %@: %@",
[localException name], [localException reason]);
else
[localException raise];
NS_ENDHANDLER
}
- (void) postNotificationName: (NSString*)name

View file

@ -5,16 +5,16 @@
GNUSTEP_GUI_GCC=2.8.0
# Versions for libraries that gnustep-gui is dependent upon
GNUSTEP_GUI_BASE=0.6.5
GNUSTEP_GUI_BASE=0.6.6
LIB_FOUNDATION=0.8.1
GNUSTEP_GUI_LIBTIFF=3.4
GNUSTEP_GUI_DGS=0.5.7
GNUSTEP_GUI_DGS=0.5.10
GNUSTEP_GUI_DPSCLIENT=6.1
# The version number of this release.
GNUSTEP_GUI_MAJOR_VERSION=0
GNUSTEP_GUI_MINOR_VERSION=6
GNUSTEP_GUI_SUBMINOR_VERSION=5
GNUSTEP_GUI_SUBMINOR_VERSION=6
GNUSTEP_GUI_VERSION=${GNUSTEP_GUI_MAJOR_VERSION}.${GNUSTEP_GUI_MINOR_VERSION}.${GNUSTEP_GUI_SUBMINOR_VERSION}
VERSION=${GNUSTEP_GUI_VERSION}