Commit graph

58 commits

Author SHA1 Message Date
Gregory John Casamento
26e2eb86ea * Source/GSLayoutManager.m: do not return (0,0) when a zero length
range is passed into glyphRangeForCharacterRange:
	actualCharacterRange:.  Tests on Mac OS X indicate that this is
	a valid case.
	* Source/GSNibLoading.m: Fixed some memory leaks.
	* Source/NSRulerMarker.m: Use the bounds of the containing view 
	instead of markersRect.   I will revisit if the _markersRect method
	needs to be corrected, but this code seems to correct problems 
	observed when dragging markers in and out of the rulerView.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27986 72102866-910b-0410-8b05-ffd578937521
2009-02-26 05:42:09 +00:00
Fred Kiefer
ae4c7503ac Add some 10.5 methods for NSLayoutManager
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27480 72102866-910b-0410-8b05-ffd578937521
2008-12-31 16:29:44 +00:00
Richard Frith-MacDonald
bacf599365 Fix uninitialised variable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27177 72102866-910b-0410-8b05-ffd578937521
2008-11-30 14:06:15 +00:00
Fred Kiefer
11bede28df Protect all access to the glyph arrays.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26773 72102866-910b-0410-8b05-ffd578937521
2008-07-12 23:00:37 +00:00
Fred Kiefer
1f1fb3c153 Add some more protection against inconsistent state.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26771 72102866-910b-0410-8b05-ffd578937521
2008-07-12 21:10:08 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Gregory John Casamento
016798f3cb Correct a crash on 64 bit systems.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26528 72102866-910b-0410-8b05-ffd578937521
2008-05-15 01:56:58 +00:00
Fred Kiefer
f59bbe5aa8 Extract glyph generation code into separate class.
Plus some additional cleanup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26523 72102866-910b-0410-8b05-ffd578937521
2008-05-13 19:40:20 +00:00
Fred Kiefer
14176f6a78 New NSFont method for glyph generation.
Ligature and decompose handling in gsLayoutManager, moved here from the
art backend.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26430 72102866-910b-0410-8b05-ffd578937521
2008-04-04 22:01:44 +00:00
Fred Kiefer
3dc7f6d74c Set the text container to max size, when the text view is resizable.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25863 72102866-910b-0410-8b05-ffd578937521
2008-01-04 21:02:29 +00:00
Richard Frith-MacDonald
03a4a96a40 Update includes ... closer MacOS-X compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25635 72102866-910b-0410-8b05-ffd578937521
2007-11-29 20:28:03 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
4835a35c1c Add new MacOSX methods. Code mostly by Nikolaus Schaller.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25270 72102866-910b-0410-8b05-ffd578937521
2007-06-18 21:08:54 +00:00
Matt Rice
ba8d729b8a * Source/NSTextView_actions.m:
* Source/NSOpenPanel.m:
        * Source/GSLayoutManager.m:
        * Source/NSLayoutManager.m:
        * Source/NSSavePanel.m:
        * Source/NSTextView.m:
        * Source/NSStringDrawing.m:
        * Headers/Additions/GNUstepGUI/GSLayoutManager_internal.h:
        * Headers/AppKit/NSTextView.h: Remove underscores from category names
        as they can confuse the debugger.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24032 72102866-910b-0410-8b05-ffd578937521
