Commit graph

109 commits

Author SHA1 Message Date
Fred Kiefer
7ef53c8232 More CGFloat, NSUInteger and NSInteger changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36153 72102866-910b-0410-8b05-ffd578937521
2013-02-16 21:37:29 +00:00
Fred Kiefer
2d01942e4b Replace #include -> #import
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32451 72102866-910b-0410-8b05-ffd578937521
2011-03-04 11:33:22 +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
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
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
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
9407b0bfca Merge in text-system-branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15718 72102866-910b-0410-8b05-ffd578937521
2003-01-26 19:21:40 +00:00
Nicola Pero
0657472147 Added -setFont:range:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15332 72102866-910b-0410-8b05-ffd578937521
2002-12-25 16:58:02 +00:00
Alexander Malmberg
61b91e6b57 Handle becomesKeyOnlyIfNeeded in NSPanel properly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14508 72102866-910b-0410-8b05-ffd578937521
2002-09-21 23:33:37 +00:00
Pierre-Yves Rivaille
46630bd6de * Source/NSText.m ([NSText -initWithCoder:]):
Retain the decoded background color.

	* Source/NSTextView.m :
	multiple location: don't ignore textContainer's inset
	([NSTextView -initWithCoder:])
	([NSTextView -encodeWithCoder:])
	Encode caret color, textContainer's size and whether the
	textContainer has widthTracksTextView or heightTracksTextView set.
	([NSTextView -sizeToFit]) Change width (height) only if
	is_horizontally_resizable (is_vertically_resizable).
	([NSTextView -scrollRangeToVisible:]) scrolls to the first char of
	the range.
	([NSTextView -invalidateTextContainerOrigin]): Don't ignore inset,
	set the origin so that the justification is preserved even if the
	textContainer's width is larger that the textview's width.
	([NSTextView -updateInsertionPointStateAndRestartTimer:]):
	update and place the insertion point properly.
	([NSTextView -moveDown:]) & ([NSTextView -moveUp:]):
	Don't ignore inset. Make insertion point visible.

	* Source/NSTextField.m ([NSTextField -acceptsFirstResponder:]):
	responds NO if the editing is still in progrss.

	* Source/NSLayoutManager.m
	([NSLayoutManager -drawBackgroundForGlyphRange:atPoint:]):
	Don't ignore textContainer's inset.

	* Source/GSSimpleLayoutManager.m
	Replaced [-drawLinesInLineRange:] with [-drawLinesInLineRange:atPoint:].
	Replaced [-drawSelectionAsRangeNoCaret:] with
	[-drawSelectionAsRangeNoCaret:atPoint:].
	Those replacements make it easier to take inset into account.
	([-lineFragmentUsedRectForGlyphAtIndex:effectiveRange:])
	([-locationForGlyphAtIndex:])
	([-boundingRectForGlyphRange:inTextContainer:])
	([-rectForCharacterIndex:])
	([-setNeedsDisplayForLineRange:inTextContainer:]):
	Various fixes.
	([-textStorage:edited:range:changeInLength:invalidatedRange:])
	Update insertion point if needed (useful when alignment changes).
	([-rebuildForRange:delta:inTextContainer:]):
	Update layout mechanism.

	* Source/NSCell.m
	([NSCell -highlight:withFrame:inView:]):
	Ask the control to draw the background if we are not opaque.
	([NSCell -editWithFrame:inView:editor:delegate:event:]):
	([NSCell -selectWithFrame:inView:editor:delegate:start:length:]):
	([NSCell -endEditing:]):
	instantiate (and remove) the textview so that it can be scrolled.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14429 72102866-910b-0410-8b05-ffd578937521
