Commit graph

4999 commits

Author SHA1 Message Date
ericwa
82c961c9c1 * Headers/AppKit/NSImageCell.h:
* Source/NSImageCell.m: Add support for NSImageScaleProportionallyUpOrDown


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33309 72102866-910b-0410-8b05-ffd578937521
2011-06-15 18:38:12 +00:00
ericwa
ad79d99943 * Source/NSImage.m: Use -bestRepresentationForRect:context:hints: in
-guiDrawInRect:... as well.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33308 72102866-910b-0410-8b05-ffd578937521
2011-06-15 02:04:33 +00:00
fredkiefer
66f70bb169 * Source/NSSegmentedCell.m (-initWithCoder:): Protect against
selected segment being -1.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33306 72102866-910b-0410-8b05-ffd578937521
2011-06-14 22:51:28 +00:00
ericwa
5da6d52508 * Source/NSImage.m: Implement -bestRepresentationForRect:context:hints:,
which chooses the smallest rep larger than or equal to the provided size.

Modify -nativeDrawInRect:... to use the above method for choosing a rep.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33304 72102866-910b-0410-8b05-ffd578937521
2011-06-14 19:00:23 +00:00
ericwa
f77fd386f4 * Source/NSImage.m (-guiDrawInRect:...): Handle dstRect with a zero size
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33303 72102866-910b-0410-8b05-ffd578937521
2011-06-14 18:31:35 +00:00
ericwa
b31f48569c * Source/NSImage.m: Remove unnecessary DPSgsave/DPSgrestore I added
earlier in -nativeDrawInRect:... and replace them with saving/restoring
the transformation matrix. The DPSgsave/DPSgrestore were causing problems
when drawing images with a non-rectangular clipping area.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33300 72102866-910b-0410-8b05-ffd578937521
2011-06-14 16:27:38 +00:00
ericwa
38d3783263 * Source/NSImage.m: Tidy the -composite*/-dissolve* methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33299 72102866-910b-0410-8b05-ffd578937521
2011-06-14 06:08:40 +00:00
ericwa
628f1e3658 * Source/NSTextView.m (-scrollRangeToVisible:): Work with ranges
outside the receiver (in a situation with multiple NSTextView's
connected to a layout manager)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33298 72102866-910b-0410-8b05-ffd578937521
2011-06-14 02:32:55 +00:00
ericwa
96843b7efa * Source/NSView.m (-scrollRectToVisible:): Work when the receiver
isn't partially visible in the clip view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33297 72102866-910b-0410-8b05-ffd578937521
2011-06-14 02:27:35 +00:00
ericwa
4090cafa25 * Source/NSImage.m: Completely overhaul the best rep selection.
It should now be very close to the algorithm described in the cocoa
drawing guide, and fixes numerous bugs with the old code.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33295 72102866-910b-0410-8b05-ffd578937521
2011-06-13 22:32:28 +00:00
fredkiefer
f29c54e66f Add keyed coding. This is still rather useless until we get a proper
implementation for -serializedRepresentation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33294 72102866-910b-0410-8b05-ffd578937521
2011-06-13 22:22:29 +00:00
ericwa
61b0a0ae7b * Source/NSBitmapImageRep.m: Reduce floating-point error in the
expression which computes image point size using DPI and pixel size
(for TIFF images.)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33293 72102866-910b-0410-8b05-ffd578937521
2011-06-13 22:09:52 +00:00
ericwa
680790427f * Source/NSImageRep.m (-description): Implement -description to
aid debugging.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33292 72102866-910b-0410-8b05-ffd578937521
2011-06-13 18:55:57 +00:00
fredkiefer
1930605452 Add keyed coding for print info.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33290 72102866-910b-0410-8b05-ffd578937521
2011-06-13 14:45:41 +00:00
fredkiefer
2eb94935e1 Add methods -_becomeRulerClient and -_resignRulerClient to set self as the
ruler client and to resign from that. These get called when self becomes 
first responder or resigns from first responder.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33287 72102866-910b-0410-8b05-ffd578937521
2011-06-12 22:43:08 +00:00
fredkiefer
bf245bc3cf Add new MacOSX strings for NSPrintInfo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33282 72102866-910b-0410-8b05-ffd578937521
2011-06-11 20:34:49 +00:00
fredkiefer
0c5ed271e1 Add a few MacOSX methods with dummy implementations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33281 72102866-910b-0410-8b05-ffd578937521
2011-06-11 15:48:08 +00:00
fredkiefer
f507c26271 Add a few key value bindings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33277 72102866-910b-0410-8b05-ffd578937521
2011-06-11 12:01:59 +00:00
fredkiefer
4f1e1d69a2 Remove comment about libicns being GPL, it is now LGPL 2.1.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33273 72102866-910b-0410-8b05-ffd578937521
2011-06-10 08:48:12 +00:00
fredkiefer
87aa21aa33 Add basic implementation for more action methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33272 72102866-910b-0410-8b05-ffd578937521
2011-06-10 08:31:22 +00:00
gcasa
87920fb9b9 2011-06-09 13:49-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move notifications handling code to
	setTheme: instead and add code which deactivates the notifications
	and then starts listening again after activate is called.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33267 72102866-910b-0410-8b05-ffd578937521
