Commit graph

238 commits

Author SHA1 Message Date
fredkiefer
ab56e573e7 * Source/NSTableView.m (-selectedColumnIndexes,
* -selectedRowIndexes): Return an
        autoreleased copy of the corresponding ivar. Returning a
reference to the ivar
        leads to issues (and behavior different from Cocoa) when
iterating thru the
        indexsets if at a time they would be being altered.
        Patch by Frank LeGrand (flegrand@testplant.com).
        * Source/GNUmakefile: Add NSCollectionViewItem.
        * Headers/AppKit/NSCollectionView.h,
        * Headers/AppKit/NSCollectionViewItem.h,
        * Source/NSCollectionViewItem.m,
        * Source/NSCollectionView.m: Bring closer to the GNUstep coding
        * standard.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36551 72102866-910b-0410-8b05-ffd578937521
2013-04-21 13:28:47 +00:00
fredkiefer
7ce551f716 * Source/NSTableView.m: Use new method -_isCellSelectableColumn:row:,
that checks the cells selectable state, in -mouseDown:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36363 72102866-910b-0410-8b05-ffd578937521
2013-03-15 16:39:31 +00:00
fredkiefer
12b5c60a5a * Source/NSTableColumn.m (-initWithCoder:): Make columns
non-editable by default.
* Source/NSTableView.m (-editColumn:...select:): Make editing
here independ of the datasource.
* Source/NSTableView.m: Split -_isCellEditableColumn:row: in two
methods and ignore the cell isEditable state in -mouseDown:.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36307 72102866-910b-0410-8b05-ffd578937521
2013-03-08 11:51:51 +00:00
qmathe
087be03727 Fixed typo in comment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36171 72102866-910b-0410-8b05-ffd578937521
2013-02-19 17:01:31 +00:00
qmathe
231105f428 Cleaned drop handling code a bit more in NSTableView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36170 72102866-910b-0410-8b05-ffd578937521
2013-02-19 16:59:21 +00:00
qmathe
3145e67066 Don't update the drop row and operation if the drop target hasn't changed (this prevents to overwrite a custom drop row and operation set by the user)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36169 72102866-910b-0410-8b05-ffd578937521
2013-02-19 16:03:28 +00:00
qmathe
8e2af0a5ab Extracted table view drop indicator drawing from -draggingUpdated: into a new method -_drawDropIndicator
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36168 72102866-910b-0410-8b05-ffd578937521
2013-02-19 15:57:04 +00:00
qmathe
7304ddbbe8 Modularized the first part of -draggingUpdated: into several smaller methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36167 72102866-910b-0410-8b05-ffd578937521
2013-02-19 15:18:53 +00:00
fredkiefer
8793a644bd More CGFloat, NSUInteger and NSInteger changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36163 72102866-910b-0410-8b05-ffd578937521
2013-02-17 22:44:47 +00:00
qmathe
9a8f8f4e07 Replaced -_dataCellForTableColumn:row: by -preparedCellAtColumn:row: new public method from Mac OS X 10.5
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36136 72102866-910b-0410-8b05-ffd578937521
2013-02-14 10:34:20 +00:00
fredkiefer
9212e5bbeb Change NSEvent to CGFloat, NSUInteger and NSInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36121 72102866-910b-0410-8b05-ffd578937521
2013-02-13 08:40:36 +00:00
theraven
30eb57e642 Fix all current compiler warnings on FreeBSD/x86-64.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36038 72102866-910b-0410-8b05-ffd578937521
2013-01-30 09:48:54 +00:00
gcasa
c06308b00a * Headers/AppKit/NSTableView.h: Add _isValidating
* Source/NSCell.m (+initialize): Expose title binding.
	* Source/NSOpenPanel.m (-runModal): Use _directory if it is set.
	* Source/NSTableView.m (-validateEditing): Check _isValidating to
	prevent recursive calls into validateEditing.
	* Source/NSTabView.m (-initWithCoder:): Set _selected_item to
	NSNotFound.
	* Source/NSView.m (-addSubview:): Do not throw an exception when
	adding a nil subview, just ignore it.  This matches behavior on
	Cocoa.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35562 72102866-910b-0410-8b05-ffd578937521