2006-11-06 10:19:20 +00:00
Richard Frith-MacDonald
65b175b904 Tweaks to avoid new compiler warnings with gcc-4.1 and some 64bit issues.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23126 72102866-910b-0410-8b05-ffd578937521
2006-07-04 21:31:49 +00:00
Richard Frith-Macdonald
7971a89c72 Coding style fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22019 72102866-910b-0410-8b05-ffd578937521
2005-11-16 11:34:25 +00:00
Adam Fedor
303dd1baf9 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
Alexander Malmberg
ad2419e484 2005-01-21 21:43 Alexander Malmberg <alexander@malmberg.org>
Various whitespace cleanups, comment type fixes, and changes
	to avoid warnings from recent versions of gcc.

	* Headers/Additions/GNUstepGUI/GSToolbar.h (-_toolbars): Declare.
	* Source/NSWindow+Toolbar.m: Remove conflicting declaration of
	[NSToolbar -_toolbars].

	* Headers/Additions/GNUstepGUI/GSServicesManager.h,
 	Source/GSServicesMananger.m (-item2title:, -validateMenuItem:):
	Adjust argument types.
	* Headers/AppKit/NSMenu.h (-validateMenuItem:): Adjust argument
	type.

	* Source/NSTextView.m (-sizeToFit): Don't use size uninitialized
	if neither resizable flags is set.
	(-insertText:): Adjust argument type.
	* Headers/AppKit/NSResponder.h, Source/NSResponder.m (-insertText:):
	Adjust argument type. Document.

	* Headers/AppKit/NSView.h: Change type of ivar _window to NSWindow *.

	* Source/GSTitleView.m (-mouseDown:): Always initialize
	startWindowOrigin.
	* Source/NSApplication.m (-setApplicationIconImage:): Add casts
	to avoid warnings.
	* Source/NSCell.m (-cellSize): Add default: case.
	* Source/NSPasteboard.m
	([GSFiltered -pasteboard:provideDataForType:]): Detect and warn if we
	can't find a filter that will get us the desired type.
	* Source/NSProgressIndicator.m: Comment out unused variable 'images'.
	* Source/NSBezierPath.m: Declare GSBezierPath fully before using it.
	(-bezierPathByFlatteningPath, -bezierPathByReversingPath): Make sure
	variables are always initialized.

	* Source/NSMenuView.m,
	* Source/NSPrintOperation.m,
	* Source/NSSplitView.m,
	* Source/NSTableHeaderView.m: Make sure variables are always
	initialized.

	* Source/NSBox.m,
	* Source/NSImageview.m,
	* Source/NSText.m,
	* Source/NSTextStorage.m: Add missing includes.

	* Source/GSKeyBindingTable.m,
	* Source/GSLayoutManager.m,
	* Source/NSBitmapImageRep+PNM.m,
	* Source/NSBundleAdditions.m,
	* Source/NSLayoutManager.m,
	* Source/nsimage-tiff.h,
	* Source/tiff.m,
	* Headers/Additions/GNUstepGUI/GSDisplayServer.h,
	* Source/GSDisplayServer.m: Change signedness of various variables.

	* Source/NSPanel.m (-sendEvent:): Remove.
	* Source/NSWindow.m (-becomesKeyOnlyIfNeeded): New method.
	(-_sendEvent:becomesKeyOnlyIfNeeded:): Remove. Move code ...
	(-sendEvent:): ... here. Use -becomesKeyOnlyIfNeeded instead
	of the argument.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20590 72102866-910b-0410-8b05-ffd578937521