2011-06-09 17:51:39 +00:00
gcasa
2138dcdb9f 2011-06-09 13:43-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move call to listen to default changes to 
	activate instead of +initialize. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33266 72102866-910b-0410-8b05-ffd578937521
2011-06-09 17:46:36 +00:00
gcasa
f14428de58 Remove temporary fix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33255 72102866-910b-0410-8b05-ffd578937521
2011-06-07 11:43:00 +00:00
fredkiefer
7fec0a25f1 * Source/externs.m: Correct the strings for NSPrintPanel.
* Source/NSAttributedString.m (-setBaseWritingDirection:range:):
Add proper implementation for this method.
* Source/NSTextView_actions.m (-insertContainerBreak:,
-insertLineBreak): Add this methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33254 72102866-910b-0410-8b05-ffd578937521
2011-06-06 11:33:40 +00:00
fredkiefer
3bfbeeee07 Add newer MacOSX methods to NSPrintPanel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33252 72102866-910b-0410-8b05-ffd578937521
2011-06-05 21:55:34 +00:00
wlux
a6164dc306 Create the app icon in NSApplication -_init as suggested by Fred.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33244 72102866-910b-0410-8b05-ffd578937521
2011-06-04 15:07:54 +00:00
wlux
fe515ca1e1 Revert to creating the app icon in finishLaunching, since existing
applications that do not use NSApplicationMain otherwise won't get an
app icon.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33242 72102866-910b-0410-8b05-ffd578937521
2011-06-04 08:42:33 +00:00
gcasa
958269ba98 Revert last change and add temporary fix for crash.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33236 72102866-910b-0410-8b05-ffd578937521
2011-06-03 05:00:50 +00:00
gcasa
9a272cd97d Use the NSArchiver to copy the menu since the copy method does not do a deep enough copy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33234 72102866-910b-0410-8b05-ffd578937521
2011-06-02 20:22:39 +00:00
wlux
8e402fc361 Ensure that applications get a proper app icon under WindowMaker even
when their main nib contains visible at launch time windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33231 72102866-910b-0410-8b05-ffd578937521
2011-06-02 08:45:07 +00:00
wlux
479baf70bf Fix management of windows whose hide on deactivate attribute is set.
In particular, such windows remain ordered out when the application
orders them out while it is not active and then is activated again.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33213 72102866-910b-0410-8b05-ffd578937521
2011-05-31 09:59:48 +00:00
wlux
f10f10e1ca Improve implementation of NSImage -bestRepresentationForDevice: for
images with multiple representations and fix a related bug.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33211 72102866-910b-0410-8b05-ffd578937521
2011-05-31 07:35:57 +00:00
gcasa
42d9fbb043 Minor correction.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33201 72102866-910b-0410-8b05-ffd578937521
2011-05-30 00:40:15 +00:00
gcasa
af73d9265a * Source/GNUmakefile: Remove NSManagedObjectContext.[hm] from compile
* Source/NSManagedObjectContext.h
	* Source/NSManagedObjectContext.m: Delete
	* Source/NSObjectController.m: Remove #import and add @class 
	declaration.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33200 72102866-910b-0410-8b05-ffd578937521