2012-09-11 04:16:51 +00:00
fredkiefer
2320adf46b * Headers/AppKit/NSKeyValueBinding.h,
* Source/externs.m: Additional binding names.
* Source/GSBindingHelpers.h,
* Source/NSKeyValueBinding.m: Additional helper methods.
* Source/NSObjectController.m: Use helper methods.
* Source/NSArrayController.m: Signal when the arranged objects
change.
* Source/NSTableColumn.m,
* Source/NSTableView.m: First attempt at support for content
binding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34923 72102866-910b-0410-8b05-ffd578937521
2012-03-12 12:24:17 +00:00
ericwa
ad80fdd717 * Source/NSTableView.m:
* Source/GSNibLoading.m: Move -[coder setClassName: @"_NSCornerView"
forClass: [GSTableCornerView class]] call from
-[NSTableView initWithCoder:] to GSNibLoading, because corner views
can be encountered before hitting -[NSTableView initWithCoder:]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34919 72102866-910b-0410-8b05-ffd578937521
2012-03-09 23:18:18 +00:00
ericwa
f5dd4730cf * Headers/AppKit/NSOutlineView.h:
* Source/NSOutlineView.m: Add support for
outlineView:dataCellForTableColumn:item: delegate method
* Headers/AppKit/NSTableView.h:
* Source/NSTableView.m: Add support for
tableView:dataCellForTableColumn:row: delegate method


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34717 72102866-910b-0410-8b05-ffd578937521
2012-02-03 21:41:41 +00:00
ericwa
d2c0652049 * Source/NSTableView.m (-_isCellEditableColumn:row:): Tweak
criteria for determining cell editability::
- the delegate (if present) must say YES
- and the cell itself must return YES for isEditable
- and the table column must return YES for isEditable
Previously you could edit cells that returned NO for
isEditable if the column they were in was editable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34320 72102866-910b-0410-8b05-ffd578937521
2011-12-19 00:18:58 +00:00
fredkiefer
ccf59ac3ca 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
gcasa
e92bfa1eb8 Changes to encode and decode sortDescriptors into the gorm file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33430 72102866-910b-0410-8b05-ffd578937521
2011-07-02 19:41:38 +00:00
fredkiefer
1a0c431060 Implement the drag and drop support method
namesOfPromisedFilesDroppedAtDestination:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32628 72102866-910b-0410-8b05-ffd578937521
2011-03-17 10:19:11 +00:00
fredkiefer
38c2685a68 Send the sort message to the data source not the delegate.
This should fix bug #32806.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32624 72102866-910b-0410-8b05-ffd578937521
2011-03-16 19:07:53 +00:00
fredkiefer
9fcd522c8a Removed dead assignments found by static code analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32551 72102866-910b-0410-8b05-ffd578937521
2011-03-13 15:26:20 +00:00
fredkiefer
475f2d07aa Remove dead assignments found by static code analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32022 72102866-910b-0410-8b05-ffd578937521
2011-02-09 22:20:00 +00:00
fredkiefer
0efb94944b Correct the definition of NSDragOperation and all its usages.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31754 72102866-910b-0410-8b05-ffd578937521
2010-12-22 16:16:14 +00:00
gcasa
bd43d10d38 Correcting spelling error in one of the theme methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31701 72102866-910b-0410-8b05-ffd578937521
2010-12-02 17:23:00 +00:00
gcasa
2ec7e163d8 Additional table view methods for themeing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31679 72102866-910b-0410-8b05-ffd578937521
2010-11-28 03:55:58 +00:00
gcasa
512eb11afc Added NSTableView to the drawing methods for GSTheme.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31678 72102866-910b-0410-8b05-ffd578937521
2010-11-28 00:05:46 +00:00
fredkiefer
30240921b4 First batch of corrections based on David's static analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31337 72102866-910b-0410-8b05-ffd578937521
2010-09-12 16:34:22 +00:00
wlux
26c6942f2d Fix bug where the _selectedRow attribute of an NSTableView could be
updated incorrectly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31207 72102866-910b-0410-8b05-ffd578937521
2010-08-30 06:59:00 +00:00
wlux
10c98c9b2f Correct serious nib loading bug on big endian machines.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30472 72102866-910b-0410-8b05-ffd578937521
2010-05-29 08:32:02 +00:00
fredkiefer
cec34abb20 Remove compiler warnings from clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30117 72102866-910b-0410-8b05-ffd578937521
2010-04-10 17:48:46 +00:00
fredkiefer
3d559c477e 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
gcasa
025a72aaca * Source/NSTableView.m: Add nil check to make sure that the
nil values set for certain keys don't get set since they are
	normally set by connections later in the nib loading process. 
	I'm not sure why IB includes these when they're set to nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30082 72102866-910b-0410-8b05-ffd578937521
