Commit graph

7078 commits

Author SHA1 Message Date
Eric Wasylishen
c4048d4f4b * Source/NSView.m (_setNeedsDisplayInRect_real:): Enlarge
(if necessary) _invalidRect so it lies on integral device pixels.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33809 72102866-910b-0410-8b05-ffd578937521
2011-09-07 05:33:25 +00:00
Fred Kiefer
046bc43c63 * Source/NSApplication.m (-setApplicationIconImage): Ignore this
call when the image is nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33801 72102866-910b-0410-8b05-ffd578937521
2011-08-31 19:15:47 +00:00
Eric Wasylishen
1b780e1bc7 * Source/NSCachedImageRep.m: Restore the implementation of -draw
because libart/xlib need it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33797 72102866-910b-0410-8b05-ffd578937521
2011-08-30 02:20:29 +00:00
Christopher Armstrong
42162c4e22 2011-08-28 Christopher Armstrong <carmstrong@fastmail.com.au>
* Source/GSHorizontalTypesetter.m: Split declaration of struct
	GSHorizontalTypesetter_glyph_cache_s and struct
	GSHorizontalTypesetter_line_frag_s from their typedefs to compile
	under clang.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33793 72102866-910b-0410-8b05-ffd578937521
2011-08-28 09:25:02 +00:00
Fred Kiefer
5554634f9c Correct last commit to use && instead of ||.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33788 72102866-910b-0410-8b05-ffd578937521
2011-08-26 07:35:41 +00:00
Riccardo Mottola
4e0e32caac check that the array of reps is populated, not just non-nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33786 72102866-910b-0410-8b05-ffd578937521
2011-08-25 15:20:45 +00:00
Eric Wasylishen
e14b034d8d * Source/NSImage.m (-setSize:): Don't invalidate the cache anymore,
because we now cache the entire representation and not the rep scaled
to the image's size.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33770 72102866-910b-0410-8b05-ffd578937521
2011-08-20 18:37:52 +00:00
Eric Wasylishen
5531d27e56 * Source/NSImage.m: Reinstate use of the cached image rep, but only
on backends supporting GSdraw: (cairo).  This means we don't have to
create a window for every call to draw an image, and gives me a 5-10x
speedup for image drawing.
* Source/NSCachedImageRep.m: Implement private method
-nativeDrawInRect:.. which is called by NSImageRep's
-drawInRect:fromRect:..., and efficiently draw the cached rep
using GSdraw:. Also make some changes so cached image reps can have a
DPI != 72.
* Headers/AppKit/NSCachedImageRep.h: New private init method that lets
you specify diferent pixel size and point size.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33765 72102866-910b-0410-8b05-ffd578937521
2011-08-19 19:06:41 +00:00
Eric Wasylishen
99abec2ebf * Headers/AppKit/NSImageRep.h: Add
-drawInRect:fromRect:operation:fraction:respectFlipped:hints: method
* Source/NSImage.m:
* Source/NSImageRep.m: Refactor drawing code from NSImage to NSImageRep.
This should cause no functionlity change, but it lets NSImageRep
subclasses implement more efficient versions of -drawInRect:fromRect:...
that don't involve the (expensive) drawing of the image in a temporary
offscreen window and then drawing from there on to the destination surface.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33764 72102866-910b-0410-8b05-ffd578937521
2011-08-18 23:57:50 +00:00
Eric Wasylishen
e4979c9102 * Source/Functions.m (NSDrawNinePartImage): Pixel-align drawing rect using
-[NSView centerScanRect]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33761 72102866-910b-0410-8b05-ffd578937521
2011-08-17 16:24:17 +00:00
Eric Wasylishen
8770276b3b * Source/Functions.m (NSDrawNinePartImage): Bugfix when drawing with
not enough space


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33749 72102866-910b-0410-8b05-ffd578937521
2011-08-16 03:45:12 +00:00
Eric Wasylishen
977806c7e1 * Source/Functions.m (NSDrawNinePartImage): Bugfix in flipped drawing code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33748 72102866-910b-0410-8b05-ffd578937521
2011-08-16 03:31:04 +00:00
Eric Wasylishen
ad562c0794 * Source/Functions.m:
* Headers/AppKit/NSGraphics.h: NSDrawNinePartImage implementation


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33745 72102866-910b-0410-8b05-ffd578937521
2011-08-16 02:58:12 +00:00
Eric Wasylishen
01c4a0be63 * Headers/Additions/GNUstepGUI/GSTheme.h: New GSThemeMargins struct.
Rename buttonBorderForCell:style:state: to buttonMarginsForCell:style:state:
and return the top/bottom/left/right margins instead of just two values.
(This is a theme API break.)
* Source/GSThemeDrawing.m: Implement buttonMarginsForCell:style:state:.
Also reduce the top and left margin of the default button by 1 pt, to
better reflect the button's appearance.
* Source/GSGuiPrivate.h: Add a GSRoundTowardsNegativeInfinity function
* Source/NSButtonCell.m (-drawImage:withFrame:inView:): Round the image
position down and to the right, as this seems to look the best.
* Source/NSButtonCell.m (-cellSize): Call new buttonMarginsForCell: method
* Source/NSButtonCell.m (-drawingRectForBounds:): Call new
buttonMarginsForCell: method


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33743 72102866-910b-0410-8b05-ffd578937521
2011-08-15 23:12:37 +00:00
Eric Wasylishen
6ec3f1a58b * Source/NSImage.m (GSResolutionOfImageRep): Specify behaviour when the
rep has a size of zero, or is a vector rep. Prevent division by 0.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33742 72102866-910b-0410-8b05-ffd578937521
2011-08-15 20:19:21 +00:00
Eric Wasylishen
e9367ed059 * Source/NSImage.m (-nativeDrawInRect:...): Deal with a zero rep size
* Source/NSCustomImageRep.m:
- Don't retain the delegate (matching OS X)
- Remove unnecessary flip checks from -drawAtPoint: and -drawInRect:
  to match the code in NSImageRep