2002-09-11 20:26:27 +00:00
Nicola Pero
be371e47d7 Added missing #includes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13442 72102866-910b-0410-8b05-ffd578937521
2002-04-11 23:17:42 +00:00
Adam Fedor
228bb345cf Update docs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13335 72102866-910b-0410-8b05-ffd578937521
2002-04-03 16:59:43 +00:00
Nicola Pero
b175821fd1 Added missing #include
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13307 72102866-910b-0410-8b05-ffd578937521
2002-04-02 11:34:24 +00:00
Adam Fedor
4b54ab9f06 New AppKit events. Updates for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12217 72102866-910b-0410-8b05-ffd578937521
2002-01-26 04:14:38 +00:00
Adam Fedor
d47e202fbe Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Nicola Pero
5df2192c99 Update the enclosing scrollview background color and drawsBackground flag
in response to change in ours; mark us as needing redisplay in such events


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11632 72102866-910b-0410-8b05-ffd578937521
2001-12-05 13:02:51 +00:00
Nicola Pero
6455046227 Merged NSText code into NSTextView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8383 72102866-910b-0410-8b05-ffd578937521
2000-12-20 17:00:32 +00:00
Nicola Pero
6ab26e6943 Removed most delegate code now handled by NSTextView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8381 72102866-910b-0410-8b05-ffd578937521
2000-12-20 12:50:37 +00:00
Nicola Pero
de8df1c4f5 Moved some methods to NSTextView; removed some old methods; tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8378 72102866-910b-0410-8b05-ffd578937521
2000-12-19 22:37:28 +00:00
Nicola Pero
b867efaa01 Moved the string method to NSTextView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8372 72102866-910b-0410-8b05-ffd578937521
2000-12-19 18:45:52 +00:00
Nicola Pero
a8b3637202 Removed code which belongs to NSTextView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8365 72102866-910b-0410-8b05-ffd578937521
2000-12-19 15:33:34 +00:00
Nicola Pero
c77827b381 Made NSText an abstract class always allocating an instance of the
concrete subclass NSTextView


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8359 72102866-910b-0410-8b05-ffd578937521
2000-12-18 22:06:53 +00:00
Nicola Pero
1bfc14cd38 Implemented double owning policy for the text network (ie, allocation
deallocation stuff)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8340 72102866-910b-0410-8b05-ffd578937521
2000-12-16 20:21:47 +00:00
Nicola Pero
6284321acb Fixed memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8320 72102866-910b-0410-8b05-ffd578937521
2000-12-13 23:19:17 +00:00
Fred Kiefer
c29b53732f In [setVerticallyResizable:] and [setHorizontallyResizable:] set the size of the text conatainer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8062 72102866-910b-0410-8b05-ffd578937521
2000-11-06 22:12:29 +00:00
Fred Kiefer
e80400478a Moved all sizeToFit calls after text changes to
the layout manager.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8039 72102866-910b-0410-8b05-ffd578937521
2000-11-05 16:31:20 +00:00
Fred Kiefer
1cfbd9caf3 Set the TextConatainer to track its view
again. But switch this of if the view is scrollable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7997 72102866-910b-0410-8b05-ffd578937521
2000-11-03 00:22:15 +00:00
Fred Kiefer
cf2cd53ca5 [buildUpTextNetwork:] The text container no
longer tracks its view by default.
[initWithFrame:textContainer:] the view is no longer resizable by default.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7895 72102866-910b-0410-8b05-ffd578937521
2000-10-23 23:25:46 +00:00
Fred Kiefer
b97acdeb63 Use NSLayoutManager instead of GSSimpleLayoutManager.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7801 72102866-910b-0410-8b05-ffd578937521
2000-10-12 23:02:25 +00:00
Fred Kiefer
552dcf4a84 Moved the text container handling from NSTextView to here and
corrected it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7673 72102866-910b-0410-8b05-ffd578937521
2000-09-30 23:11:15 +00:00
Richard Frith-MacDonald
325a6086ac Tidy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7554 72102866-910b-0410-8b05-ffd578937521
2000-09-19 22:38:56 +00:00
Fred Kiefer
c834c9bc02 Removed GSSimpleLayoutManager code and use new interface to it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7544 72102866-910b-0410-8b05-ffd578937521
2000-09-18 23:33:30 +00:00
Mirko Viviani
05a9cab8f7 2000-09-13 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSBrowser.m ([NSBrowser -_performLoadOfColumn:]): fixed
	intercell space values.

	* Source/NSText.m ([NSText -keyDown:]): removed forward for illegal
	text field events.

	* Source/NSSavePanel.m ([NSSavePanel -controlTextDidEndEditing:]):
	implemented for text field movement.
	([NSSavePanel -_performReturn:]): new private method.
	([NSSavePanel -_initWithoutGModel]): set form cell action to
	_performReturn:

	* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]): call
	super.
	([NSOpenPanel -_selectCellName:]):,
	([NSOpenPanel -controlTextDidChange:]): enable okButton if there is
	text in the text field.
	([NSOpenPanel -ok:]): returns if nothing selected.

	* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): removed workaround.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7506 72102866-910b-0410-8b05-ffd578937521
2000-09-13 20:18:01 +00:00
Mirko Viviani
c4b7684011 2000-09-11 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSText.m ([NSText -moveLeft:sender]): deselect text that
	starts at the beginning of the line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7472 72102866-910b-0410-8b05-ffd578937521
