Commit graph

93 commits

Author SHA1 Message Date
Gregory John Casamento
64a5d19b19 Update encoding/decoding 2023-01-30 10:48:02 -05:00
Gregory John Casamento
7fe30c6db2 Update flow layout. Fix decoding issue with Xib interpretation for NSCollectionViewLayout. 2023-01-30 10:48:02 -05:00
Gregory John Casamento
67860bf8c1 Add declarations for setPlaceholderString:/setPlaceholderAttributedString and getters to header and implementation to NSTextField.m 2022-01-12 04:45:56 -05:00
Gregory John Casamento
97379423f0 Revert change per discussion with @fredkiefer. 2021-10-27 16:14:57 -04:00
Gregory John Casamento
7023c7d06d Add remaining changes contributed by testplant. 2021-10-27 15:18:23 -04:00
Fred Kiefer
0576f2736b * Source/NSControl.m (-textDidChange:): If there is a binding with
continious update, pass on the changed text.
* Source/GSXibElement.m: Correct the handling of boolean values in attributes.
* Source/GSBindingHelpers.h,
* Source/NSKeyValueBinding.m: Prevent recursion when
reverseSetValue: is used.
* Source/NSTextField.m (-textDidChange:): Remove empty code line.
2021-03-27 21:20:28 +01:00
Fred Kiefer
59b1180d27 * Source/GSXibLoader.m (-awake:inContainer:withContext:): Allow
for subclasses of NSApplication as rootObjects.
        Based on patch by Marcian Lytwyn <gna@advcsi.com>.
        * Source/NSWindow.m (-userSpaceScaleFactor): Handle case where
        _screen is nil.
        Patch by Doug Simons (dsimons@testplant.com).
        * Source/NSWindow.m (-_screenForFrame:): Require real overlapp.
        Patch by Doug Simons (dsimons@testplant.com).
        * Source/NSTextField.m (-textDidChange:): Improve editing
        behavior when formatter returns a new string.
        Patch by Doug Simons (dsimons@testplant.com).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37830 72102866-910b-0410-8b05-ffd578937521