- Fix a mistake when setting the ctm scale factor


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33741 72102866-910b-0410-8b05-ffd578937521
2011-08-15 20:11:11 +00:00
David Chisnall
44a37224b8 Added ChangeLog entry from last commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33719 72102866-910b-0410-8b05-ffd578937521
2011-08-11 10:57:33 +00:00
David Chisnall
0760bfa96f Move the +defaultSpeechServer method into a category interface, to silence a clang warning.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33718 72102866-910b-0410-8b05-ffd578937521
2011-08-11 10:57:02 +00:00
Fred Kiefer
4e05c96c6f * Source/NSView.m (-setBoundsSize:): Adjust the origin as well.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33717 72102866-910b-0410-8b05-ffd578937521
2011-08-11 08:14:53 +00:00
Fred Kiefer
9d79d0c978 * Source/NSMenu.m (+initialize): Don't create the default menu
zone as we never use it and a change in base made this an
  expensive operation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33694 72102866-910b-0410-8b05-ffd578937521
2011-08-04 08:52:42 +00:00
Eric Wasylishen
8dc626f845 * Images/common_RadioOn.tiff:
* Images/common_RadioOff.tiff: Add high-dpi versions


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33685 72102866-910b-0410-8b05-ffd578937521
2011-08-03 03:15:34 +00:00
Eric Wasylishen
5d897881e4 * Source/GSLayoutManager.m:
* Source/GSHorizontalTypesetter.m:
* Headers/Additions/GNUstepGUI/GSLayoutManager_internal.h:
* Headers/Additions/GNUstepGUI/GSLayoutManager.h: Store
glyph advances in the runs in GSLayoutManager. Extend the
NSGlyphStorage protocol to support a case where the glyph
generator provides the glyph advances.

I'm hoping to use this in the future to implement (optional)
glyph generators which are wrappers around HarfBuzz or the ICU
OpenType layout engine.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33684 72102866-910b-0410-8b05-ffd578937521
2011-08-02 23:34:06 +00:00
Eric Wasylishen
3ad54a9a3c * Images/common_SwitchOff.tiff:
* Images/common_SwitchOn.tiff:
* Images/common_2DCheckMark.tiff: Add a few more high-res images


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33679 72102866-910b-0410-8b05-ffd578937521
2011-08-02 08:19:45 +00:00
Eric Wasylishen
2fc6fd0e75 * Documentation/news.texi:
* Documentation/ReleaseNotes.gsdoc: Add some documentation on
new features in gui


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33678 72102866-910b-0410-8b05-ffd578937521
2011-08-02 05:26:41 +00:00
Eric Wasylishen
48f0fd951c * Source/NSScreen.m (-userSpaceScaleFactor): Use the DPI
from the display server instead of ignoring it and assuming 72.