2000-09-11 21:44:53 +00:00
Mirko Viviani
df00948e11 2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
	core dump due to NSConnection bug.

	* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
	key equivalent for null character events. Triggered return key for
	default button cell.
	([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
	([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
	([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
	([NSWindow -dealloc]): release _defaultButtonCell

	* Headers/AppKit/NSWindow.h: added ivar and flag.

	* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
	([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
	implemented keyboard navigation.
	([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
	branch selection if can't choose directories.
	([NSOpenPanel -_selectTextInColumn:]),
	([NSOpenPanel -_selectCellName:]): new private methods.
	([NSOpenPanel -filenames]): change for choose dirs.

	* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
	events to the next responder.

	* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
	([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
	([NSBrowser -keyDown:]): implemented keyboard navigation
	([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
	([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
	changed return value from NSNotFound to -1 to conforms to NSMatrix
	([NSBrowser -doClick:]): fix for new return values, added support for
	multiple and branch selection.
	([NSBrowser -setLastColumn:]): mark column titles need display
	([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.

	* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
	NSOnState if someone try to set NSMixedState in a two state cell.
	([NSCell -performClick:]): do not perform click if the cell is
	disabled.

	* Source/NSMatrix.m ([NSMatrix
	-_privateFrame:mode:numberOfRows:numberOfColumns:]),
	([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
	([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
	to -1 when no cells are selected
	([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
	_selectedColumn.
	([NSMatrix -getRow:column:ofCell:]): check for null values for row and
	column.
	([NSMatrix -selectCellAtRow:column:]): deselect the current selection
	only in NSRadioModeMatrix mode.
	([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
	and fix for this mode.

	* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
	text of the cell and enable okButton.
	([NSSavePanel -controlTextDidChange:]): implemented.
	([NSSavePanel -controlTextDidEndEditing:]): removed.
	([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
	symbolic links.
	([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
	performClick: of the _okButton. Set _okButton as default window button.
	Disable _okButton.
	([NSSavePanel -browser:selectCellWithString:inColumn:]),
	([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
	keyboard navigation.
	([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
	filename is valid.
	([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
	([NSSavePanel -_selectCellName:]): new private methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
Fred Kiefer
65a2f3b220 Changed varius places to make more consistent.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7445 72102866-910b-0410-8b05-ffd578937521
2000-09-08 00:07:42 +00:00
Fred Kiefer
a3333bd2e3 Changed system fonts of size 12 to 0. This will use Nicolas font
cache and keep font sizes consistent when changed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7347 72102866-910b-0410-8b05-ffd578937521
2000-09-02 17:16:26 +00:00
Nicola Pero
992c70653f Cached the default notification center everywhere
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7252 72102866-910b-0410-8b05-ffd578937521
2000-08-26 20:41:52 +00:00
Adam Fedor
f2a24a9a32 Selection fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7235 72102866-910b-0410-8b05-ffd578937521
2000-08-23 17:33:12 +00:00
Adam Fedor
8298410a10 Merge 0.6.6 branch into main.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7188 72102866-910b-0410-8b05-ffd578937521
2000-08-07 22:06:04 +00:00
Fred Kiefer
1147f043c7 Changed Font/Ruler pasting to use an Archiver
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6850 72102866-910b-0410-8b05-ffd578937521
2000-07-01 12:09:57 +00:00
Adam Fedor
136417828c Use GS_PASS_ARGUMENTS
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6844 72102866-910b-0410-8b05-ffd578937521
2000-06-29 14:25:07 +00:00
Fred Kiefer
d6afcbbcd6 Turn on NSFileContentsPboardType in [readablePasteboardTypes].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6814 72102866-910b-0410-8b05-ffd578937521
2000-06-26 22:23:11 +00:00
Fred Kiefer
b4bce295ca Changed the font and ruler pasting and removed some other FIXMEs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6807 72102866-910b-0410-8b05-ffd578937521
2000-06-26 19:55:01 +00:00
Nicola Pero
e581ca3d27 Corrected last patch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6732 72102866-910b-0410-8b05-ffd578937521
2000-06-19 17:13:06 +00:00
Nicola Pero
c62dc367cd Fixed crash when going past the end of the string
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6730 72102866-910b-0410-8b05-ffd578937521
2000-06-19 17:09:45 +00:00
Nicola Pero
ba6129c224 Don't scroll rect to visible if we are text fields.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6708 72102866-910b-0410-8b05-ffd578937521
2000-06-16 19:03:15 +00:00
Fred Kiefer
3a2b5d31e2 Made setAlignment:range: save against missing paragraph style
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6702 72102866-910b-0410-8b05-ffd578937521
2000-06-16 17:07:11 +00:00