Commit graph

165 commits

Author SHA1 Message Date
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
Matt Rice
4f18a708bf * Source/NSTextView.m (setSelectedRange:): Do not make the selected text visible.
(-didChangeText,-checkSpelling:): Make the selected text visible.
* Source/NSTextView_actions.m (_moveTo:select:): Ditto.
* Source/NSCell.m (-setUpFieldEditorAttributes:): Ditto.
(-selectWithFrame:inView:editor:delegate:start:length:): Ditto.
* Source/NSComboBoxCell (-validateSelection:,-textDidChange:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20575 72102866-910b-0410-8b05-ffd578937521
2005-01-18 13:18:29 +00:00
Alexander Malmberg
ee70d6ab43 2004-11-11 15:08 Alexander Malmberg <alexander@malmberg.org>
* Source/NSCell.m (-_setupTextWithFrame:inView:editor:): Reduce the
	maximum size. Explicitly set the size of the text view, and make it
	not resizable.
	* Source/NSLayoutManager.m (-rectArrayForGlyphRange:
	withinSelectedGlyphRange:inTextContainer:rectCount:): Fix check for
	whether the starting index is inside a line frag rect.
	* Source/NSTextView.m (-sizeToFit): Don't increase the size if we
	have no inset.
	(-updateInsertionPointStateAndRestartTimer:): Force the insertion
	point rect to be inside the text view.
	(-scrollRangeToVisible:): If we are a non-rich-text field editor,
	adjust the scrolling to make the auto-scrolling more useful.

	Fixes bug #9279.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20340 72102866-910b-0410-8b05-ffd578937521
2004-11-11 14:10:08 +00:00
Gregory John Casamento
208c87b881 Improvements in keyed coding and correction for NSCell formatter unarchiving issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20235 72102866-910b-0410-8b05-ffd578937521
2004-10-18 01:48:15 +00:00
Alexander Malmberg
dd69ef973d Adjust handling of selected range changes in response to text changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19866 72102866-910b-0410-8b05-ffd578937521
2004-08-11 23:46:37 +00:00
Alexander Malmberg
d4818d3966 (-mouseDown:): Don't call -containsAttachments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19834 72102866-910b-0410-8b05-ffd578937521
2004-08-07 11:22:26 +00:00
Gregory John Casamento
57596f2aa3 Minor correction to previous update.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19621 72102866-910b-0410-8b05-ffd578937521
2004-06-26 01:40:26 +00:00
Gregory John Casamento
822370a34a Added warning in GSNibCompatibility for ancient gorm files, refomatted some code in NSDataLinkPanel and added drag service init code to initWithCoder in NSTextView.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19620 72102866-910b-0410-8b05-ffd578937521
2004-06-26 00:53:01 +00:00
Alexander Malmberg
e609ec5cb0 Fix automatic scrolling when the selection changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18958 72102866-910b-0410-8b05-ffd578937521
2004-03-29 16:28:28 +00:00
Fred Kiefer
17e9214321 Some more (empty) Cocoa methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18751 72102866-910b-0410-8b05-ffd578937521
2004-03-02 22:20:36 +00:00
Alexander Malmberg
4a1b359b79 Make sure oldRange is always initialized.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18295 72102866-910b-0410-8b05-ffd578937521
2003-12-30 23:40:17 +00:00
Alexander Malmberg
5e0dc13462 (-readSelectionFromPasteboard:type:, NSTIFFPboardType): Send -setFileWrapper: to the attachment after setting the wrapper's icon.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18259 72102866-910b-0410-8b05-ffd578937521
2003-12-23 17:13:39 +00:00
Alexander Malmberg
862a3578ff Tweak size calculation so that the insertion point doesn't disappear at the end of field editors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18101 72102866-910b-0410-8b05-ffd578937521
2003-11-21 23:37:16 +00:00
Alexander Malmberg
7f4b949153 (-mouseDown:): When the mouse is outside the view, autoscroll smoothly using periodic events.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18093 72102866-910b-0410-8b05-ffd578937521
2003-11-19 02:21:36 +00:00
Alexander Malmberg
310ac897be Handle NSTiffPboardType. Based on patch from Nicolas Roard.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17693 72102866-910b-0410-8b05-ffd578937521
2003-09-21 13:18:35 +00:00
Alexander Malmberg
0ab3be5eb5 Don't do initialization that requires the shared application object/backend too early (ie. move it from +initialize to other methods). Add some asserts to try to catch these errors in the future.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17503 72102866-910b-0410-8b05-ffd578937521
2003-08-20 12:43:52 +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
Alexander Malmberg
3e87f17811 Call the new methods from suitable places.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17206 72102866-910b-0410-8b05-ffd578937521
2003-07-12 18:04:25 +00:00
Alexander Malmberg
bfcaa8b453 Add -_updateInputMethodState and -_updateInputMethodWithInsertionPoint: methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17205 72102866-910b-0410-8b05-ffd578937521
2003-07-12 16:40:16 +00:00
Alexander Malmberg
7d44f67c49 Adjust 'really large' sizes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17186 72102866-910b-0410-8b05-ffd578937521
2003-07-11 01:38:39 +00:00
Fred Kiefer
26c82d8aef Removed compiler warning about signed/unsigned comparision.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17005 72102866-910b-0410-8b05-ffd578937521
2003-06-23 15:50:46 +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
ecb096136a (-drawRect:): Draw background correctly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16597 72102866-910b-0410-8b05-ffd578937521
2003-05-01 18:06:32 +00:00
Adam Fedor
0de7e778fe Updates for filesystem change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16566 72102866-910b-0410-8b05-ffd578937521
2003-04-28 02:33:10 +00:00
Alexander Malmberg
15ab06811c (-mouseDown:): Rewrite the mouse tracking loop.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16391 72102866-910b-0410-8b05-ffd578937521
2003-04-08 13:36:15 +00:00
Alexander Malmberg
408b16ce51 Misc. cleanups. (-dealloc): Remove the delegate from the notification center for the notifications we added it for.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16346 72102866-910b-0410-8b05-ffd578937521
2003-04-04 00:51:34 +00:00
Alexander Malmberg
81c57842ad Correct the name of a delegate method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16296 72102866-910b-0410-8b05-ffd578937521
2003-03-30 17:24:30 +00:00
Alexander Malmberg
368c851e38 (-sizeToFit): Add the extra line frag rect. (-scrollRangeToVisible:): Reimplement using the new insertion point positioning methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16120 72102866-910b-0410-8b05-ffd578937521
2003-03-03 18:36:07 +00:00
Alexander Malmberg
e4329b4ff9 (-sizeToFit): Add the extra line frag rect. (-scrollRangeToVisible:): Reimplement using the new insertion point positioning methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16119 72102866-910b-0410-8b05-ffd578937521
2003-03-03 18:33:46 +00:00
Alexander Malmberg
6027271a4f Change the way the text view is told about layout invalidation. Change NSTextView to update its state as late as possible before displaying, and make sure it's updated when it's resized.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15967 72102866-910b-0410-8b05-ffd578937521
2003-02-15 17:30:52 +00:00
Alexander Malmberg
85ff161e72 Keep track of the original index of a sequence of moves in one dimension. Pass it to the layout manager when moving the insertion point to prevent drifting.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15956 72102866-910b-0410-8b05-ffd578937521
2003-02-14 16:58:59 +00:00
Alexander Malmberg
05d3343c45 (-setSelectedRange:affinity:stillSelecting:): Clamp the selected range to the text storage's length.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15937 72102866-910b-0410-8b05-ffd578937521
2003-02-11 15:40:21 +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
39744f3b2f Rewrite insertion point movement actions properly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15904 72102866-910b-0410-8b05-ffd578937521
2003-02-08 16:55:51 +00:00
Alexander Malmberg
20ab4fa2df Add -insertionPointRectForCharacterIndex:inTextContainer: method to NSLayoutManager and use it in NSTextView.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15863 72102866-910b-0410-8b05-ffd578937521
2003-02-03 01:52:27 +00:00
Alexander Malmberg
94ecd621eb Clarify comments about user attribute changing now that I've figured out a way for it to work. Rewrite the actions to match.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15852 72102866-910b-0410-8b05-ffd578937521
2003-02-02 01:37:27 +00:00
Alexander Malmberg
6f524e43b8 (-shouldChangeTextInRange:replacementString:, -didChangeText): Allow changes even if we're not the first responder, but end the editing session right away.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15844 72102866-910b-0410-8b05-ffd578937521
2003-02-01 14:14:53 +00:00
Alexander Malmberg
58fb330d35 Guard against a nil _layoutManager in a few places.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15761 72102866-910b-0410-8b05-ffd578937521
2003-01-29 20:19:20 +00:00
Alexander Malmberg
c90372a21a Remove debugging code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15757 72102866-910b-0410-8b05-ffd578937521
2003-01-29 00:43:43 +00:00
Alexander Malmberg
6546c340e8 Implement basic drawing of insertion point.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15756 72102866-910b-0410-8b05-ffd578937521
2003-01-29 00:42:29 +00:00
Alexander Malmberg
e9ebe98664 (-setConstrainedFrameSize:):Fix calculation of effective minimum size. (-sizeToFit): Use maximum x and y of used rect to calculate size, not used rect's own size.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15753 72102866-910b-0410-8b05-ffd578937521
2003-01-28 22:32:18 +00:00
Alexander Malmberg
eaec5ebcea (-initWithFrame:textContainer:): Make the default text container inset (2,0).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15751 72102866-910b-0410-8b05-ffd578937521
2003-01-28 21:23:51 +00:00
Alexander Malmberg
314e298be1 Avoid making calls to the layout manager with invalid arguments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15748 72102866-910b-0410-8b05-ffd578937521
2003-01-28 17:00:28 +00:00
Alexander Malmberg
31c38c8183 (-mouseDown:): Handle empty text views. (-drawRect:): Always draw glyphs' backgrounds.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15740 72102866-910b-0410-8b05-ffd578937521
2003-01-27 15:19:15 +00:00
Alexander Malmberg
5b78652c15 Make sure the typing attributes are always a mutable dictionary that we can modify.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15724 72102866-910b-0410-8b05-ffd578937521
2003-01-26 19:42:03 +00:00
Alexander Malmberg
66c63d5580 Make sure the typing attributes are always a mutable dictionary that we can modify.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15722 72102866-910b-0410-8b05-ffd578937521
2003-01-26 19:36:57 +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
Fred Kiefer
f10e76e245 Changed all the internal methods ([replaceCharacterRange:withString:],
[setFont:range:], [setTextColor:range:], [setalignment:range:],
[replaceRange:withAttributedString:], [setAtrributes:range:]) not
to call [shouldChangeTextInRange:replacementString:], so that they
can be called for a non editable text view.
Added this call to the methods: [insertText:], [transpose:],
[changeColor:], [alignCenter:], [alignLeft:], [alignRight:],
[alignJustified:], [readSelectionFromPasteboard:type:].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15546 72102866-910b-0410-8b05-ffd578937521
2003-01-08 16:35:28 +00:00
Nicola Pero
9cdaef32c7 Renamed setFont:ofRange: to setFont:range:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15333 72102866-910b-0410-8b05-ffd578937521
2002-12-25 16:58:28 +00:00
Adam Fedor
e43ebddc33 Remove comment of set editable, not ready to make this yet.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14908 72102866-910b-0410-8b05-ffd578937521
2002-11-02 23:20:58 +00:00