The X11 server was changed to always return 72 for now, so there
is no change in behaviour on X.

On Windows we do use the system DPI/scale factor now.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33659 72102866-910b-0410-8b05-ffd578937521
2011-07-30 20:44:06 +00:00
Riccardo Mottola
59cb20f719 chance PNG check from SEARCH to CHECK
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33628 72102866-910b-0410-8b05-ffd578937521
2011-07-25 11:22:44 +00:00
Fred Kiefer
d2011237e8 * Source/NSAnimation.m (NSViewAnimation -dealloc): Use DESTROY
instead of RELEASE as _viewAnimationDesc to prevent segmentation
        fault in super call.
        * Source/NSWindow.m (-setFrame:display:animate:): Use
        NSViewAnimation instead of local blocking code.
        * Source/NSWindow.m (-animationResizeTime:): Use abs() in all
        * directions.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33624 72102866-910b-0410-8b05-ffd578937521
2011-07-24 18:53:07 +00:00
Fred Kiefer
1043d6ecce Split scroll test in two, as only the visibleRect method wont work for
views without window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33614 72102866-910b-0410-8b05-ffd578937521
2011-07-23 14:21:28 +00:00
Fred Kiefer
c100baf6b4 Lots of minimal changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33613 72102866-910b-0410-8b05-ffd578937521
2011-07-23 13:43:33 +00:00
Eric Wasylishen
119056ab5f * Source/GSToolTips.m (-_timedOut:): Guard against nil tooltip string
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33599 72102866-910b-0410-8b05-ffd578937521
2011-07-21 07:12:07 +00:00
Eric Wasylishen
a15066d183 * Source/NSButtonCell.m (-title): Return @"" instead of nil
* Source/NSButtonCell.m (-alternateTitle): Return @"" instead of nil
* Source/NSButtonCell.m (-attributedAlternateTitle): Use
[self alternateTitle] instead of accessing _altContents directly to guard
against _altContents being nil
* Source/NSButtonCell.m (-attributedTitle): Don't return nil. Use
[self title] instead of accessing _contents directly to guard against
_contents being nil
* Source/NSButtonCell.m (-keyEquivalent): Return @"" instead of nil
* Source/NSButtonCell.m (-encodeWithCoder):
For keyEquivelant and alternateTitle, now that the methods never return
nil, instead of checking if they return nil to decide whether to encode them,
check if the string length is > 0.
* Source/NSToolbarItem.m (-label): Return @"" instead of nil.
* Source/NSCell.m (-stringValue): Return @"" instead of nil
* Source/NSCell.m (-attributedStringValue): Don't return nil. Use
[self stringValue] instead of accessing _contents directly to guard against
_contents being nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33598 72102866-910b-0410-8b05-ffd578937521
2011-07-21 06:31:34 +00:00
Eric Wasylishen
d919131abb * Source/NSTextView.m (-view:stringForToolTip:point:userData:):
Ensure this returns an NSString, even if NSToolTipAttributeName
is set to something else (it calls -description on the value).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33597 72102866-910b-0410-8b05-ffd578937521
2011-07-21 04:56:02 +00:00
Eric Wasylishen
c1e194da9f * Source/GSGhostscriptImageRep.m: Search for gs by enumerating directories
in PATH rather than calling 'which'. Also search for gswin32c.exe for
Windows.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33587 72102866-910b-0410-8b05-ffd578937521
2011-07-19 21:51:25 +00:00
Eric Wasylishen
97e9d3bda8 * Source/NSImage.m: Implement
-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33571 72102866-910b-0410-8b05-ffd578937521
2011-07-16 02:09:06 +00:00
Eric Wasylishen
4e36d04d40 * Source/NSImage.m (-nativeDrawInRect:...): Fix two bugs
demonstrated in GSTest:
- drawing an image in a flipped view with -drawInRect:... wasn't
  working, and
