Merge from dawn

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1999-09-09 02:56:20 +00:00
parent 6ef83b3719
commit 0bfd542562
81 changed files with 832 additions and 489 deletions

View file

@ -1,7 +1,7 @@
ANNOUNCE
********
This is version 0.5.5 of the GNUstep GUI library (`gnustep-gui').
This is version 0.6.0 of the GNUstep GUI library (`gnustep-gui').
What is the GNUstep GUI Library?
================================
@ -31,12 +31,15 @@ component like the GNUstep X/DPS GUI Backend.
What's new in this release?
===========================
The currently released version of the library is `0.5.5'.
The currently released version of the library is `0.6.0'.
Noteworthy changes in version `0.6.0'
=====================================
Noteworthy changes in version `0.5.5'
=====================================
Probably to extensive to list.
Too extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
@ -102,17 +105,17 @@ the GNUstep Web Pages for more information regarding GNUstep resources
Where can you get it? How can you compile it?
==============================================
The gstep-gui-0.5.5.tar.gz distribution file has been placed on
The gstep-gui-0.6.0.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.0 and the TIFF Graphics
The Display Ghostscript System version 0.5.7 and the TIFF Graphics
library version 3.4 may be required depending on the backend you choose.
It also requires a FoundationKit library as specified by the OpenStep
specification. The FoundationKit libraries known to work are the
GNUstep Base Library version `0.5.5'.
GNUstep Base Library version `0.6.0'.
The `.tar' file is compressed with GNU gzip. Gzip can be obtained by
anonymous ftp at any of the GNU archive sites.
@ -127,8 +130,7 @@ will be placed in `ftp://alpha.gnu.org/gnu/gnustep'.
Where do I send bug reports?
============================
Bug reports can be sent to the GNUstep discussion list
<discuss-gnustep@gnu.org>.
Bug reports can be sent to <bug-gnustep@gnu.org>.
Creators rejoice!
Scott Christley

View file

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
59 Temple Place, Suite 330, Boston, MA 02111 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -464,7 +464,7 @@ convey the exclusion of warranty; and each file should have at least the
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Also add information on how to contact you by electronic and paper mail.

299
ChangeLog
View file

@ -1,13 +1,5 @@
1999-09-07 Michael Hanni <mhanni@sprintmail.com>
* Source/NSInterfaceStyle.m: added support for
GSWindowMakerInterfaceStyle.
* Headers/NSInterfaceStyle.h: added enum
GSWindowMakerInterfaceStyle.
* Source/NSMenu.m: implemented NSInterfaceStyle based window maker
like menus. i.e. they line up with the menu item selected.
try 'defaults write NSGlobalDomain NSMenuInterfaceStyle
GSWindowMakerInterfaceStyle'
* Source/NSTabView.m: some modifications to make tabs on the
bottom look a little better.
* Source/NSAttributedString.m: turned off fixParagraphAttributes,
@ -38,49 +30,16 @@ Mon Sep 6 6:37:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSWindow.m: added enable/disable flush fix from dawn.
* Headers/NSWindow.h: added enable/disable flush fix from dawn.
1999-09-05 Michael Hanni <mhanni@sprintmail.com>
* Source/NSMenuView.m: fix nagging bug reported by Gregory John
Casamento <gcasamen@my-deja.com>.
1999-09-04 Michael Hanni <mhanni@sprintmail.com>
* Model/GMAppKit.m: patch from Tim Bissell
<tim.bissell@dresdnerkb.com> adds proper decoding/encoding of
NSButtonCell titles.
* Source/NSSlider.m: patch to add missing unlockFocus.
* Source/NSBrowserCell.m: patch from Tim Bissell
<tim.bissell@dresdnerkb.com> set NSBrowerCell to be initially not
editable (mimcs OS 4.2 behaviour).
* Source/NSWorkspace.m: added patch from Tim Bissell
<tim.bissell@dresdnerkb.com> which adds special GNUstep
functionality to NSWorkspace (for FileViewer.app).
* Headers/NSWorkspace.h: added method definitions for additions by
Tim Bissell <tim.bissell@dresdnerkb.com>
Fri Sep 3 22:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSAttributedString.m: implemented (untested) most of the
missing methods, and fixed a few memory leaks.
Thu Sep 2 16:42:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSWorkspace.m: Trivial fix to pass app when opening files.
* GSServicesManager.m: Fix to send open commands to app delegate
rather than to application object itsself.
* NSApplication.m: Fix to recognise file open request on commandline.
Thu Sep 2 12:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSWorkspace.m: Fixes for locating icons in application resources.
* NSBundleAdditions.m: implemented ([-pathForImageresource:])
Thu Sep 2 9:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSWorkspace.m: Attempted fix for locateApplicationBinary and tidied.
Modified fix for getting file icons of directories where the extension
is meaningless. Look for .dir.tiff as well.
Wed Sep 1 9:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Added patches from n.pero@mi.flashnet.it to access ivars of
@ -128,55 +87,6 @@ Wed Sep 1 9:17:00 1999 n.pero@mi.flashnet.it
positive; keep better care of the fact that frames are not expressed
always in the same coordinate system.
Tue Aug 31 9:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Fixes to remove hard-coded colors from gui. I'm not sure this is
entirely correct - in places where we expect to display white text on
a dark-gray background, I've used windowFrameTextColor and
controlShadowColor, since the MacOS-X documentation doesn't seem to
specify anything exactly for this.
* NSBrowser.m: use windowFrameTextColor for title text and
controlShadowColor for background.
* NSClipView.m: (-init) use controlColor for default background.
* NSColorWell.m: (-drawRect:) use controlColor for background.
* NSFontPanel.m: use windowFrameTextColor for title text and
controlShadowColor for background.
* NSMatrix.m: Use controlBackgroundColor for backgrounds.
* NSMenu.m: ([NSMenuWindowTitleView drawRect:]) use windowFrameColor
and windowFrameTextColor.
* NSMenuItemCell.m: use selectedMenuItemColor or controlColor for
background, and use selectedMenuItemTextColor, controlTextColor, or
disabledControlTextColor for text.
* NSPopUpButtonCell.m: use selectedMenuItemColor or controlColor for
background, and use selectedMenuItemTextColor, controlTextColor for
text.
* NSSplitView.m: ([-initWithFrame:]) use controlShadowColor for the
divider, and controlBackgroundColor for background.
* NSTabViewItem.m: use controlBackgroundColor.
* NSTableHeaderCell.m: use controlShadowColor for header.
* NSTableView.m: use gridColor for the grid.
* NSText.m: Tidied most chunks of code using color.
Fri Aug 27 8:02:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Patch from Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSBox.m: Fix setFrameFromContentFrame: for zero rect frame.
Wed Aug 25 09:42:05 1999 Martin Man <Martin.Man@seznam.cz>
* Source/NSWindow.m ([NSWindow -setFrameTopLeftPoint:]): Corrected
positioning of window's top left point. X coordinate was ignored
and Y coordinate was computed in wrong way.
Thu Aug 26 5:07:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Patch from Nicola Pero <n.pero@mi.flashnet.it> modified to use
controlDarkShadowColor rather than blackColor.
* Source/NSBox.m: draw line borders in correct color.
* Source/NSCell.m ditto
* Source/NSScrollView.m: ditto
* Source/NSTabView.m: ditto
Sun Aug 22 11:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: ([-viewWillMoveToWindow:]) fixed to call method
@ -231,6 +141,215 @@ Sun Aug 22 11:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSTextView.m: more code additions to coincide with the
new NSLayoutManager.
1999-09-07 Adam Fedor <fedor@gnu.org>
* Version: 0.6.0
* Source/NSLayoutManager.m: Change NSLog to NSDebugLLog
* Source/NSText.m: Likewise.
* Source/NSTextContainer.m: Likewise.
* Source/NSTextField.m: Likewise.
* Source/NSTextStorage.m: Likewise.
* Source/NSTextView.m: Likewise.
* Source/NSBox.m ([NSBox -initWithCoder:]): Remember to set the
content view.
* Source/NSFontPanel.m ([NSFontPanel -setPanelFont:isMultiple:]):
ASSIGN panel_font (e.g. retain it).
(-initWithCoder:): Likewise.
* Source/NSText.m ([NSText -initWithFrame:]): Retain default_font.
(-initWithCoder:): Likewise.
1999-09-07 Michael Hanni <mhanni@sprintmail.com>
* Source/NSInterfaceStyle.m: added support for
GSWindowMakerInterfaceStyle.
* Headers/NSInterfaceStyle.h: added enum
GSWindowMakerInterfaceStyle.
* Source/NSMenu.m: implemented NSInterfaceStyle based window maker
like menus. i.e. they line up with the menu item selected.
try 'defaults write NSGlobalDomain NSMenuInterfaceStyle
GSWindowMakerInterfaceStyle'
1999-09-05 Michael Hanni <mhanni@sprintmail.com>
* Source/NSMenuView.m: fix nagging bug reported by Gregory John
Casamento <gcasamen@my-deja.com>.
* Source/NSWorkspace.m: reverted an erroneous patch I applied.
1999-09-04 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSMenu.m: added missing method ([-_rightMouseDisplay])
with a void implementation. In future, it should be given
a complete implementation, or removed. At present, the method
is only called by NSResponder.
1999-09-04 Michael Hanni <mhanni@sprintmail.com>
* Model/GMAppKit.m: patch from Tim Bissell
<tim.bissell@dresdnerkb.com> adds proper decoding/encoding of
NSButtonCell titles.
* Source/NSCell.m: updated copy from HEAD.
* Source/NSText.m: ditto + minor additions.
* Source/NSView.m: patch to prevent X crashes.
* Source/NSMenu.m: multiple patches from HEAD.
* Source/NSPopUpButton.m: ditto.
* Source/NSSlider.m: patch to add missing unlockFocus.
* Source/NSBrowserCell.m: patch from Tim Bissell
<tim.bissell@dresdnerkb.com> set NSBrowerCell to be initially not
editable (mimcs OS 4.2 behaviour).
* Source/NSWorkspace.m: added patch from Tim Bissell
<tim.bissell@dresdnerkb.com> which adds special GNUstep
functionality to NSWorkspace (for FileViewer.app).
* Headers/NSWorkspace.h: added method definitions for additions by
Tim Bissell <tim.bissell@dresdnerkb.com>
Thu Sep 2 16:42:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSWorkspace.m: Trivial fix to pass app when opening files.
* GSServicesManager.m: Fix to send open commands to app delegate
rather than to application object itsself.
* NSApplication.m: Fix to recognise file open request on commandline.
Thu Sep 2 9:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* NSWorkspace.m: Attempted fix for locateApplicationBinary and tidied.
Modified fix for getting file icons of directories where the extension
is meaningless. Look for .dir.tiff as well.
1999-09-01 Adam Fedor <fedor@gnu.org>
* Source/NSFont.m ([NSFont -initWithCoder:]): Get the real font
from the fontname.
* Source/NSView.m ([NSFont -initWithCoder:]): Initialize frameMatrix
and other matrices. (Fixes suggested by GerritVD@decimax.com).
Mon Aug 30 15:53:41 1999 Martin Man <Martin.Man@seznam.cz>
* Headers/AppKit/NSPopUpButton.h:
* Source/NSPopUpButton.m: setTitle's return type changed from int
to void to conform openstep specs.
Wed Sep 1 9:28:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Tools/GNUmakefile.preamble: patch by doko@cs.tu-berlin.de so that
make_services is linked without the gstep-gui library.
Wed Sep 1 9:25:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSBox.m: set default border type to NSGrooveBorder as
suggested by n.pero
Tue Aug 31 10:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Fixes to remove hard-coded colors from gui. I'm not sure this is
entirely correct - in places where we expect to display white text on
a dark-gray background, I've used windowFrameTextColor and
controlShadowColor, since the MacOS-X documentation doesn't seem to
specify anything exactly for this.
* NSBrowser.m: use windowFrameTextColor for title text and
controlShadowColor for background.
* NSClipView.m: (-init) use controlColor for default background.
* NSColorWell.m: (-drawRect:) use controlColor for background.
* NSFontPanel.m: use windowFrameTextColor for title text and
controlShadowColor for background.
* NSMatrix.m: Use controlBackgroundColor for backgrounds.
* NSMenu.m: ([NSMenuWindowTitleView drawRect:]) use windowFrameColor
and windowFrameTextColor.
* NSMenuItemCell.m: use selectedMenuItemColor or controlColor for
background, and use selectedMenuItemTextColor, controlTextColor, or
disabledControlTextColor for text.
* NSPopUpButtonCell.m: use selectedMenuItemColor or controlColor for
background, and use selectedMenuItemTextColor, controlTextColor for
text.
* NSSplitView.m: ([-initWithFrame:]) use controlShadowColor for the
divider, and controlBackgroundColor for background.
* NSTabViewItem.m: use controlBackgroundColor.
* NSTableHeaderCell.m: use controlShadowColor for header.
* NSTableView.m: use gridColor for the grid.
1999-08-29 Adam Fedor <fedor@gnu.org>
* Source/NSCell.m ([NSCell -trackMouse:inRect:ofView:untilMouseUp:]):
Remove setNeedsDisplay, which was causing button to disappear when
mouse left bounds.
1999-08-23 Pedro Ivo Andrade Tavares <ptavares@iname.com>
* Source/NSApplication.m: fixed a bug where it would ask if it should
terminate when a panel over the main window was closed.
Fri Aug 27 8:02:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Patch from Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSBox.m: Fix setFrameFromContentFrame: for zero rect frame.
Wed Aug 25 09:42:05 1999 Martin Man <Martin.Man@seznam.cz>
* Source/NSWindow.m ([NSWindow -setFrameTopLeftPoint:]): Corrected
positioning of window's top left point. X coordinate was ignored
and Y coordinate was computed in wrong way.
Thu Aug 26 5:07:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Patch from Niico Pero <n.pero@mi.flashnet.it> modified to use
controlDarkShadowColor rather than blackColor.
* Source/NSBox.m: draw line borders in correct color.
* Source/NSCell.m ditto
* Source/NSScrollView.m: ditto
* Source/NSTabView.m: ditto
1999-08-24 Adam Fedor <fedor@gnu.org>
* Source/NSPanel.m (NSRun...AlertPanel): Change window mapping to
orderFrontRegardless so panel comes up even when app is not active.
1999-08-22 Adam Fedor <fedor@gnu.org>
* Documentation/gnustep-gui.tmpl.texi: New with GNUstep specific
documentation.
Sat Aug 21 8:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSApplication: ([-setMainMenu:]) close the old main menu
(if any) and display the new one if the app is active.
* Headers/AppKit/NSWindow.h: Changed ivar to support flush enable
* Source/NSWindow.m: Fixed frame sizing to permit setting of frame
beyond min/max size. Fixed bug in enable/disable flush.
1999-08-12 Adam Fedor <fedor@gnu.org>
* Model/GMArchiver.m (-encodeObject:withName:): Don't encode
object if there is a replacement object for it. (Patch from Benhur
Stein <Benhur-de-Oliveira.Stein@imag.fr>)
1999-08-10 Adam Fedor <fedor@gnu.org>
* Source/NSClipView.m (-setBoundsOrigin:): Remove
window update.
* Source/NSScroller.m (-_floatValueForMousePoint:):
Better position calculations.
(-trackScrollButtons:): Various improvements.
* Source/NSWindow.m (-setViewsNeedDisplay:): Rewrite to automatically
update in event loop.
* Source/NSTextView.m (-drawRect:): Minor fix. (Patches and
suggestions from Benhur Stein <Benhur-de-Oliveira.Stein@imag.fr>).
Mon Aug 9 13:57:48 1999 Adam Fedor <fedor@ultra.doc.com>
* NSGraphicsContext.m (-DPSGetEventMatchingMask:...): Add check
for NSAppKitDefined and other masks.
* NSWindow.m (-sendEvent:): Get dragInfo object fix.
1999-08-06 Adam Fedor <fedor@gnu.org>
* many files: Update FSF mailing address.
Fri Aug 6 15:07:29 1999 Adam Fedor <fedor@ultra.doc.com>
* Headers/gnustep/gui/NSDragging: Corrected method name.
* Source/NSWindow.m: Likewise.
1999-08-03 Michael Hanni <mhanni@sprintmail.com>
* Source/NSMenu.m: commented out code which did multiple menu

View file

@ -78,8 +78,8 @@ be placed in
@section Where do I send bug reports?
Bug reports can be sent to the GNUstep discussion list
@email{discuss-gnustep@@gnu.org}.
Bug reports can be sent to
@email{bug-gnustep@@gnu.org}.
@noindent
Creators rejoice!@*

View file

@ -1,112 +1,375 @@
\input texinfo @c -*-texinfo-*-
@c GNUstep GUI Library
@c
@c This file uses the special commands @url{} and @email{}.
\input texinfo @c -*-texinfo-*-
@iftex
@global@let@email=@i
@global@let@url=@samp
@end iftex
@c %**start of header
@settitle User's Guide to the GNUstep GUI Library
@setfilename gstep-gui.info
@c %**end of header
@defcodeindex cl
@defcodeindex pr
@ignore
I'm using cindex for concepts, findex for methods, functions and macros,
prindex for protocols, and clindex for classes.
@end ignore
@ifset NO-TEXI2HTML
@ifinfo
@definfoenclose email, <, >
@definfoenclose url `, '
@format
START-INFO-DIR-ENTRY
* gstep-gui:: The GNUstep GUI Library
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@end ifset
@settitle The GNUstep GUI Library
@setfilename gnustep-gui.info
@include version.texi
@c set the vars GNUSTEP-GUI-VERSION and GCC-VERSION
@include version.tmpl.texi
@ifinfo
This file documents the GNUstep GUI Library.
This file documents the features and implementation of The GNUstep
GUI Library.
@ifclear NO-TEXI2HTML
@subtitle DRAFT Edition for GNUstep GUI Library @value{GNUSTEP-GUI-VERSION}
@subtitle Last revision August 1996
@c @subtitle For GCC Version @value{GNUSTEP-GUI-GCC}
@author Scott Christley
@sp 1
@end ifclear
Copyright @copyright{} 1996 NET-Community
Copyright (C) 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
manual under the conditions for verbatim copying, provided also that the
section entitled ``GNU Library General Public License'' is included exactly as
in the original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
into another language, under the above conditions for modified versions,
except that the section entitled ``GNU Library General Public License'' and
this permission notice may be included in translations approved by the
Free Software Foundation instead of in the original English.
@end ifinfo
@iftex
@setchapternewpage odd
@finalout
@c @smallbook
@c @cropmarks
@end iftex
@setchapternewpage odd
@titlepage
@title The GNUstep GUI Library
@subtitle DRAFT Edition for GNUstep GUI Library @value{GNUSTEP-GUI-VERSION}
@subtitle Last revision August 1996
@c @subtitle For GCC Version @value{GNUSTEP-GUI-GCC}
@author Scott Christley
@title User's Guide to the
@title GNUstep GUI Library
@sp 3
@subtitle Version @value{GNUSTEP-GUI-VERSION}
@author Adam Fedor (fedor@@gnu.org)
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1996 NET-Community
Copyright @copyright{} 1999 Free Software Foundation, Inc.
@sp 2
GNUstep GUI Library Version @value{GNUSTEP-GUI-VERSION}@*
@c For GCC Version @value{GNUSTEP-GUI-GCC}@*
@sp 1
Published by NET-Community@*
Portland, Oregon, USA@*
(@url{http://www.net-community.com})@*
Last printed August, 1996.@*
@sp 1
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
manual under the conditions for verbatim copying, provided also that the
section entitled ``GNU Library General Public License'' is included exactly as
in the original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
into another language, under the above conditions for modified versions,
except that the section entitled ``GNU Library General Public License'' may be
included in a translation approved by the author instead of in the original
English.
@end titlepage
@end iftex
@chapter Introduction
@c README
@include readme.texi
@ifinfo
@node Top, Overview, (dir), (dir)
@top gstep-gui
@end ifinfo
@c Announcement
@include announce.texi
This manual documents some configuration and installation issues
with the GNUstep GUI Library and also differences between the GUI
Library and libraries that implement the OpenStep AppKit specification
and the MacOS-X AppKit implementation.
@c Installation Instructions
@include install.texi
@menu
* Overview::
* Configuration::
* Classes::
* Tools::
* Implementation::
* Setup::
* Contributing::
* Concept Index::
@end menu
@c News
@include news.texi
@node Overview, Configuration, Top, Top
@chapter Overview
@c The FAQ
@include faq.texi
The GNUstep GUI Library is a library of objects useful for writing
graphical applications. For example, it includes classes for drawing
and manipulating graphics objects on the screen: windows, menus,
buttons, sliders, text fields, and events. There are also many
peripheral classes that offer operating-system-independent interfaces to
images, cursors, colors, fonts, pasteboards, printing. There are also
workspace support classes such as data links, open/save panels,
context-dependent help, spell checking.
@c Status Report
@include status.texi
It provides functionality that aims to implement the @samp{AppKit}
portion of the OpenStep standard. However the implementation has
been written to take advantage of GNUstep enhancements wherever possible.
@c The ToDo
@include todo.texi
The GNUstep GUI Library is divided into a front and back-end. The
front-end contains the majority of implementation, but leaves out the
low-level drawing and event code. Different back-ends will make GNUstep
available on various platforms. The default GNU back-end currently runs
on top of the X Window System and uses only Xlib calls for
graphics. Another backend uses a Display Postscript Server for graphics.
Much work will be saved by this clean separation between front and
back-end, because it allows different platforms to share the large
amount of front-end code. Documentation for how the individual backends
work is coverered in a separate document.
@c Generate Short Contents
@shortcontents
@node Configuration, Classes, Overview, Top
@chapter Configuration
@c Generate Complete Contents
There is no special configuration to be done for the GUI library. It is
best to configure, compile, and install the gstep-gui library along with
all the other GNUstep libraries. For this, you should get the gstep-core
package and follow the installation instructions for that.
If you are compiling this library separately, you must have already
installed the GNUstep Makefile Pacakge and the GNUstep Base Library.
@node Classes, Tools, Configuration, Top
@chapter Special Features of GUI Classes.
@node Tools, Implementation, Classes, Top
@chapter Tools Included with gstep-gui.
@node Implementation, Setup, Tools, Top
@chapter Implementation Details
Following are some implementation details of the GUI library. These will
mostly be of interest to developers of the GUI library itself.
@menu
* Drag and Drop::
* NSWorkspace::
@end menu
@node Drag and Drop, NSWorkspace, Implementation, Implementation
@section Drag and Drop
The drag types info for each view is kept in a global map table (protected by
locks) and can be accessed by the backend library using the function -
@smallexample
NSArray *GSGetDragTypes(NSView *aView);
@end smallexample
Drag type information for each window (a union of the drag type info for all
the views in the window) is maintained in the graphics context.
The backend can get this information (as a counted set) using -
@smallexample
- (NSCountedSet*) _dragTypesForWindow: (int)winNum;
@end smallexample
Whenever a DnD aware view is added to, or removed from a window, the type
information for that view is added to/removed from the type information
for the window, altering the counted set. If the alteration results in a
change in the types for the window, the method making the change returns YES.
@smallexample
- (BOOL) _addDragTypes: (NSArray*)types toWindow: (int)winNum;
- (BOOL) _removeDragTypes: (NSArray*)types fromWindow: (int)winNum;
@end smallexample
The backend library should therefore override these methods and call 'super'
to handle the update. If the call to the super method returns YES, the
backend should make any changes as appropriate (in the case of the xdnd
protocol this means altering the XdndAware property of the X window).
You will notice that these methods use the integer window number rather
than the NSWindow object - this is for the convenience of the backend
library which should (eventually) use window numbers for everything
@node NSWorkspace, , Drag and Drop, Implementation
@section NSWorkspace
Here is (I think) the current state of the code (largely untested) -
The make_services tool examines all applications (anything with a .app,
.debug, or .profile suffix) in the system, local, and user Apps Directories.
In addition to the cache of services information, it builds a cache of
information about known applications (including information about file types
they handle).
NSWorkspace reads the cache and uses it to determine which application to use
to open a document and which icon to use to represent that document.
The NSWorkspace API has been extended to provide methods for finding/setting
the preferred icon/application for a particular file type. NSWorkspace will
use the 'best' icon/application available.
To determine the executable to launch, if there was an
Info-gnustep.plist/Info.plist in the app wrapper and it had an
NSExecutable field - use that name. Otherwise, try to use the name of
the app - eg. foo.app/foo The executable is launched by NSTask, which
handles the addition of machine/os/library path components as necessary.
To determine the icon for a file, use the value from the cache of icons
for the file extension, or use an 'unknown' icon.
To determine the icon for a folder, if the folder has a '.app', '.debug'
or '.profile' extension - examine the Info.plist file for an 'NSIcon'
value and try to use that. If there is no value specified - try
foo.app/foo.tiff' or 'foo.app/.dir.tiff'
If the folder was not an application wrapper, just try the .dir.tiff file.
If no icon was available, use a default folder icon or a special icon for the
root directory.
The information about what file types an app can handle needs to be in
the MacOS-X format in the Info-gnustep.plist/Info.plist for the app -
see
@url{http://developer.apple.com/techpubs/macosxserver/System/Documentation/Developer/YellowBox/ReleaseNotes/InfoPlist.html}.
In the NSTypes fields, I used NSIcon (the icon to use for the type)
NSUnixExtensions (a list of file extensions corresponding to the type)
and NSRole (what the app can do with documents of this type). In the
AppList cache, I generate a dictionary, keyed by file extension, whose
values are the dictionaries containing the NSTypes dictionaries of each
of the apps that handle the extension.
I tested the code briefly with the FileViewer app, and it seemed to
provide the icons as expected.
With this model the software doesn't need to monitor loads of
different files, just register to recieve notifications when the
defaults database changes, and check an appropriate default value. At
present, there are four hidden files used by the software:
@table @samp
@item ~/GNUstep/Services/.GNUstepAppList
Cached information about applications and file extensions.
@item ~/GNUstep/Services/.GNUstepExtPrefs
User preferences for which apps/icons should be used for each file
extension.
@item ~/GNUstep/Services/.GNUstepServices
Cache of services provides by apps and services daemons
@item ~/GNUstep/Services/.GNUstepDisabled
User settings to determine which services should not appear in the
services menu.
@end table
Each of these is a serialized property list.
Almost forgot - Need to modify NSApplication to understand '-GSOpenFile ...'
as an instruction to open the specified file on launching. Need to modify
NSWorkspace to supply the appropriate arguments when launching a task rather
than using the existing mechanism of using DO to request that the app opens
the file. When these changes are made, we can turn any program into a
pseudo-GNUstep app by creating the appropriate app wrapper.
An app wrapper then need only contain a shell-script that understands the
-GSOpenFile argument and uses it to start the program - though provision of
a GNUstep-info.plist and various icons would obviously make things prettier.
For instance - you could set up xv.app to contain a shellscript 'xv' that
would start the real xv binary passing it a file to open if the -GSOpenFile
argument was given. The Info-gnustep.plist file could look like this:
@example
@{
NSExecutable = "xv";
NSIcon = "xv.tiff";
NSTypes = (
@{
NSIcon = "tiff.tiff";
NSUnixExtensions = ( tiff, tif );
@},
@{
NSIcon = "xbm.tiff";
NSUnixExtensions = ( xbm );
@}
);
@}
@end example
@node Setup, Contributing, Implementation, Top
@chapter Spectial Setup Instructions.
@menu
* Alt Key::
@end menu
@node Alt Key, , Setup, Setup
@section X-Windows Alt Key
I don't have the backend docs setup yet, so this is here:
On an X-windows system, it's the X keyboard map that determines what is
your 'alt' key. GNUstep uses the X 'cmd2' key as 'alt' - and you may
need to use the xmodmap command to set your modifier keys to something
sensible. On RedHat-5.2 I use 'xmodmap - < mymap' where mymap is:
@example
remove mod1 = Alt_L
remove mod3 = Mode_switch
keycode 113 = Alt_R
add mod2 = Alt_L
add mod5 = Alt_R
@end example
This gives me the key to the left of my spacebar as 'cmd' and the key to
the right of the spacebar as 'alt'.
@node Contributing, Concept Index, Setup, Top
@chapter Contributing
Contributing code is not difficult. Here are
some general guidelines:
@itemize @bullet
@item
FSF must maintain the right to accept or reject potential contributions.
Generally, the only reasons for rejecting contributions are cases where
they duplicate existing or nearly-released code, contain unremovable
specific machine dependencies, or are somehow incompatible with the
rest of the library.
@item
Acceptance of contributions means that the code is accepted for adaptation
into libgnustep-gui. FSF must reserve the right to make various editorial changes
in code. Very often, this merely entails formatting, maintenance of various
conventions, etc. Contributors are always given authorship credit and shown
the final version for approval.
@item
Contributors must assign their copyright to FSF via a form sent out
upon acceptance. Assigning copyright to FSF ensures that the code
may be freely distributed.
@item
Assistance in providing documentation, test files, and debugging
support is strongly encouraged.
@end itemize
Extensions, comments, and suggested modifications of existing libgnustep-gui
features are also very welcome.
@node Concept Index, , Contributing, Top
@unnumbered Concept Index
@printindex cp
@summarycontents
@contents
@bye

View file

@ -9,9 +9,11 @@
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
@section Noteworthy changes in version @samp{0.6.0}
@section Noteworthy changes in version @samp{0.5.5}
Probably to extensive to list.
Too extensive to list.
@itemize @bullet

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef __AppKit_AppKitExceptions_h__
#define __AppKit_AppKitExceptions_h__

View file

@ -18,7 +18,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _DPSOperators_h_INCLUDE

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_GMAppKit

View file

@ -18,7 +18,7 @@
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., 675 Mass Ave, Cambrvoidge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111
*/
#ifndef _GSMethodTable_h_INCLUDE

View file

@ -16,7 +16,7 @@
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., 675 Mass Ave, Cambrvoidge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111
*/
#ifndef _GSWraps_h_INCLUDE

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* These classes were inspired by IBConnectors classes from objcX, "an

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* This class was inspired by CustomObject class from objcX, "an Objective-C

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_IMLoading

View file

@ -21,7 +21,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSAffineTransform

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSCStringText

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSClipView

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSColorPicking

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSDragging
@ -51,7 +51,7 @@ typedef enum _NSDragOperation {
//
- (NSWindow *)draggingDestinationWindow;
- (NSPoint)draggingLocation;
- (NSPasteboard *)draggingPasteBoard;
- (NSPasteboard *)draggingPasteboard;
- (int)draggingSequenceNumber;
- (id)draggingSource;
- (NSDragOperation)draggingSourceOperationMask;

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef __NSGraphics_h__
#define __NSGraphics_h__

View file

@ -21,7 +21,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef STRICT_OPENSTEP

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSImageView

View file

@ -31,7 +31,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#import <Foundation/Foundation.h>

View file

@ -24,7 +24,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSNibLoading

View file

@ -94,7 +94,7 @@
andAction:(SEL)actionSelector;
- (void)setPreferredEdge:(NSRectEdge)edge;
- (NSRectEdge)preferredEdge;
- (int)setTitle:(NSString *)aString;
- (void)setTitle:(NSString *)aString;
- (void)synchronizeTitleAndSelectedItem;
- (void)_popup:(NSNotification*)notification;
- (void)mouseDown:(NSEvent *)theEvent;

View file

@ -1,6 +1,6 @@
#include <AppKit/NSMenuItem.h>
@interface NSPopUpButtonCell : NSMenuItemCell <NSMenuItem>
@interface NSPopUpButtonCell : NSMenuItemCell
{
}
@end

View file

@ -23,7 +23,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSScrollView

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSSlider

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSSliderCell

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSSpellProtocol

View file

@ -34,7 +34,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSTextAttachment

View file

@ -42,7 +42,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_NSTextStorage

View file

@ -157,8 +157,8 @@
forExtension: (NSString*)ext;
- (NSString*) getBestIconForExtension: (NSString*)ext;
- (NSDictionary*) infoForExtension: (NSString*)ext;
- (NSBundle *)bundleForApp:(NSString *)appName;
- (NSImage *)appIconForApp:(NSString *)appName;
- (NSBundle *) bundleForApp:(NSString *)appName;
- (NSImage *) appIconForApp:(NSString *)appName;
- (NSString*) locateApplicationBinary: (NSString*)appName;
- (void) setBestApp: (NSString*)appName
inRole: (NSString*)role

View file

@ -18,7 +18,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PSOperators_h_INCLUDE

View file

@ -21,7 +21,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_config

View file

@ -6,7 +6,7 @@ This file documents the installation of the GNUstep GUI Library,
may copy, distribute, and modify it freely as long as you preserve this
copyright notice and permission notice.
This is version 0.5.5 of the GNUstep GUI library.
This is version 0.6.0 of the GNUstep GUI library.
Installing `gnustep-gui'
========================
@ -35,7 +35,7 @@ for instructions on how to install the entire GNUstep system.
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.0; likewise, you could just install the DPS client library
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

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#import <Foundation/NSArray.h>

View file

@ -232,7 +232,7 @@
id upperObjectRepresentation;
anObject = [anObject replacementObjectForModelArchiver: self];
label = NSMapGet(objects, anObject);
if (findingConditionals && !label) {
@ -270,9 +270,6 @@
encoded. */
upperObjectRepresentation = lastObjectRepresentation;
// Removed by patch, was archiving templates and all kinds of naughty
// stuff.
// anObject = [anObject replacementObjectForModelArchiver: self];
archiveClass = [anObject classForModelArchiver];
if (!findingConditionals) {

View file

@ -19,7 +19,7 @@
#
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
#
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)

View file

@ -19,7 +19,7 @@
#
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
#
before-libgmodel-all:: \

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* This is a list of classes used internally by the NeXT's NIB stuff. These

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <stdio.h>

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* These classes were inspired by IBConnectors classes from objcX, "an

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <string.h>

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#import <Foundation/NSObjCRuntime.h>

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#import <Foundation/NSDictionary.h>

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _GNUstep_H_Translator

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* The original idea comes from the nib translator in objcX, an Objective-C

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <stdio.h>

7
NEWS
View file

@ -1,12 +1,15 @@
NEWS
****
The currently released version of the library is `0.5.5'.
The currently released version of the library is `0.6.0'.
Noteworthy changes in version `0.6.0'
=====================================
Noteworthy changes in version `0.5.5'
=====================================
Probably to extensive to list.
Too extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.

2
README
View file

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

View file

@ -23,7 +23,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* Warning - [-initWithString:attributes:] is the designated initialiser,

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <gnustep/gui/config.h>

View file

@ -211,16 +211,27 @@ NSApplication *NSApp = nil;
* Now check to see if we were launched with arguments asking to
* open a file. We permit some variations on the default name.
*/
if ((filePath = [defs stringForKey: @"GSFilePath"]) != nil)
filePath = [defs stringForKey: @"-GSFilePath"];
if (filePath == nil)
filePath = [defs stringForKey: @"--GSFilePath"];
if (filePath == nil)
filePath = [defs stringForKey: @"GSFilePath"];
if (filePath != nil)
{
if ([delegate respondsToSelector: @selector(application:openFile:)])
{
[delegate application: self openFile: filePath];
}
}
else if ((filePath = [defs stringForKey: @"GSTempPath"]) != nil)
else
{
if ([delegate respondsToSelector: @selector(application:openTempFile:)])
filePath = [defs stringForKey: @"-GSTempPath"];
if (filePath == nil)
filePath = [defs stringForKey: @"--GSTempPath"];
if (filePath == nil)
filePath = [defs stringForKey: @"GSTempPath"];
if (filePath != nil
&& [delegate respondsToSelector: @selector(application:openTempFile:)])
{
[delegate application: self openTempFile: filePath];
}
@ -1103,7 +1114,8 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
ASSIGN(main_menu, aMenu);
[main_menu setTitle: [[NSProcessInfo processInfo] processName]];
[main_menu setTitle:
[[[NSProcessInfo processInfo] processName] lastPathComponent]];
[main_menu sizeToFit];
/*
* Find a menucell with the title Windows this is the default windows menu
@ -1536,7 +1548,7 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
/* If there's only one window left, and that's the one being closed,
then we ask the delegate if the app is to be terminated. */
if (realcount <= 1)
if ((realcount <= 1) && [[notification object] isMainWindow])
{
NSLog(@"asking delegate whether to terminate app...");
if ([delegate respondsToSelector: @selector(applicationShouldTerminateAfterLastWindowClosed:)])

View file

@ -194,6 +194,9 @@
@"illegal margins supplied");
offsets = offsetSize;
[content_view setFrame: [self calcSizesAllowingNegative: NO]];
[self setNeedsDisplay: YES];
}
//
@ -228,11 +231,7 @@
f.origin.y = f.origin.y + (contentFrame.origin.y - r.origin.y);
[self setFrame: f];
if ([self superview])
[content_view setFrame: [self convertRect: contentFrame
fromView: [self superview]]];
else // ![self superview]
[content_view setFrame: contentFrame];
[content_view setFrame: [self calcSizesAllowingNegative: NO]];
}
- (void) sizeToFit
@ -378,10 +377,12 @@
- (id) initWithCoder: (NSCoder*)aDecoder
{
id aview;
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: @encode(id) at: &cell];
content_view = [aDecoder decodeObject];
aview = [aDecoder decodeObject];
[self setContentView: aview];
offsets = [aDecoder decodeSize];
border_rect = [aDecoder decodeRect];
title_rect = [aDecoder decodeRect];

View file

@ -23,8 +23,9 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
License along with this library;
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <gnustep/gui/config.h>

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <gnustep/gui/config.h>
@ -374,7 +374,7 @@
ofCell:(NSCell *)cell
{}
- (BOOL)readSelectionFromPasteboard:(NSPasteBoard *)pboard
- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard
{
return NO;
}

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <gnustep/gui/config.h>
@ -137,7 +137,6 @@
destPoint.x -= dx;
destPoint.y -= dy;
[window update]; // Make sure display is up to date.
[self lockFocus];
NSCopyBits(0, intersection, destPoint);
[self unlockFocus];

View file

@ -288,8 +288,7 @@ void setNSFont(NSString* key, NSFont* font)
{
[aDecoder decodeValueOfObjCType: @encode(id) at: &fontName];
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
return self;
return [[self class] fontWithName: fontName matrix: matrix];
}
@end /* NSFont */

View file

@ -241,7 +241,7 @@
- (void)setPanelFont: (NSFont *)fontObject
isMultiple: (BOOL)flag
{
panel_font = fontObject;
ASSIGN(panel_font, fontObject);
}
//
@ -293,7 +293,7 @@
{
[super initWithCoder: aDecoder];
panel_font = [aDecoder decodeObject];
panel_font = RETAIN([aDecoder decodeObject]);
return self;
}

View file

@ -21,7 +21,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
@ -1756,6 +1756,21 @@ NSGraphicsContext *GSCurrentContext()
matched = YES;
break;
case NSAppKitDefined:
if (mask & NSAppKitDefinedMask)
matched = YES;
break;
case NSSystemDefined:
if (mask & NSSystemDefinedMask)
matched = YES;
break;
case NSApplicationDefined:
if (mask & NSApplicationDefinedMask)
matched = YES;
break;
case NSPeriodic:
if (mask & NSPeriodicMask)
matched = YES;

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <AppKit/NSDragging.h>

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <AppKit/NSDragging.h>

View file

@ -692,7 +692,9 @@ NSRunAlertPanel(NSString *title,
}
[panel center];
[panel makeKeyAndOrderFront: panel];
if ([NSApp isActive])
[panel makeKeyWindow];
[panel orderFrontRegardless];
result = [panel runModal];
NSReleaseAlertPanel(panel);
return result;
@ -715,7 +717,9 @@ NSRunCriticalAlertPanel(NSString *title,
va_end (ap);
[panel center];
[panel makeKeyAndOrderFront: panel];
if ([NSApp isActive])
[panel makeKeyWindow];
[panel orderFrontRegardless];
result = [panel runModal];
NSReleaseAlertPanel(panel);
return result;
@ -738,7 +742,9 @@ NSRunInformationalAlertPanel(NSString *title,
va_end (ap);
[panel center];
[panel makeKeyAndOrderFront: panel];
if ([NSApp isActive])
[panel makeKeyWindow];
[panel orderFrontRegardless];
result = [panel runModal];
NSReleaseAlertPanel(panel);
return result;
@ -802,7 +808,9 @@ NSRunLocalizedAlertPanel(NSString *table,
}
[panel center];
[panel makeKeyAndOrderFront: panel];
if ([NSApp isActive])
[panel makeKeyWindow];
[panel orderFrontRegardless];
result = [panel runModal];
NSReleaseAlertPanel(panel);
return result;

View file

@ -156,9 +156,7 @@
- (void)removeAllItems
{
int i;
[[popb_menu itemArray] removeAllObjects];
[(NSMutableArray *)[popb_menu itemArray] removeAllObjects];
/*
for (i=0;i<[self numberOfItems];i++)
@ -315,14 +313,14 @@
if (!popb_pullsDown)
{
int aIndex = [self indexOfItemWithTitle:aString];
if (aIndex >= 0)
popb_selectedItem = aIndex;
else
{
[self addItemWithTitle:aString];
[self addItemWithTitle:aString];
popb_selectedItem = [self indexOfItemWithTitle:aString];
[self setNeedsDisplay:YES];
[self setNeedsDisplay:YES];
}
}
else
@ -380,12 +378,11 @@
- (void)sizeToFit
{
[[popb_menu menuView] sizeToFit];
}
}
- (void)_popup:(NSNotification*)notification
{
NSPopUpButton *popb = [notification object];
NSPoint cP;
NSRect butf;
NSRect winf;
@ -475,7 +472,7 @@
{
// First check ourselves
// if ([self mouse:aPoint inRect:bounds]) return self;
if ([self mouse:aPoint inRect:frame]) return self;
if ([self mouse:aPoint inRect: frame]) return self;
return nil;
}
@ -488,7 +485,10 @@
id aCell;
if ([popb_menu numberOfItems] == 0)
return;
{
[[NSPopUpButtonCell new] drawWithFrame:rect inView:self];
return;
}
if (!popb_pullsDown)
aCell = [[popb_menu itemArray] objectAtIndex:popb_selectedItem];

View file

@ -25,7 +25,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/* NB:

View file

@ -24,7 +24,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <gnustep/gui/config.h>

View file

@ -25,7 +25,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <gnustep/gui/config.h>
@ -60,16 +60,6 @@ static NSButtonCell* knobCell = nil;
static const float scrollerWidth = 18;
static const float buttonsWidth = 16;
static float halfKnobRectHeight;
static float slotOriginPlusKnobHeight;
static float slotOriginPlusSlotHeightMinusKnobHeight;
static float slotHeightMinusKnobHeight;
static float halfKnobRectWidth;
static float slotOriginPlusKnobWidth;
static float slotOriginPlusSlotWidthMinusHalfKnobWidth;
static float slotWidthMinusKnobWidth;
static NSRect slotRect = {{0,0},{0,0}};
static BOOL preCalcValues = NO;
/*
* Class methods
@ -402,113 +392,37 @@ static BOOL preCalcValues = NO;
{
NSRect knobRect = [self rectForPart: NSScrollerKnob];
NSRect slotRect = [self rectForPart: NSScrollerKnobSlot];
float floatValue = 0;
float position;
float min_pos;
float max_pos;
/*
* Adjust point to lie within the knob slot
* Compute limits and mouse position
*/
if (_isHorizontal)
{
float halfKnobRectWidth = knobRect.size.width / 2;
if (point.x < slotRect.origin.x + halfKnobRectWidth)
position = slotRect.origin.x + halfKnobRectWidth;
else
{
if (point.x > slotRect.origin.x + slotRect.size.width -
halfKnobRectWidth)
position = slotRect.origin.x + slotRect.size.width -
halfKnobRectWidth;
else
position = point.x;
}
/*
* Compute float value given the knob size
*/
floatValue = (position - (slotRect.origin.x + halfKnobRectWidth))
/ (slotRect.size.width - knobRect.size.width);
min_pos = NSMinX(slotRect) + NSWidth(knobRect) / 2;
max_pos = NSMaxX(slotRect) - NSWidth(knobRect) / 2;
position = point.x;
}
else
{
float halfKnobRectHeight = knobRect.size.height / 2;
if (point.y < slotRect.origin.y + halfKnobRectHeight)
position = slotRect.origin.y + halfKnobRectHeight;
else
{
if (point.y > slotRect.origin.y + slotRect.size.height -
halfKnobRectHeight)
position = slotRect.origin.y + slotRect.size.height -
halfKnobRectHeight;
else
position = point.y;
}
/*
* Compute float value given the knob size
*/
floatValue = (position - (slotRect.origin.y + halfKnobRectHeight)) /
(slotRect.size.height - knobRect.size.height);
min_pos = NSMinY(slotRect) + NSHeight(knobRect) / 2;
max_pos = NSMaxY(slotRect) - NSHeight(knobRect) / 2;
position = point.y;
}
return floatValue;
/*
* Compute float value
*/
if (position <= min_pos)
return 0;
if (position >= max_pos)
return 1;
return (position - min_pos) / (max_pos - min_pos);
}
- (void) _preCalcParts
{
NSRect knobRect = [self rectForPart: NSScrollerKnob];
slotRect = [self rectForPart: NSScrollerKnobSlot];
halfKnobRectWidth = knobRect.size.width / 2;
slotOriginPlusKnobWidth = slotRect.origin.x + halfKnobRectWidth;
slotOriginPlusSlotWidthMinusHalfKnobWidth = slotRect.origin.x +
slotRect.size.width - halfKnobRectWidth;
slotWidthMinusKnobWidth = slotRect.size.width - knobRect.size.width;
halfKnobRectHeight = knobRect.size.height / 2;
slotOriginPlusKnobHeight = slotRect.origin.y + halfKnobRectHeight;
slotOriginPlusSlotHeightMinusKnobHeight = slotRect.origin.y +
slotRect.size.height - halfKnobRectHeight;
slotHeightMinusKnobHeight = slotRect.size.height - knobRect.size.height;
}
- (float) _floatValueForMousePointFromPreCalc: (NSPoint)point
{
float floatValue = 0;
float position;
if (_isHorizontal)
{
if (point.x < slotOriginPlusKnobWidth)
position = slotOriginPlusKnobWidth;
else
{
if (point.x > slotOriginPlusSlotWidthMinusHalfKnobWidth)
position = slotOriginPlusSlotWidthMinusHalfKnobWidth;
else
position = point.x;
}
floatValue = (position - slotOriginPlusKnobWidth) /
slotWidthMinusKnobWidth;
}
else
{
if (point.y < slotOriginPlusKnobHeight)
position = slotOriginPlusKnobHeight;
else
{
if (point.y > slotOriginPlusSlotHeightMinusKnobHeight)
position = slotOriginPlusSlotHeightMinusKnobHeight;
else
position = point.y;
}
floatValue = (position - slotOriginPlusKnobHeight) /
slotHeightMinusKnobHeight;
}
return floatValue;
}
- (void) mouseDown: (NSEvent*)theEvent
{
@ -572,40 +486,28 @@ static BOOL preCalcValues = NO;
| NSPeriodicMask;
NSPoint point;
NSPoint apoint;
float oldFloatValue = _floatValue;
float lastPosition;
float newPosition;
float floatValue;
float xoffset = 0;
float yoffset = 0;
float offset;
NSDate *theDistantFuture = [NSDate distantFuture];
NSEventType eventType;
NSRect knobRect = {{0,0},{0,0}};
unsigned periodCount = 0;
NSRect knobRect;
unsigned flags = [theEvent modifierFlags];
BOOL firstTime = YES;
[self _preCalcParts];
preCalcValues = YES;
knobRect = [self rectForPart: NSScrollerKnob];
if (_hitPart == NSScrollerKnob)
apoint = [theEvent locationInWindow];
point = [self convertPoint: apoint fromView: nil];
if (_isHorizontal)
{
apoint = [theEvent locationInWindow];
point = [self convertPoint: apoint fromView: nil];
if (_isHorizontal)
{
if (point.x != knobRect.origin.x + knobRect.size.width/2)
{
xoffset = knobRect.origin.x + knobRect.size.width/2 - point.x;
}
}
else
{
if (point.y != knobRect.origin.y + knobRect.size.height/2)
{
yoffset = knobRect.origin.y + knobRect.size.height/2 - point.y;
}
}
lastPosition = NSMidX(knobRect);
offset = lastPosition - point.x;
}
else
{
lastPosition = NSMidY(knobRect);
offset = lastPosition - point.y;
}
_hitPart = NSScrollerKnob;
@ -621,66 +523,36 @@ static BOOL preCalcValues = NO;
{
apoint = [theEvent locationInWindow];
flags = [theEvent modifierFlags];
periodCount = 0;
}
else
{
/*
* if 6x periods have gone by w/o movement
* check mouse and update if necessary
*/
if (periodCount == 6)
{
apoint = [window mouseLocationOutsideOfEventStream];
periodCount = 0;
}
point = [self convertPoint: apoint fromView: nil];
point.x += xoffset;
point.y += yoffset;
if (_isHorizontal)
newPosition = point.x + offset;
else
newPosition = point.y + offset;
if (point.x != knobRect.origin.x || point.y != knobRect.origin.y)
{
if (firstTime)
{
firstTime = NO;
}
else if (flags & NSAlternateKeyMask)
{
float diff;
if (newPosition != lastPosition)
{
if (flags & NSAlternateKeyMask)
{
float diff;
diff = point.x - knobRect.origin.x;
diff = diff * 3 / 4;
xoffset -= diff;
point.x -= diff;
diff = point.y - knobRect.origin.y;
diff = diff * 3 / 4;
yoffset -= diff;
point.y -= diff;
}
diff = newPosition - lastPosition;
diff = diff * 3 / 4;
offset -= diff;
newPosition -= diff;
}
floatValue = [self _floatValueForMousePointFromPreCalc: point];
// only one coordinate (X or Y) is used to compute floatValue.
point = NSMakePoint(newPosition, newPosition);
floatValue = [self _floatValueForMousePoint: point];
if (floatValue != oldFloatValue)
{
[self setFloatValue: floatValue];
[self sendAction: _action to: _target];
[self setFloatValue: floatValue];
[self sendAction: _action to: _target];
/*
* Get current float value - which may have been changed
* when we sent the action to the target.
*/
oldFloatValue = _floatValue;
[window update];
}
knobRect.origin = point;
}
/*
* avoid timing related scrolling hesitation by counting number of
* periodic events since scroll pos was updated, when this reaches
* 6x periodic rate an update is forced on next periodic event
*/
periodCount++;
lastPosition = newPosition;
}
}
theEvent = [NSApp nextEventMatchingMask: eventMask
@ -689,8 +561,6 @@ static BOOL preCalcValues = NO;
dequeue: YES];
}
[NSEvent stopPeriodicEvents];
preCalcValues = NO;
}
- (void) trackScrollButtons: (NSEvent*)theEvent
@ -748,7 +618,7 @@ static BOOL preCalcValues = NO;
[self unlockFocus];
[window flushWindow];
NSLog (@"tracking cell %x", theCell);
NSDebugLog (@"tracking cell %x", theCell);
shouldReturn = [theCell trackMouse: theEvent
inRect: rect
@ -821,13 +691,7 @@ static BOOL preCalcValues = NO;
{
NSRect rect;
/*
* in a modal loop we have already pre calc'd our parts
*/
if (preCalcValues)
rect = slotRect;
else
rect = [self rectForPart: NSScrollerKnobSlot];
rect = [self rectForPart: NSScrollerKnobSlot];
[[NSColor scrollBarColor] set];
NSRectFill(rect);
@ -904,6 +768,7 @@ static BOOL preCalcValues = NO;
slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone
? 0 : buttonsSize);
knobHeight = _knobProportion * slotHeight;
knobHeight = (float)floor(knobHeight);
if (knobHeight < buttonsWidth)
knobHeight = buttonsWidth;

View file

@ -22,7 +22,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <Foundation/NSRunLoop.h>

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include "gnustep/gui/config.h"

View file

@ -433,7 +433,7 @@ static NSRange MakeRangeFromAbs(int a1,int a2)
draws_background = YES;
[self setBackgroundColor: [NSColor textBackgroundColor]];
[self setTextColor: [NSColor textColor]];
default_font = [NSFont userFontOfSize: 12];
default_font = RETAIN([NSFont userFontOfSize: 12]);
[self setSelectionWordGranularitySet:
[NSCharacterSet characterSetWithCharactersInString: @" "]]; //[NSCharacterSet whitespaceCharacterSet]
@ -627,8 +627,6 @@ static NSRange MakeRangeFromAbs(int a1,int a2)
while(lpos && [set characterIsMember: [string characterAtIndex: lpos]]== lmemberstate) lpos--;
if ([set characterIsMember: [string characterAtIndex: lpos]] != lmemberstate && lpos < proposedCharRange.location) lpos++;
NSLog(@"lpos = %d, rpos = %d\n", lpos, rpos);
return MakeRangeFromAbs(lpos,rpos);
}
@ -834,7 +832,7 @@ static NSRange MakeRangeFromAbs(int a1,int a2)
{ if (font)
{ [rtfContent addAttribute: NSFontAttributeName value: font range: range];
[self rebuildFromCharacterIndex: range.location];
NSLog(@"did set font");
NSDebugLLog(@"NSText", @"did set font");
}
} else {}
}
@ -1339,7 +1337,7 @@ currentCursorY=[self rectForCharacterIndex: NSMaxRange([self selectedRange])].or
didDragging=YES;
}
NSLog(@"chosenRange. location = % d, length = %d\n",
NSDebugLog(@"chosenRange. location = % d, length = %d\n",
(int)chosenRange.location, (int)chosenRange.length);
[self setSelectedRangeNoDrawing: chosenRange];
@ -1498,6 +1496,7 @@ NSLog(NSStringFromRange(redrawLineRange));
-(void) keyDown: (NSEvent *)theEvent
{ unsigned short keyCode;
if (!is_editable) return; // If not editable then don't recognize the key down
if ((keyCode=[theEvent keyCode]))
@ -1533,7 +1532,6 @@ NSLog(NSStringFromRange(redrawLineRange));
case NSCarriageReturnKey: // return
if ([self isFieldEditor]) //textShouldEndEditing delegation is handled in resignFirstResponder
{
NSLog(@"isFieldEditor return\n");
#if 0
// Movement codes for movement between fields; these codes are the intValue of the NSTextMovement key in NSTextDidEndEditing notifications
[NSNumber numberWithInt: NSIllegalTextMovement]
@ -2276,8 +2274,8 @@ NSLog(@"opti hook 2");
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_ruler_visible];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_field_editor];
background_color = [aDecoder decodeObject];
text_color = [aDecoder decodeObject];
default_font=[aDecoder decodeObject];
text_color = RETAIN([aDecoder decodeObject]);
default_font = RETAIN([aDecoder decodeObject]);
[aDecoder decodeValueOfObjCType: @encode(NSRange) at: &selected_range];
return self;

View file

@ -70,7 +70,7 @@
- (id) initWithContainerSize: (NSSize)aSize
{
NSLog(@"NSTextContainer initWithContainerSize");
NSDebugLLog(@"NSText", @"NSTextContainer initWithContainerSize");
_layoutManager = nil;
_textView = nil;
_containerRect.size = aSize;

View file

@ -93,7 +93,7 @@ id _nsTextfieldCellClass = nil;
[cell setSelectable: YES];
[cell setEnabled: YES];
[cell setEditable: YES];
[cell setDrawsBackground: YES];
[self setDrawsBackground: YES];
text_cursor = [[NSCursor IBeamCursor] retain];
return self;
@ -374,7 +374,8 @@ fprintf(stderr, " TextField mouseDown --- ");
unsigned int key_code = [theEvent keyCode];
id nextResponder;
NSLog(@"NSTextField: -keyDown %s\n", [[theEvent characters] cString]);
NSDebugLLog(@"NSText",
@"NSTextField: -keyDown %s\n", [[theEvent characters] cString]);
// If TAB, SHIFT-TAB or RETURN key then make another text the first
// responder. This depends on key.
@ -463,7 +464,7 @@ fprintf(stderr, " TextField mouseDown --- ");
- (BOOL) becomeFirstResponder
{
if ([self isSelectable])
if ([self isSelectable] || [self isEditable])
{
[cell selectText: self];
return YES;
@ -519,6 +520,9 @@ fprintf(stderr, " TextField mouseDown --- ");
return NO;
}
// [self display];
// [window flushWindow];
return YES;
}

View file

@ -139,7 +139,7 @@ changeInLength: [attributedString length] - aRange.length];
- (void) edited: (unsigned)mask range: (NSRange)old changeInLength: (int)delta
{
NSLog(@"edited:range:changeInLength: called");
NSDebugLLog(@"NSText", @"edited:range:changeInLength: called");
/*
* Add in any new flags for this edit.
@ -193,7 +193,7 @@ changeInLength: [attributedString length] - aRange.length];
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
NSLog(@"processEditing called in NSTextStorage.");
NSDebugLLog(@"NSText", @"processEditing called in NSTextStorage.");
[nc postNotificationName: NSTextStorageWillProcessEditingNotification
object: self];

View file

@ -171,8 +171,8 @@ glyphRangeForTextContainer:textContainer];
{
[self lockFocus];
NSLog(@"drawInsertionPointInRect: (%f, %f)", aRect.size.width,
aRect.size.height);
NSDebugLLog(@"NSText",
@"drawInsertionPointInRect: (%f, %f)", aRect.size.width, aRect.size.height);
aRect.size.width = 1;
@ -315,7 +315,7 @@ aRect.size.height);
affinity:(NSSelectionAffinity)affinity
stillSelecting:(BOOL)flag
{
NSLog(@"setSelectedRange stillSelecting.");
NSDebugLLog(@"NSText", @"setSelectedRange stillSelecting.");
tv_selectedRange = charRange;
[self setSelectionGranularity:NSSelectByCharacter];
@ -930,7 +930,7 @@ container, returning the modified location. */
- (void)insertText:(NSString *)aString
{
NSLog(@"%@", aString);
NSDebugLLog(@"NSText", @"%@", aString);
if (![aString isKindOfClass:[NSAttributedString class]])
aString = [[NSAttributedString alloc] initWithString:aString

View file

@ -499,7 +499,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (window != nil)
[ctxt _removeDragTypes: t fromWindow: [window windowNumber]];
if (newWindow != nil)
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
}
window = newWindow;
@ -2283,6 +2283,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &autoresize_subviews];
NSDebugLLog(@"NSView", @"NSView: finish decoding\n");
frameMatrix = [NSAffineTransform new];
boundsMatrix = [NSAffineTransform new];
matrixToWindow = [NSAffineTransform new];
matrixFromWindow = [NSAffineTransform new];
[frameMatrix setFrameOrigin: frame.origin];
/*
* Keep a note of whether this is a flipped view or not.
*/

View file

@ -738,6 +738,13 @@ static NSRecursiveLock *windowsLock;
- (void) setMaxSize: (NSSize)aSize
{
/*
* Documented maximum size for macOS-X - do we need this restriction?
*/
if (aSize.width > 10000)
aSize.width = 10000;
if (aSize.height > 10000)
aSize.height = 10000;
maximum_size = aSize;
}
@ -859,10 +866,34 @@ static NSRecursiveLock *windowsLock;
is_autodisplay = flag;
}
- (void) _handleWindowNeedsDisplay: (id)bogus
{
[self displayIfNeeded];
}
- (void) setViewsNeedDisplay: (BOOL)flag
{
needs_display = flag;
[NSApp setWindowsNeedUpdate: YES];
if (flag)
{
[NSApp setWindowsNeedUpdate: YES];
[[NSRunLoop currentRunLoop]
performSelector: @selector(_handleWindowNeedsDisplay:)
target: self
argument: nil
order: 600000 /*NSDisplayWindowRunLoopOrdering in OS*/
modes: [NSArray arrayWithObjects:
NSDefaultRunLoopMode,
NSModalPanelRunLoopMode,
NSEventTrackingRunLoopMode, nil]];
}
else
{
[[NSRunLoop currentRunLoop]
cancelPerformSelector: @selector(_handleWindowNeedsDisplay:)
target: self
argument: nil];
}
}
- (BOOL) viewsNeedDisplay
@ -1612,6 +1643,7 @@ static NSRecursiveLock *windowsLock;
break;
case GSAppKitDraggingExit:
dragInfo = [GSCurrentContext() _dragInfo];
if (_lastDragView && accepts_drag)
GSPerformDragSelector(_lastDragView,
@selector(draggingExited:), dragInfo,
@ -1621,6 +1653,7 @@ static NSRecursiveLock *windowsLock;
case GSAppKitDraggingDrop:
if (_lastDragView && accepts_drag)
{
dragInfo = [GSCurrentContext() _dragInfo];
GSPerformDragSelector(_lastDragView,
@selector(prepareForDragOperation:),
dragInfo, action);
@ -1791,9 +1824,25 @@ static NSRecursiveLock *windowsLock;
- (void) setFrameFromString: (NSString *)string
{
NSRect rect = NSRectFromString(string);
NSRect frameRect = NSRectFromString(string);
[self setFrame: rect display: YES];
if (maximum_size.width > 0 && frameRect.size.width > maximum_size.width)
{
frameRect.size.width = maximum_size.width;
}
if (maximum_size.height > 0 && frameRect.size.height > maximum_size.height)
{
frameRect.size.height = maximum_size.height;
}
if (frameRect.size.width < minimum_size.width)
{
frameRect.size.width = minimum_size.width;
}
if (frameRect.size.height < minimum_size.height)
{
frameRect.size.height = minimum_size.height;
}
[self setFrame: frameRect display: YES];
}
- (BOOL) setFrameUsingName: (NSString *)name
@ -2154,7 +2203,7 @@ static NSRecursiveLock *windowsLock;
BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo)
{
NSPasteboard *pb = [dragInfo draggingPasteBoard];
NSPasteboard *pb = [dragInfo draggingPasteboard];
if ([pb availableTypeFromArray: GSGetDragTypes(v)])
return YES;
return NO;

View file

@ -26,7 +26,7 @@
;
; 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., 675 Mass Ave, Cambridge, MA 02139, USA.
; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
;
LIBRARY libgnustep-gui
EXPORTS

View file

@ -26,7 +26,7 @@
;
; 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., 675 Mass Ave, Cambridge, MA 02139, USA.
; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
;
LIBRARY libgnustep-gui
EXPORTS

View file

@ -20,7 +20,7 @@
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <windows.h>

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.5.5
GNUSTEP_GUI_BASE=0.6.0
LIB_FOUNDATION=0.8.1
GNUSTEP_GUI_LIBTIFF=3.4
GNUSTEP_GUI_DGS=0.5.0
GNUSTEP_GUI_DGS=0.5.7
GNUSTEP_GUI_DPSCLIENT=6.1
# The version number of this release.
GNUSTEP_GUI_MAJOR_VERSION=0
GNUSTEP_GUI_MINOR_VERSION=5
GNUSTEP_GUI_SUBMINOR_VERSION=5
GNUSTEP_GUI_MINOR_VERSION=6
GNUSTEP_GUI_SUBMINOR_VERSION=0
GNUSTEP_GUI_VERSION=${GNUSTEP_GUI_MAJOR_VERSION}.${GNUSTEP_GUI_MINOR_VERSION}.${GNUSTEP_GUI_SUBMINOR_VERSION}
VERSION=${GNUSTEP_GUI_VERSION}