Commit graph

168 commits

Author SHA1 Message Date
Fred Kiefer
0aa987bab9 Small keyed decoding improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20768 72102866-910b-0410-8b05-ffd578937521
2005-02-21 00:59:32 +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
f282f87e88 2005-01-18 16:53 Alexander Malmberg <alexander@malmberg.org>
* Source/NSCell.m (-setUpFieldEditorAttributes:): Clear the
	text object's string.
	* Source/NSControl.m (-setDoubleValue:, -setFloatValue:)
	(-setIntValue:, -setStringValue:, -setObjectValue:): If the receiver
	was being edited when the method was called, make it the first
	responder after changing the value.
	(-abortEditing): Don't clear the text object's string.
	* Source/NSMatrix.m (-abortEditing): Don't clear the text object's
	string.
	* Source/NSTableView.m (-abortEditing): Ditto.
	* Source/NSTextField.m (-abortEditing): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20580 72102866-910b-0410-8b05-ffd578937521
2005-01-18 15:48:34 +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
Quentin Mathe
9ffc576add Fixed NSButtonCell -image returns nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20308 72102866-910b-0410-8b05-ffd578937521
2004-11-07 20:59:16 +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
Fred Kiefer
08529677f0 Added some more keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20211 72102866-910b-0410-8b05-ffd578937521
2004-10-08 21:24:25 +00:00
Fred Kiefer
a52e330d25 Added some more keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20116 72102866-910b-0410-8b05-ffd578937521
2004-09-23 23:12:54 +00:00
Alexander Malmberg
811ae4cf9f * Source/GSFontInfo.m (-defaultLineHeightForFont): Adjust line
height calculation.
	* Source/NSButtonCell.m (-drawInteriorWithFrame:inView:): Always
	initialize imageRect and titleRect. Adjust the calculations to match
	the new line height.
	(-cellSize): Always initialize imageRect and titleRect.
	* Headers/AppKit/NSCell.h (-_drawImage:inFrame:isFlipped:): Remove.
	* Source/NSCell.m (-_drawImage:inFrame:isFlipped:): Remove. Move code
	back ...
	(-drawInteriorWithFrame:inView:): ... here.
	* Source/NSToolbarItem.m (+initialize): Remove.
	(+cellClass): Add.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20100 72102866-910b-0410-8b05-ffd578937521