2014-05-03 21:45:47 +00:00
Fred Kiefer
ac6909e871 Merged changes from gnustep_testplant_branch branch and cleaned them up
a bit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35417 72102866-910b-0410-8b05-ffd578937521
2012-08-17 13:16:12 +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
Fred Kiefer
a953d2bda0 Release the key value binding as it will be
retained in the binding table.
Leak found by static code analyser.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32484 72102866-910b-0410-8b05-ffd578937521
2011-03-07 13:35:37 +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
Wolfgang Lux
d94f50de97 Add special case to preserve the current X selection when editing of a
NSTextField is started with a mouse click.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31160 72102866-910b-0410-8b05-ffd578937521
2010-08-15 20:52:09 +00:00
Wolfgang Lux
7f6a94c5bb When editing of a text field ends after pressing the Return key and no
(other) view has become first responder make the text field itself
first responder by selecting its text just like this is done after
pressing Tab and Shift-Tab.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30145 72102866-910b-0410-8b05-ffd578937521
2010-04-14 07:11:50 +00:00
Wolfgang Lux
61187ead14 Usability improvement: Make color and font panels key only when
necessary. Avoids annoying and unnecessary focus shifts when changing
colors or fonts.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29681 72102866-910b-0410-8b05-ffd578937521
2010-02-20 00:20:30 +00:00
Wolfgang Lux
3ebf818958 Merge bug fix from Doug Simons to trunk.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29058 72102866-910b-0410-8b05-ffd578937521
2009-11-24 23:30:45 +00:00
Fred Kiefer
6c1bfef9f3 Merge changes from Doug Simons to trunk.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29017 72102866-910b-0410-8b05-ffd578937521
2009-11-15 18:04:17 +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
f25c62f57b Add some more KVB and move some.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25746 72102866-910b-0410-8b05-ffd578937521
2007-12-15 12:34:39 +00:00
Fred Kiefer
295b663a75 Rewrote KVB to use separate binding class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25728 72102866-910b-0410-8b05-ffd578937521
2007-12-13 01:10:09 +00:00
Fred Kiefer
5966ffcd3f Key binding patch by Chris Farber <chris@chrisfarber.net>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25724 72102866-910b-0410-8b05-ffd578937521
2007-12-11 18:50:42 +00:00
Fred Kiefer
ec5e0a3c38 Correct colour sliders to work in flipped views and simplified code.
Let text fields and controls pass on not used mouse down events to next
responder.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25707 72102866-910b-0410-8b05-ffd578937521
2007-12-08 22:12:48 +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
db20590f24 Add new MacOSX 10.3 methods and constants.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25470 72102866-910b-0410-8b05-ffd578937521
2007-09-09 15:30:06 +00:00
Fred Kiefer
a66882b17b Add new MacOSX 10.4 methods and constants to NSWindow. Requires
recompilation of all applications!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25469 72102866-910b-0410-8b05-ffd578937521
2007-09-09 12:19:01 +00:00
Fred Kiefer
b3dc35f126 Editing patches partly by Andreas Höschler <ahoesch@smartsoft.de>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25426 72102866-910b-0410-8b05-ffd578937521
2007-08-31 10:52:52 +00:00
Fred Kiefer
a7f9a308f4 Report the text field as being flipped.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25302 72102866-910b-0410-8b05-ffd578937521
2007-07-04 10:10:42 +00:00
Fred Kiefer
ebc0de97f3 Added MacOSX 10.4 methods to NSControl and reworked the whole cell
editing mechanism.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24380 72102866-910b-0410-8b05-ffd578937521
2007-01-18 17:24:33 +00:00
Richard Frith-MacDonald
57435da7d5 tidyups and minor theme tiling updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23871 72102866-910b-0410-8b05-ffd578937521
2006-10-15 08:34:47 +00:00
Matt Rice
8dce386f4d * Source/NSTextField.m (-mouseDown:): Check if the control is
disabled. (bug #13916)
        (-acceptFirstResponder:): Return no if disabled.
        (-acceptFirstMouse:): Ditto.
        * Source/NSTextFieldCell.m (-setEnabled:): Reset the string 
	value to an empty string if disabling.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23574 72102866-910b-0410-8b05-ffd578937521
2006-09-20 20:04:31 +00:00
Gregory John Casamento
d68950d71a Nib compatibility code merge.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22957 72102866-910b-0410-8b05-ffd578937521
2006-05-20 22:12:46 +00:00
Fred Kiefer
37be3efd3a GUI patches by Andreas H��schler.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22119 72102866-910b-0410-8b05-ffd578937521
2005-11-29 00:16:10 +00:00
Fabien Vallon
1999cc1666 Improved documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22094 72102866-910b-0410-8b05-ffd578937521
2005-11-24 13:04:19 +00:00
Fred Kiefer
a350b03662 Two small patches from the current mailing list discussion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22060 72102866-910b-0410-8b05-ffd578937521
2005-11-21 13:33:59 +00:00
Fabien Vallon
8c11f4903e Improved documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22033 72102866-910b-0410-8b05-ffd578937521
2005-11-18 11:06:09 +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
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
Fred Kiefer
93b7e7acf8 Menu reference handlin patch and further keyed archiving.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18547 72102866-910b-0410-8b05-ffd578937521
2004-02-06 00:16:54 +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
Fred Kiefer
d28626b423 Only accept first mouse when editable.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15857 72102866-910b-0410-8b05-ffd578937521
2003-02-02 16:56:38 +00:00
Richard Frith-Macdonald
a19302360b Fix coding bugs etc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14808 72102866-910b-0410-8b05-ffd578937521
2002-10-21 17:20:46 +00:00
Richard Frith-Macdonald
92867e201f Documentation tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14760 72102866-910b-0410-8b05-ffd578937521
2002-10-13 10:26:57 +00:00
Nicola Pero
f202a70a7b Fixed [_window makeFirstResponder: aTextField] to actually select the text
in the textfield


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14539 72102866-910b-0410-8b05-ffd578937521
2002-09-24 14:36:59 +00:00
Nicola Pero
48cac53701 Added missing dealloc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14526 72102866-910b-0410-8b05-ffd578937521
2002-09-24 01:22:50 +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
d2d3d03ef4 A little bit of 'end editing' was still done after the end editing notification
was posted ... causing the delegate not to be able to select the text when
receiving the notification ... fixed!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13983 72102866-910b-0410-8b05-ffd578937521
2002-06-27 10:52:01 +00:00
Nicola Pero
d024336615 Post the NSControlTextDidEndEditingNotification *after* actually ending
editing :-)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13979 72102866-910b-0410-8b05-ffd578937521
2002-06-26 17:00:33 +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
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