2011-05-30 00:36:50 +00:00
fredkiefer
7eabdc67c2 Use rint instead of round.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33195 72102866-910b-0410-8b05-ffd578937521
2011-05-29 18:50:43 +00:00
theraven
0c9d090532 Don't create a zone in GC mode (detected at run time). This avoids a warning
when starting GUI apps in GC mode, but should have no real effect on
functionality.

Note: this zone seems to have been created for OpenStep compatibility, but then
we don't actually use it anywhere.  The Cocoa docs say that this is 'The zone
from which NSMenu objects should be allocated', but we allocate NSMenu objects
from the default malloc zone.  

Fred: I think the correct thing to do here is probably to just return
NSDefaultMallocZone() from +menuZone in all modes.  Can you take a look and
see?



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33150 72102866-910b-0410-8b05-ffd578937521
2011-05-27 14:08:35 +00:00
theraven
dbd4c1b77c Turn release messages sent to autorelease pools into drain messages. No
functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:42:37 +00:00
fredkiefer
ac36e417ea Declare a few MacOSX 10.5 methods and make
the background of the NSSplitView transparent by default.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33139 72102866-910b-0410-8b05-ffd578937521
2011-05-27 08:35:24 +00:00
ericwa
b1cca9952a * Source/NSImage.m (-nativeDrawInRect:...): Fix drawing images
with a source rect smaller than the entire image. This was a mistake
left by my last commit to this method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33135 72102866-910b-0410-8b05-ffd578937521
2011-05-26 20:50:50 +00:00
ericwa
4857c9bbd4 * Source/NSLayoutManager.m:
* Source/NSGraphicsContext.m:
* Headers/AppKit/DPSOperators.h:
* Headers/AppKit/NSGraphicsContext.h:
* Headers/Additions/GNUstepGUI/GSMethodTable.h:
New GSShowGlyphsWithAdvances, which replaces
GSShowGlyphs as the primitive text drawing method.
(used by -[NSLayoutManager drawGlyphsForGlyphRange:atPoint:])

Requires r33121 in -back.

Note that the advances aren't actually used by -back yet so
text output should be unchanged.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33122 72102866-910b-0410-8b05-ffd578937521
2011-05-26 03:55:55 +00:00
ericwa
1300127d57 * Source/NSComboBoxCell.m: Correct positioning of popup window when
a scale factor is in use.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33120 72102866-910b-0410-8b05-ffd578937521
2011-05-25 23:45:19 +00:00
ericwa
7442ffb62e Add a FIXME to NSLayoutManager
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33118 72102866-910b-0410-8b05-ffd578937521
2011-05-25 21:47:30 +00:00
theraven
00f5e41f60 Change direct references to the isa pointer to calls to object_getClass(). In
discussion with Steve Naroff (before he left Apple) it was decided that the isa
pointer should be regarded as an implementation detail and not part of the
language, so direct references to it are deprecated (on OS X).  This gives the
runtime a bit more freedom to do secret isa-swizzling tricks.

I've had these changes sitting in my copy for ages - no idea why they weren't
committed.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33111 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:19:09 +00:00
fredkiefer
b4e1a828e3 Add OSX 10.5 methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33081 72102866-910b-0410-8b05-ffd578937521
2011-05-21 22:18:22 +00:00
fredkiefer
79ee526fc5 * Source/NSView.m (-setSubviews:): New method.
Code by Banlu Kemiyatorn <object@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33068 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:13 +00:00
fredkiefer
a2088a66a9 Method to get all images from an ICNS file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33062 72102866-910b-0410-8b05-ffd578937521
2011-05-18 20:07:02 +00:00
fredkiefer
73ae595130 Remove most uses of the method [NSView -removeSubview:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33047 72102866-910b-0410-8b05-ffd578937521
2011-05-15 14:42:08 +00:00
ericwa
4bb166cb5d * Source/NSTextView.m: Use pointing hand cursor for links
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33043 72102866-910b-0410-8b05-ffd578937521
2011-05-15 06:55:33 +00:00
ericwa
73a0d9bc1d * Source/NSTableHeaderView.m: Use resize cursors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33042 72102866-910b-0410-8b05-ffd578937521
2011-05-15 05:48:22 +00:00
ericwa
4c45b02292 * Source/NSTextView.m: Use IBeam cursor if selectable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33041 72102866-910b-0410-8b05-ffd578937521
2011-05-15 05:03:14 +00:00