2004-09-21 16:55:43 +00:00
Fred Kiefer
a15214f38d Readded NSCell setType: patch with originally missing bit for NSButtonCell.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20072 72102866-910b-0410-8b05-ffd578937521
2004-09-16 13:44:00 +00:00
Matt Rice
afaa68f9d5 2004-09-12 Matt Rice <ratmice@yahoo.com>
* Headers/AppKit/NSCell.h (-_sendsActionOn:): New method.
        * Source/NSCell.m (-_sendsActionOn:): Implement it.
        * Source/NSTextFieldCell.m (-initTextCell:): Change _action_mask to a
        key press.
        * Source/NSTableView.m (-mouseDown:): Use _sendsActionOn: to only modify        the object value and send the event to the cell if the cell works on
        mouse events. (Fixes #9609).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20046 72102866-910b-0410-8b05-ffd578937521
2004-09-12 16:58:32 +00:00
Gregory John Casamento
05af0a68bc Corrected an issue and more work on data link.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20044 72102866-910b-0410-8b05-ffd578937521
2004-09-11 16:47:07 +00:00
Fred Kiefer
1040bb284d Use method call to change cell type.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20038 72102866-910b-0410-8b05-ffd578937521
2004-09-08 22:27:23 +00:00
Quentin Mathe
a901114168 Fixed the toolbar layout problem introduced by NSButtonCell changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19941 72102866-910b-0410-8b05-ffd578937521
2004-08-30 21:33:17 +00:00
Fred Kiefer
f962706ef0 Use GSDrawingFunctions instead of Function.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19483 72102866-910b-0410-8b05-ffd578937521
2004-06-07 23:54:25 +00:00
Quentin Mathe
28db48ddfd Added performClickWithFrame:inView: to NSCell
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19005 72102866-910b-0410-8b05-ffd578937521
2004-04-02 21:34:37 +00:00
Fred Kiefer
df3b584a19 Added keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18510 72102866-910b-0410-8b05-ffd578937521
2004-01-30 19:49:00 +00:00
Fred Kiefer
08baa147cf Made some NSCell methods cleaner for subclass redefinitions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18230 72102866-910b-0410-8b05-ffd578937521
2003-11-29 00:46:41 +00:00
David Ayers
c549497a5d Fix typo's.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17733 72102866-910b-0410-8b05-ffd578937521
2003-09-27 09:44:54 +00:00
David Ayers
c4f7312717 * Source/NSCell.m (-compare:): Compare the stringValue of
NSCell's rather than thier contents directly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17732 72102866-910b-0410-8b05-ffd578937521
2003-09-27 09:12:57 +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
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
2356f6a8e1 Use a much larger size for the field editor.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16866 72102866-910b-0410-8b05-ffd578937521
2003-06-04 21:05:22 +00:00
Adam Fedor
2513205129 Add GSCategories.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16308 72102866-910b-0410-8b05-ffd578937521
2003-04-01 03:46:31 +00:00
David Ayers
a2683d66ba * Source/NSCell.m ([NSCell encodeWithCoder:]): Reinsert encoding
of isContinuous to insure backward compatiblity of archives.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16215 72102866-910b-0410-8b05-ffd578937521
2003-03-20 13:59:29 +00:00
Fred Kiefer
d04d38f65d Added new MacOSX methods [title], [setTitle:], [controlSize],
[setControlSize:], [controlTint], [setControlTint:] and
[highlightColorWithFrame:inView:]. Rewrote [isContinuous],
[setContinuous:] and [trackMouse:...untilMouseUp:] to work via the
_action_mask.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16202 72102866-910b-0410-8b05-ffd578937521
2003-03-18 23:49:42 +00:00
Nicola Pero
ba494c7cd9 Lock focus / unlock focus optimizations and fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15839 72102866-910b-0410-8b05-ffd578937521
2003-02-01 05:10:00 +00:00
Nicola Pero
9111bb7a75 Added comment about what looks like a bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15731 72102866-910b-0410-8b05-ffd578937521
2003-01-27 01:13:11 +00:00
Alexander Malmberg
14ea97a747 Add missing includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15721 72102866-910b-0410-8b05-ffd578937521
2003-01-26 19:31:49 +00:00
Fred Kiefer
9097568682 In [selectWithFrame:...length:] removed duplicate setting of delegate.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15547 72102866-910b-0410-8b05-ffd578937521
2003-01-08 16:35:57 +00:00
Fred Kiefer
a666d7658d Removed unneeded includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15004 72102866-910b-0410-8b05-ffd578937521
2002-11-17 18:38:34 +00:00
Fred Kiefer
e3aa46c612 In [initImageCell:] and [initTextCell:] set the default menu.
In all [XXXValue] methods try to get the value from the objectValue
first and use [stringValue] instead of accessing the contents directly.
Removed AUTORELEASE calls from [attributedStringValue] and similar
places.
In [cellSize] use [attributedStringValue] to get the string to size.
In [drawInteriorWithFrame:inView:] use [attributedStringValue] to
get the string to draw. This make the method [_drawText:inFrame:]
obsolete for this class, but subclasses still use it.
New method [_setupTextWithFrame:inView:editor:] with the common
text view setup from [editWithFrame:inView:editor:delegate:event:]
and [selectWithFrame:inView:editor:delegate:start:length:].
Calls to [setFont:] and [setAlignment:] switch the cell to NSTextCellType.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14952 72102866-910b-0410-8b05-ffd578937521
2002-11-07 23:33:33 +00:00
Richard Frith-Macdonald
c8fe5fbff1 Tidied for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14752 72102866-910b-0410-8b05-ffd578937521
2002-10-13 07:10:44 +00:00
Adam Fedor
356a824ea8 Document. Fix up NSDebugLogs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14727 72102866-910b-0410-8b05-ffd578937521
2002-10-12 03:14:22 +00:00
Nicola Pero
ff1076cff8 Do not force an immediate display in editXxx: and selectXxxx:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14538 72102866-910b-0410-8b05-ffd578937521
2002-09-24 14:35:52 +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
cb43f1ecbe Use the system font as default font, not the user font
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13031 72102866-910b-0410-8b05-ffd578937521
2002-03-07 10:41:12 +00:00
Richard Frith-Macdonald
c1ffddcdc8 Rename middl toother mouse
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12948 72102866-910b-0410-8b05-ffd578937521
2002-03-02 07:23:18 +00:00
Nicola Pero
9dfbbceaf2 Updated for changes in semantics of NSMutableAttributedString -string
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12497 72102866-910b-0410-8b05-ffd578937521
2002-02-11 17:21:13 +00:00
Pierre-Yves Rivaille
e62b1743a6 Source/NSCell.m
Headers/gnustep/gui/NSCell.h: [NSCell -setHighlighted:] new method


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12354 72102866-910b-0410-8b05-ffd578937521
2002-01-31 21:17:29 +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
18e2344353 Use NSDebugMLLog, not NSWarn, when warning that -setStringValue: was
called with nil argument


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11693 72102866-910b-0410-8b05-ffd578937521
2001-12-11 02:23:59 +00:00
Nicola Pero
eadda82a38 Use a warning, do not throw an exception, when setStringValue: is called
with nil argument


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11572 72102866-910b-0410-8b05-ffd578937521
2001-11-30 13:18:01 +00:00
Nicola Pero
b469c9f9b6 Added comment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11218 72102866-910b-0410-8b05-ffd578937521
2001-10-23 09:39:03 +00:00
Nicola Pero
f7e4554107 Use an assertion to force setStringValue: to reject nil as argument
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11217 72102866-910b-0410-8b05-ffd578937521
2001-10-23 09:37:59 +00:00
Nicola Pero
6d4ea38fb5 When programmatically simulating a mouse click, also change state of the
cell


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10189 72102866-910b-0410-8b05-ffd578937521
2001-06-16 11:06:16 +00:00
Nicola Pero
babf751ba5 Added NSDebugLog for case in which the cell is asked for a cell attribute
which is not supported


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10154 72102866-910b-0410-8b05-ffd578937521
2001-06-10 16:12:56 +00:00