Commit graph

255 commits

Author SHA1 Message Date
Marcian Lytwyn
5e8e285254 NSCell, NSClipView and NSCollectionView merges
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38707 72102866-910b-0410-8b05-ffd578937521
2015-06-26 18:05:15 +00:00
Marcian Lytwyn
ce265f56f8 Merge fixes and additional merges
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38682 72102866-910b-0410-8b05-ffd578937521
2015-06-25 18:51:04 +00:00
Marcian Lytwyn
adbe4f1121 Process text for truncation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38654 72102866-910b-0410-8b05-ffd578937521
2015-06-17 17:58:33 +00:00
Marcian Lytwyn
bee13c1d64 Field editor for NSCell should have it's textview/textcontainer sized to title rectangle height
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37746 72102866-910b-0410-8b05-ffd578937521
2014-03-15 17:13:13 +00:00
Marcian Lytwyn
e1498b311a Table view and cell drawing updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37351 72102866-910b-0410-8b05-ffd578937521
2013-11-01 23:20:18 +00:00
Marcian Lytwyn
0122926822 tableView and NSCell processing and drawing updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37347 72102866-910b-0410-8b05-ffd578937521
2013-11-01 15:35:17 +00:00
Marcian Lytwyn
cdfe249de8 Update NSTableView processing to handle grouped row cells
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37336 72102866-910b-0410-8b05-ffd578937521
2013-10-30 20:55:04 +00:00
Frank Le Grand
4b27157a46 Merged Trunk changes from rev 35219 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36953 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:24:48 +00:00
Frank Le Grand
d3b8f3ae90 Finalized drag&drop on NSCollectionView, fixed a bug in NSTabView where the nextKeyView was being set to a dealloc'd view after closing all tabs and reopening one.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36314 72102866-910b-0410-8b05-ffd578937521
2013-03-08 22:59:40 +00:00
Frank Le Grand
bca3428387 Implemented focus rings around cell so editable cells in a NSTableView appear by default with a focus ring when being edited. Some minor adjustments will be required to make it work perfectly with other controls, such as NSMatrix, NSForm, and NSPopUpButton.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36066 72102866-910b-0410-8b05-ffd578937521
2013-02-06 20:32:45 +00:00
Marcian Lytwyn
36e77b95f7 Merge from revision 35723 from main branch plus NSCell allowsUndo flag extract from xib
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35724 72102866-910b-0410-8b05-ffd578937521
2012-10-19 22:51:20 +00:00
Jonathan Gillaspie
2dd7f9fdcb Just do a return; not a return nil; on a void funtion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35630 72102866-910b-0410-8b05-ffd578937521
2012-10-03 20:02:29 +00:00
Jonathan Gillaspie
f8ce5cf7c3 Ignore a call to setToolTip on an NSCell. This can be set in XIBs from Apple
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35622 72102866-910b-0410-8b05-ffd578937521
2012-10-03 01:32:06 +00:00
Marcian Lytwyn
caae5ea873 unbind all in dealloc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35523 72102866-910b-0410-8b05-ffd578937521
2012-09-04 17:09:54 +00:00
Marcian Lytwyn
508b45d371 Expose title binding
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35522 72102866-910b-0410-8b05-ffd578937521
2012-09-04 16:48:08 +00:00
Eric Wasylishen
c500d8379f * Source/NSCell.m (_updateFieldEditor:): Fix what I presume is
a typo. The "if (nil == _contents) { contents = @""; }" blocks were
dead code because the contents variable would later
be set to nil if _contents was nil. This was causing an exception
when starting editing an empty text field loaded from a xib.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35011 72102866-910b-0410-8b05-ffd578937521
2012-03-27 19:26:17 +00:00
Fred Kiefer
d570812401 Fix clang compiler warnings as reported by Sebastian Reitenbach
<sebastia@l00-bugdead-prods.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34608 72102866-910b-0410-8b05-ffd578937521
2012-01-23 14:27:58 +00:00
Fred Kiefer
ace1561e52 * Source/NSCell.m (-setStringValue:, setObjectValue:): Always use
ASSIGNCOPY for the contents. This fixes memory leak of last commit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34585 72102866-910b-0410-8b05-ffd578937521
2012-01-19 08:47:52 +00:00
Riccardo Mottola
9603f29b84 Copy contents before setting it [setObjectValue]
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34584 72102866-910b-0410-8b05-ffd578937521
2012-01-19 00:40:47 +00:00
Fred Kiefer
8ad4aa86c4 Replace some occurences of int with NSInteger
and unsigned with NSUInteger. This allows to recompile gui on 
64 bit systems after the change to NSNotFound in base.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
2011-12-17 17:16:09 +00:00
Eric Wasylishen
60674d5076 * Headers/AppKit/NSImageCell.h:
* Headers/AppKit/NSCell.h: Move NSImageScaling constants to NSCell
* Source/NSImageCell.m:
* Source/NSCell.m: Refactor the image scaling logic to a private
method in NSCell, -_scaleImageWithSize:toFitInSize:scalingType:
which can be share by NSImageCell, NSButtonCell, and any other
cell classes that need it.
* Source/NSButtonCell.m:
* Headers/AppKit/NSButtonCell.h: Implement -imageScaling and
-setImageScaling methods. 
* Source/GSThemeDrawing.m:
* Headers/Additions/GNUstepGUI/GSTheme.h: Remove the
-drawImage:inButtonCell:withFrame:position: API intended
to let themes substitute images right before drawing,
as IMHO it's the wrong place to hook in new images (by
the time this method was caleld, sizing/positionging
was already done).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34160 72102866-910b-0410-8b05-ffd578937521
2011-11-11 23:10:15 +00:00
Eric Wasylishen
fde5f243d8 * Source/NSCell.m: Read/write NSLineBreakMode from the bits masked off
by 0xE00 in NSCellFlags2. The previous location they were being
read/written from was giving bogus values such as 7.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34073 72102866-910b-0410-8b05-ffd578937521
2011-10-26 20:01:31 +00:00
Eric Wasylishen
a6788023fb * Source/NSImageCell.m (-drawInteriorWithFrame:inView:): Simplify a bit
bit by using
-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]
* Source/NSCell.m (-drawInteriorWithFrame:inView:): Switch from
-[NSImage compositeToPoint...] to
-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33813 72102866-910b-0410-8b05-ffd578937521
2011-09-07 08:18:40 +00:00
Eric Wasylishen
a15066d183 * Source/NSButtonCell.m (-title): Return @"" instead of nil
* Source/NSButtonCell.m (-alternateTitle): Return @"" instead of nil
* Source/NSButtonCell.m (-attributedAlternateTitle): Use
[self alternateTitle] instead of accessing _altContents directly to guard
against _altContents being nil
* Source/NSButtonCell.m (-attributedTitle): Don't return nil. Use
[self title] instead of accessing _contents directly to guard against
_contents being nil
* Source/NSButtonCell.m (-keyEquivalent): Return @"" instead of nil
* Source/NSButtonCell.m (-encodeWithCoder):
For keyEquivelant and alternateTitle, now that the methods never return
nil, instead of checking if they return nil to decide whether to encode them,
check if the string length is > 0.
* Source/NSToolbarItem.m (-label): Return @"" instead of nil.
* Source/NSCell.m (-stringValue): Return @"" instead of nil
* Source/NSCell.m (-attributedStringValue): Don't return nil. Use
[self stringValue] instead of accessing _contents directly to guard against
_contents being nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33598 72102866-910b-0410-8b05-ffd578937521
2011-07-21 06:31:34 +00:00
Fred Kiefer
86ff6abf69 Replace direct use of the isa pointer with a call to object_getClass()
to make David happy.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33545 72102866-910b-0410-8b05-ffd578937521
2011-07-14 07:17:24 +00:00
David Chisnall
c6866f8c8a Lots of small tweaks to make -gui compile without warnings with clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30119 72102866-910b-0410-8b05-ffd578937521
2010-04-10 20:33:30 +00:00
Fred Kiefer
7e289df84b Yet another set of #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30083 72102866-910b-0410-8b05-ffd578937521
2010-03-31 08:14:50 +00:00
Fred Kiefer
53381f6992 Some more #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30036 72102866-910b-0410-8b05-ffd578937521
2010-03-25 21:30:28 +00:00
Fred Kiefer
9f4fd26405 Change tag to NSInteger.
Patch by Anibal Rindisbacher <anibal784@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30026 72102866-910b-0410-8b05-ffd578937521
2010-03-23 21:26:24 +00:00
Wolfgang Lux
cdf5175e7c Fix some optimistic coding in NSCell which was causing a crash in
AddressManager.app.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29904 72102866-910b-0410-8b05-ffd578937521
2010-03-11 18:43:15 +00:00
Fred Kiefer
c16eed5d1d Started cleanup of #includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29833 72102866-910b-0410-8b05-ffd578937521
2010-03-04 10:12:13 +00:00
Fred Kiefer
c05581a005 Fix up teh includes to compile again after latest changes to base. Still
plenty of warnings and the result isn't working at least on 64 bit
machines :-(


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29685 72102866-910b-0410-8b05-ffd578937521
2010-02-20 10:40:44 +00:00
Fred Kiefer
43074e4a62 Start cleanup after big base change. Remove the usage of extension
methods.
New 10.5 methods on NSCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29656 72102866-910b-0410-8b05-ffd578937521
2010-02-17 09:58:38 +00:00
Riccardo Mottola
f6350f5540 removed c99-ism
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29166 72102866-910b-0410-8b05-ffd578937521
2009-12-26 10:43:09 +00:00
Gregory John Casamento
8bc3ee3cf8 Corrected documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29160 72102866-910b-0410-8b05-ffd578937521
2009-12-22 22:29:41 +00:00
Fred Kiefer
34aba2af74 Cleaned up implementation of NSButtonCell title setting. This allowed to
remove special case from NSCell setString:.
Removed unneeded NSSliderCell methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29142 72102866-910b-0410-8b05-ffd578937521
2009-12-19 23:05:48 +00:00
Wolfgang Lux
8b97af9ed3 Phase out the wraps NSCell attribute, since it is implied by the
lineBreakMode attribute. Note that with this change cells now wrap by
default, as has always been the case on OS X.
Also fix a related inconsistency where text that is wrapped by the
cell was displayed in a single line during editing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29134 72102866-910b-0410-8b05-ffd578937521
2009-12-17 01:49:20 +00:00
Wolfgang Lux
786f376f1b Fix various issues when drawing controls with edited cells. This
includes a fix for the problem of properly resizing and redrawing the
editor when the cell is resized or moved during editing (bug #22678).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29133 72102866-910b-0410-8b05-ffd578937521
2009-12-17 01:03:07 +00:00
Wolfgang Lux
9ee683802f Avoid writing back an unchanged string to the cell's field editor.
Fix bug where an attributed string would not be considered a valid
object value of a cell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29059 72102866-910b-0410-8b05-ffd578937521
2009-11-24 23:53:58 +00:00
Fred Kiefer
40a81ac812 Attempt to correct side effect of last NSActionCell change.
Small cleanup in NSCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29020 72102866-910b-0410-8b05-ffd578937521
2009-11-16 11:40:14 +00:00
Wolfgang Lux
036a78c32d Fix NSActionCell implementation so that -setObjectValue: and
-setStringValue: have an effect while the cell is edited.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29010 72102866-910b-0410-8b05-ffd578937521
2009-11-14 22:15:31 +00:00
Fred Kiefer
7c2e8efcd8 Replace nil with [NSDate distantFuture] in calls to nextEventMatchingMask:...dequeue:.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28025 72102866-910b-0410-8b05-ffd578937521
2009-03-02 16:26:23 +00:00
Riccardo Mottola
502af4d5d1 removed debug log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27891 72102866-910b-0410-8b05-ffd578937521
2009-02-16 22:14:53 +00:00
Riccardo Mottola
f7403db91c try to fix bugss in last change, Optimize in case of common string and check for nil.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27889 72102866-910b-0410-8b05-ffd578937521
2009-02-16 21:40:26 +00:00
Fred Kiefer
67d368832d Try to fix bug in last change on NSCell.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27887 72102866-910b-0410-8b05-ffd578937521
2009-02-16 17:06:22 +00:00
Gregory John Casamento
1689d8a6de * Source/NSCell.m: Change to implement 10.3 and later behavior for
the method setStringValue: as documented in Apple's documentation
	for the method.  This behavior was observed on Cocoa under 
	Mac OS 10.5.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27874 72102866-910b-0410-8b05-ffd578937521
2009-02-16 00:31:23 +00:00
Fred Kiefer
900209df53 Add helper method for action sending.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27773 72102866-910b-0410-8b05-ffd578937521
2009-02-03 22:49:22 +00:00
Fred Kiefer
f114baad28 Moved _sizeForBorderType() into GSTheme header and added more methods
for theme abstraction.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26836 72102866-910b-0410-8b05-ffd578937521
2008-09-08 18:59:48 +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
Nicola Pero
c6c6e8f027 Indented line
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26367 72102866-910b-0410-8b05-ffd578937521
2008-03-20 11:44:13 +00:00