- drawing a vector rep in a dest rect larger than the point
  size of the rep was resulting in blurry output.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33570 72102866-910b-0410-8b05-ffd578937521
2011-07-16 01:23:40 +00:00
Eric Wasylishen
7ace2baf52 * configure.ac:
* configure: Fix the ICU test so the library search path and
flags are added to GRAPHIC_LFLAGS; this fixes the build on
Windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33568 72102866-910b-0410-8b05-ffd578937521
2011-07-15 22:58:28 +00:00
Eric Wasylishen
390b3290f3 * Source/NSColorPanel.m: Remove code for generating a dynamic
magnifying glass cursor; it flickers on X11.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33565 72102866-910b-0410-8b05-ffd578937521
2011-07-15 19:55:38 +00:00
Richard Frith-MacDonald
4e44c1f5b2 remove obsolete include
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33561 72102866-910b-0410-8b05-ffd578937521
2011-07-15 13:51:22 +00:00
Eric Wasylishen
bfb415ee79 * Source/NSOutlineView.m: Allow collapsing or expanding multiple
rows at a time using the arrow keys


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33552 72102866-910b-0410-8b05-ffd578937521
2011-07-15 05:39:10 +00:00
Fred Kiefer
86ff6abf69 Replace direct use of the isa pointer with a call to object_getClass()
to make David happy.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33545 72102866-910b-0410-8b05-ffd578937521
2011-07-14 07:17:24 +00:00
Eric Wasylishen
3958406375 * Source/NSColorPanel.m: Make a magnifying glass cursor when using
the magnifying glass color picker. back/x11 isn't displaying
the cursor at the moment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33543 72102866-910b-0410-8b05-ffd578937521
2011-07-13 23:10:51 +00:00
Germán Arias
a8c841bd33 Character Panel in Spanish
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33542 72102866-910b-0410-8b05-ffd578937521
2011-07-13 18:51:59 +00:00
Eric Wasylishen
bef9ca8b85 * Source/GSImageMagickImageRep.m: Don't call DestroyImage on a
NULL image


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33541 72102866-910b-0410-8b05-ffd578937521
2011-07-13 03:34:38 +00:00
Eric Wasylishen
237476cb79 * Source/GSImageMagickImageRep.m: Log warnings from ImageMagick
instead of giving up.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33540 72102866-910b-0410-8b05-ffd578937521
2011-07-13 02:46:12 +00:00
Eric Wasylishen
22bfbcc946 * Source/GSGuiPrivate.h: New rounding rounding function
GSRoundTowardsInfinity which is simply floor(x+0.5)
* Source/NSBrowser.m:
* Source/NSSliderCell.m:
* Source/NSButtonCell.m:
* Source/NSClipView.m:
* Source/NSOutlineView.m:
* Source/NSRulerView.m:
Switch rint[f] to GSRoundTowardsInfinity


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33539 72102866-910b-0410-8b05-ffd578937521
2011-07-12 21:12:22 +00:00
Eric Wasylishen
0024ee69e2 * Source/GSGhostscriptImageRep.m: Only invoke 'which' once.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33529 72102866-910b-0410-8b05-ffd578937521
2011-07-11 18:46:05 +00:00
Eric Wasylishen
31f3fffb8f * Source/GSGhostscriptImageRep.m: Change to NSLog, only log
a warning the first time invoking ghostscript throws an exception,
and log a message if it returns a nonzero exit status.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33527 72102866-910b-0410-8b05-ffd578937521
2011-07-11 18:16:45 +00:00
Eric Wasylishen
f13998e491 * Source/GSGhostscriptImageRep.m: Add NSWarnLog to execption
handlers to print a message when finding or invoking Ghostscript
fails.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33524 72102866-910b-0410-8b05-ffd578937521
2011-07-11 16:09:35 +00:00
Fred Kiefer
f13ac2cd84 * Source/NSImage.m (-nativeDrawInRect:...): Compute the rep size
after the nil test.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33513 72102866-910b-0410-8b05-ffd578937521
2011-07-11 09:41:47 +00:00
Fred Kiefer
727e1993f0 Unbind key bindings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33511 72102866-910b-0410-8b05-ffd578937521
2011-07-11 08:40:31 +00:00