2005-01-21 20:39:18 +00:00
Alexander Malmberg
36f5227473 Fix calculation of used rect.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19861 72102866-910b-0410-8b05-ffd578937521
2004-08-10 00:08:42 +00:00
Alexander Malmberg
77a10cb02f Optimize -usedRectForTextContainer:.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19857 72102866-910b-0410-8b05-ffd578937521
2004-08-09 19:50:01 +00:00
Alexander Malmberg
bc3d8f4913 Optimize -usedRectForTextContainer:.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19856 72102866-910b-0410-8b05-ffd578937521
2004-08-09 19:49:24 +00:00
Alexander Malmberg
cfe33cfa9e (-_generateGlyphsForRun:at:): Use a properly typed function pointer for characterIsMember.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19290 72102866-910b-0410-8b05-ffd578937521
2004-05-12 13:55:46 +00:00
Fred Kiefer
3480b30e56 Added missing method [isValidGlyphIndex:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17749 72102866-910b-0410-8b05-ffd578937521
2003-09-29 21:25:46 +00:00
David Ayers
b18f1c4ac4 Header reorganization - Please refer to ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17408 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:52:10 +00:00
Fred Kiefer
7caced9d58 (_glyphDumpRuns,
helpers::generateRunsToCharacter:,
helpers::generateGlyphsUpToCharacter:,
helpers::generateGlyphsUpToGlyph:,
helpers::glyphForCharacter:index:positions::, getGlyphs:range:,
characterRangeForGlyphRange:actualGlyphRange:,
glyphRangeForCharacterRange:actualCharacterRange:,
invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:,
insertTextContainer:atIndex:):
Removed compiler warning about signed/unsigned comparision.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17041 72102866-910b-0410-8b05-ffd578937521
2003-06-26 23:25:34 +00:00
Adam Fedor
6be9174933 Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Alexander Malmberg
8a2e943bbd Detect and handle gaps in the soft invalidated layout information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16639 72102866-910b-0410-8b05-ffd578937521
2003-05-05 20:52:24 +00:00
Alexander Malmberg
bbdf75548a Fix updating of glyph counts in some rare cases. Minor cleanups.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16408 72102866-910b-0410-8b05-ffd578937521
2003-04-10 00:08:26 +00:00
Alexander Malmberg
c6beeb60ec Make sure the text storage doesn't have unprocessed editing when using it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16378 72102866-910b-0410-8b05-ffd578937521
2003-04-06 13:12:34 +00:00
Alexander Malmberg
74704f51e3 When steping forward at the end of the glyph runs, correctly handle the case where the current run is extended.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16345 72102866-910b-0410-8b05-ffd578937521
2003-04-03 18:31:25 +00:00
Alexander Malmberg
df47a8fe60 (-usedRectForTextContainer:): Don't add the extra line frag rect.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16118 72102866-910b-0410-8b05-ffd578937521
2003-03-03 18:32:55 +00:00
Alexander Malmberg
7c79dae556 Add and implement -typesetter and -setTypesetter:.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16115 72102866-910b-0410-8b05-ffd578937521
2003-03-03 13:57:53 +00:00
Alexander Malmberg
b48bf809c7 (-_generateRunsToCharacter:): Optimize the run structure by merging with an existing run instead of creating a new run under some circumstances.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16074 72102866-910b-0410-8b05-ffd578937521
2003-02-25 23:55:03 +00:00
Alexander Malmberg
466d7f8af7 Set the next character index correctly after the run-merge optimization.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16064 72102866-910b-0410-8b05-ffd578937521
2003-02-24 14:26:22 +00:00
Alexander Malmberg
4c0d68496c Fix handling of the case where the exact glyph is found during the binary search.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16060 72102866-910b-0410-8b05-ffd578937521
2003-02-24 02:53:20 +00:00
Alexander Malmberg
735e3bed5e Don't track the started status for a text container separately. Use num_linefrags instead.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16048 72102866-910b-0410-8b05-ffd578937521
2003-02-23 01:01:13 +00:00
Alexander Malmberg
85c5580808 Optimizations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16010 72102866-910b-0410-8b05-ffd578937521
2003-02-19 14:12:16 +00:00
Alexander Malmberg
6f8966e716 Optimize.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16007 72102866-910b-0410-8b05-ffd578937521
2003-02-19 02:18:41 +00:00
Alexander Malmberg
5faf6f6f1e Optimize reuse of soft-invalidated layout a bit in a common case.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16006 72102866-910b-0410-8b05-ffd578937521
2003-02-18 23:34:51 +00:00
Alexander Malmberg
30e76ace40 Correct the condition for splitting the initial run.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16005 72102866-910b-0410-8b05-ffd578937521
2003-02-18 23:16:29 +00:00
Alexander Malmberg
5f2fd0477a Add basic interface that lets the typesetter access soft-invalidated layout information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16003 72102866-910b-0410-8b05-ffd578937521
2003-02-18 20:26:49 +00:00
Alexander Malmberg
0383d08f23 Implement handling of soft-invalidated line frags. Soft-invalidate layout information for glyphs after an edited range in NSLayoutManager.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15997 72102866-910b-0410-8b05-ffd578937521
2003-02-18 17:15:25 +00:00
Alexander Malmberg
7435220c32 Many minor cleanups and optimizations. Much commenting.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15991 72102866-910b-0410-8b05-ffd578937521
2003-02-18 00:35:13 +00:00
Alexander Malmberg
bdc3373174 Clean up layout invalidation. Set the prev pointer correctly when splitting a run during glyph invalidation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15990 72102866-910b-0410-8b05-ffd578937521
2003-02-17 20:30:26 +00:00
Alexander Malmberg
1ba6d8c940 Add some framework support for caching the last accessed run.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15980 72102866-910b-0410-8b05-ffd578937521
2003-02-17 01:19:34 +00:00
Alexander Malmberg
4dc81ab769 Implement extra line fragment handling.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15968 72102866-910b-0410-8b05-ffd578937521
2003-02-16 03:18:35 +00:00
Alexander Malmberg
87a4e8d28d Many minor bug and behavior fixes to get the text system to work with several text containers attached to one layout manager.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15924 72102866-910b-0410-8b05-ffd578937521
2003-02-10 14:14:34 +00:00
Alexander Malmberg
f9fea1156d Cleanups of old debugging code, whitespace, and error handling. Fix handling of non-nominally spaced glyphs in some cases.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15918 72102866-910b-0410-8b05-ffd578937521
2003-02-09 20:13:16 +00:00
Alexander Malmberg
5d2f6b4f2f Add -_didInvalidateLayout method that is called whenever any layout information has been invalidated. Use it in NSLayoutManager to resize text views.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15915 72102866-910b-0410-8b05-ffd578937521
2003-02-09 17:05:18 +00:00
Richard Frith-Macdonald
e87e07ecbb Portability fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15892 72102866-910b-0410-8b05-ffd578937521
2003-02-05 15:44:07 +00:00