mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 18:31:20 +00:00
Source/NSBundleAdditions.m
Source/NSTableView.m Source/NSScrollView.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13240 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff8dd6d97b
commit
ebf72dfb73
4 changed files with 117 additions and 44 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2002-03-26 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||
|
||||
* Source/NSBundleAdditions.m
|
||||
([NSNibOutletConnector -establishConnection]):
|
||||
Only capitalize the first letter of the outlet in order to have
|
||||
the accessor method's name.
|
||||
* Source/NSTableView.m ([NSTableView initWithCoder:]):
|
||||
Use @"NSTableView" insted of NSStringFromClass([self class]) when
|
||||
looking for version. Call -tile to set up everything properly.
|
||||
* Source/NSScrollView.m ([NSScrollView encodeWithCoder:] &
|
||||
[NSScrollView initWithCoder:]):
|
||||
Encode/decode _hasHeaderView, _hasCornerView & _headerClipView.
|
||||
Don't recreate cornerView & headerView at decoding time, because
|
||||
they are encoded by NSView anyway.
|
||||
|
||||
Tue Mar 26 14:33:24 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
* Source/GSTable.m: Removed GSTransparentView and replaced it with
|
||||
|
|
|
@ -147,8 +147,9 @@ static const int currentVersion = 1;
|
|||
NSString *selName;
|
||||
SEL sel;
|
||||
|
||||
selName = [NSString stringWithFormat: @"set%@:",
|
||||
[_tag capitalizedString]];
|
||||
selName = [NSString stringWithFormat: @"set%@%@:",
|
||||
[[_tag substringToIndex: 1] uppercaseString],
|
||||
[_tag substringFromIndex: 1]];
|
||||
sel = NSSelectorFromString(selName);
|
||||
|
||||
if (sel && [_src respondsToSelector: sel])
|
||||
|
|
|
@ -58,7 +58,7 @@ static float scrollerWidth;
|
|||
NSDebugLog(@"Initialize NSScrollView class\n");
|
||||
[self setRulerViewClass: [NSRulerView class]];
|
||||
scrollerWidth = [NSScroller scrollerWidth];
|
||||
[self setVersion: 1];
|
||||
[self setVersion: 2];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ static float scrollerWidth;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: start encoding\n");
|
||||
[aCoder encodeObject: _contentView];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
|
||||
|
@ -1170,47 +1170,108 @@ static float scrollerWidth;
|
|||
if (_hasVertRuler)
|
||||
[aCoder encodeObject: _vertRuler];
|
||||
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_hasHeaderView];
|
||||
if (_hasHeaderView)
|
||||
[aCoder encodeObject: _headerClipView];
|
||||
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_hasCornerView];
|
||||
|
||||
/* We do not need to encode headerview, cornerview stuff */
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: finish encoding\n");
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
int version = [aDecoder versionForClassName:
|
||||
@"NSScrollView"];
|
||||
if (version == 2)
|
||||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_contentView];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hPageScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vPageScroll];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizScroller];
|
||||
if (_hasHorizScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertScroller];
|
||||
if (_hasVertScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizRuler];
|
||||
if (_hasHorizRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizRuler];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertRuler];
|
||||
if (_hasVertRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertRuler];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHeaderView];
|
||||
if (_hasHeaderView)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_headerClipView];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasCornerView];
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_contentView];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hPageScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vPageScroll];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizScroller];
|
||||
if (_hasHorizScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertScroller];
|
||||
if (_hasVertScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizRuler];
|
||||
if (_hasHorizRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizRuler];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertRuler];
|
||||
if (_hasVertRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertRuler];
|
||||
|
||||
/* This recreates all the info about headerView, cornerView, etc */
|
||||
[self setDocumentView: [_contentView documentView]];
|
||||
[self tile];
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: finish decoding\n");
|
||||
|
||||
return self;
|
||||
/* This recreates all the info about headerView, cornerView, etc */
|
||||
/*
|
||||
[self setDocumentView: [_contentView documentView]];
|
||||
[self tile];
|
||||
*/
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: finish decoding\n");
|
||||
|
||||
return self;
|
||||
}
|
||||
else if (version == 1)
|
||||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_contentView];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hPageScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vLineScroll];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_vPageScroll];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizScroller];
|
||||
if (_hasHorizScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertScroller];
|
||||
if (_hasVertScroller)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertScroller];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHorizRuler];
|
||||
if (_hasHorizRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_horizRuler];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasVertRuler];
|
||||
if (_hasVertRuler)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_vertRuler];
|
||||
|
||||
/* This recreates all the info about headerView, cornerView, etc */
|
||||
[self setDocumentView: [_contentView documentView]];
|
||||
[self tile];
|
||||
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: finish decoding\n");
|
||||
|
||||
return self;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"unknown NSScrollView version (%d)", version);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6217,11 +6217,6 @@ byExtendingSelection: (BOOL)flag
|
|||
- (NSTableColumn *) highlightedTableColumn
|
||||
{
|
||||
return _highlightedTableColumn;
|
||||
|
||||
// TODO
|
||||
NSLog(@"Method %s is not implemented for class %s",
|
||||
"highlightedTableColumn", "NSTableView");
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) setHighlightedTableColumn: (NSTableColumn *)aTableColumn
|
||||
|
@ -6332,7 +6327,7 @@ byExtendingSelection: (BOOL)flag
|
|||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
int version = [aDecoder versionForClassName:
|
||||
NSStringFromClass([self class])];
|
||||
@"NSTableView"];
|
||||
|
||||
id aDelegate;
|
||||
|
||||
|
@ -6381,6 +6376,7 @@ byExtendingSelection: (BOOL)flag
|
|||
_selectedRow = -1;
|
||||
_editedColumn = -1;
|
||||
_editedRow = -1;
|
||||
[self tile];
|
||||
}
|
||||
else if (version == 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue