mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 12:00:45 +00:00
Add code to handle Title property on NSTableColumn, add code to NSTableView to set the table view to _viewBased if it responds to tableView:viewForTableColumn:row:
This commit is contained in:
parent
8895bd0335
commit
e55babb04e
3 changed files with 22 additions and 1 deletions
|
@ -133,6 +133,13 @@ APPKIT_EXPORT_CLASS
|
|||
- (void) setSortDescriptorPrototype: (NSSortDescriptor *)aSortDescriptor;
|
||||
- (NSSortDescriptor *) sortDescriptorPrototype;
|
||||
#endif
|
||||
/*
|
||||
* Title
|
||||
*/
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
|
||||
- (void) setTitle: (NSString *)title;
|
||||
- (NSString *) title;
|
||||
#endif
|
||||
@end
|
||||
|
||||
/* Notifications */
|
||||
|
|
|
@ -656,6 +656,16 @@ to YES. */
|
|||
return _prototypeCellViews;
|
||||
}
|
||||
|
||||
- (void) setTitle: (NSString *)title
|
||||
{
|
||||
[_headerCell setStringValue: title];
|
||||
}
|
||||
|
||||
- (NSString *) title
|
||||
{
|
||||
return [_headerCell stringValue];
|
||||
}
|
||||
|
||||
- (void) setValue: (id)anObject forKey: (NSString*)aKey
|
||||
{
|
||||
if ([aKey isEqual: NSValueBinding])
|
||||
|
|
|
@ -5339,7 +5339,8 @@ This method is deprecated, use -columnIndexesInRect:. */
|
|||
- (void) setDelegate: (id)anObject
|
||||
{
|
||||
const SEL sel = @selector(tableView:willDisplayCell:forTableColumn:row:);
|
||||
|
||||
const SEL vbsel = @selector(tableView:viewForTableColumn:row:);
|
||||
|
||||
if (_delegate)
|
||||
[nc removeObserver: _delegate name: nil object: self];
|
||||
_delegate = anObject;
|
||||
|
@ -5357,6 +5358,9 @@ This method is deprecated, use -columnIndexesInRect:. */
|
|||
|
||||
/* Cache */
|
||||
_del_responds = [_delegate respondsToSelector: sel];
|
||||
|
||||
/* Test to see if it is view based */
|
||||
_viewBased = [_delegate respondsToSelector: vbsel];
|
||||
}
|
||||
|
||||
- (id) delegate
|
||||
|
|
Loading…
Reference in a new issue