2010-03-31 04:02:03 +00:00
jonathanosx
808f778c16 Don't attempt to add a nil sort descriptor
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30005 72102866-910b-0410-8b05-ffd578937521
2010-03-19 23:39:07 +00:00
qmathe
43c76c02df Fixed table header/content random disappearance with unarchived table/outline
views.

NSTableView non-keyed unarchiving was not always initializing _columnOrigins.
NSScrollView keyed unarchiving was decoding non-encoded flags (the flags were 
thus initialized with random memory content).
See ChangeLog for detailed explanations.

Also added double action keyed archiving to NSTableView.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29494 72102866-910b-0410-8b05-ffd578937521
2010-02-06 11:32:34 +00:00
qmathe
b5d13a91db Fixed sort direction stuck to the reverse of the sort descriptor prototype
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29298 72102866-910b-0410-8b05-ffd578937521
2010-01-16 22:43:31 +00:00
qmathe
ec403f1296 Rewrote _selectColumn:modifiers: to be simpler, support selection by range as
Cocoa does, and remove the toggle selection behavior when a column is clicked 
twice (in conflict with the ability to change the sort direction).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29296 72102866-910b-0410-8b05-ffd578937521
2010-01-16 20:29:59 +00:00
qmathe
239eec74dc Finished to implement the NSTable/OutlineView sort descriptor support.
More changes are needed to get proper sorting support (e.g. visual feedback).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29293 72102866-910b-0410-8b05-ffd578937521
2010-01-16 14:45:13 +00:00
qmathe
6dd84b196f Added -columnIndexesInRect: and updated documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29175 72102866-910b-0410-8b05-ffd578937521
2009-12-27 16:05:48 +00:00
wlux
b16ee73226 Fix incorrect assignment in last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29162 72102866-910b-0410-8b05-ffd578937521
2009-12-22 23:27:56 +00:00
wlux
bd09833337 Usability improvement: A single click into a cell of an unselected row
of a table view now can change the cell's state even when the table
view allows dragging.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29161 72102866-910b-0410-8b05-ffd578937521
2009-12-22 23:21:40 +00:00
qmathe
78dcbb6c4e Corrected table view to support drop on root with -1 as the drop row (as
explained in the Cocoa documentation).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29137 72102866-910b-0410-8b05-ffd578937521
2009-12-17 13:51:40 +00:00
wlux
68b0f819f2 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
qmathe
cd86476602 Modified the drag code to call -canDragRowsWithIndexes:atPoint: as expected
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29100 72102866-910b-0410-8b05-ffd578937521
2009-12-05 23:22:39 +00:00
rfm
82d1ada3dc fix drawing bug when number of rows decreases
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29065 72102866-910b-0410-8b05-ffd578937521
2009-11-26 20:33:44 +00:00
fredkiefer
48bf51f21c Move corner view drawing into GSTheme.
Add new 10.3 methods for NSTableHeaderCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28985 72102866-910b-0410-8b05-ffd578937521
2009-11-09 14:53:59 +00:00
rfm
f48b5d132e Small theme update, plus documentation fixes and tweaks to avoid warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28538 72102866-910b-0410-8b05-ffd578937521
2009-08-25 07:46:37 +00:00
fredkiefer
b6208240c8 * Source/NSTableView.m (-_editPreviousEditableCellBeforeRow:column:,
-_editNextEditableCellAfterRow:column:): Comment out the loop
around of the last change. This leads to wrong results, when the
table view isn't the only view in the window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28383 72102866-910b-0410-8b05-ffd578937521
2009-07-06 14:21:22 +00:00
fredkiefer
0e7730756b Better implementation of changing the edited cell in a table view.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28381 72102866-910b-0410-8b05-ffd578937521
2009-07-05 21:52:17 +00:00
fredkiefer
fc7b0dd25d Compare row against _numberOfRows not _numberOfColumns.
Patch by Tim Schmielau <tim@smmo.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28379 72102866-910b-0410-8b05-ffd578937521
2009-07-05 09:45:18 +00:00