00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 @import "CPView.j"
00024 @import "CPClipView.j"
00025 @import "CPScroller.j"
00026
00027 #include "CoreGraphics/CGGeometry.h"
00028
00029
00038 @implementation CPScrollView : CPView
00039 {
00040 CPClipView _contentView;
00041 CPClipView _headerClipView;
00042 CPView _cornerView;
00043
00044 BOOL _hasVerticalScroller;
00045 BOOL _hasHorizontalScroller;
00046 BOOL _autohidesScrollers;
00047
00048 CPScroller _verticalScroller;
00049 CPScroller _horizontalScroller;
00050
00051 int _recursionCount;
00052
00053 float _verticalLineScroll;
00054 float _verticalPageScroll;
00055 float _horizontalLineScroll;
00056 float _horizontalPageScroll;
00057 }
00058
00059 - (id)initWithFrame:(CGRect)aFrame
00060 {
00061 self = [super initWithFrame:aFrame];
00062
00063 if (self)
00064 {
00065 _verticalLineScroll = 10.0;
00066 _verticalPageScroll = 10.0;
00067
00068 _horizontalLineScroll = 10.0;
00069 _horizontalPageScroll = 10.0;
00070
00071 _contentView = [[CPClipView alloc] initWithFrame:[self bounds]];
00072
00073 [self addSubview:_contentView];
00074
00075 _headerClipView = [[CPClipView alloc] init];
00076
00077 [self addSubview:_headerClipView];
00078
00079 [self setHasVerticalScroller:YES];
00080 [self setHasHorizontalScroller:YES];
00081 }
00082
00083 return self;
00084 }
00085
00086
00090 - (CGRect)contentSize
00091 {
00092 return [_contentView frame].size;
00093 }
00094
00098 - (id)documentView
00099 {
00100 return [_contentView documentView];
00101 }
00102
00107 - (void)setContentView:(CPClipView)aContentView
00108 {
00109 if (_contentView !== aContentView || !aContentView)
00110 return;
00111
00112 var documentView = [aContentView documentView];
00113
00114 if (documentView)
00115 [documentView removeFromSuperview];
00116
00117 [_contentView removeFromSuperview];
00118
00119 _contentView = aContentView;
00120
00121 [_contentView setDocumentView:documentView];
00122
00123 [self addSubview:_contentView];
00124
00125
00126 [self reflectScrolledClipView:_contentView];
00127 }
00128
00132 - (CPClipView)contentView
00133 {
00134 return _contentView;
00135 }
00136
00141 - (void)setDocumentView:(CPView)aView
00142 {
00143 [_contentView setDocumentView:aView];
00144
00145
00146 [self _updateCornerAndHeaderView];
00147 [self reflectScrolledClipView:_contentView];
00148 }
00149
00154 - (void)reflectScrolledClipView:(CPClipView)aClipView
00155 {
00156 if(_contentView !== aClipView)
00157 return;
00158
00159 if (_recursionCount > 5)
00160 return;
00161
00162 ++_recursionCount;
00163
00164 var documentView = [self documentView];
00165
00166 if (!documentView)
00167 {
00168 if (_autohidesScrollers)
00169 {
00170 [_verticalScroller setHidden:YES];
00171 [_horizontalScroller setHidden:YES];
00172 }
00173 else
00174 {
00175
00176
00177 }
00178
00179 [_contentView setFrame:[self bounds]];
00180 [_headerClipView setFrame:_CGRectMakeZero()];
00181
00182 --_recursionCount;
00183
00184 return;
00185 }
00186
00187 var documentFrame = [documentView frame],
00188 contentFrame = [self bounds],
00189 headerClipViewFrame = [self _headerClipViewFrame],
00190 headerClipViewHeight = _CGRectGetHeight(headerClipViewFrame);
00191
00192 contentFrame.origin.y += headerClipViewHeight;
00193 contentFrame.size.height -= headerClipViewHeight;
00194
00195 var difference = _CGSizeMake(_CGRectGetWidth(documentFrame) - _CGRectGetWidth(contentFrame), _CGRectGetHeight(documentFrame) - _CGRectGetHeight(contentFrame)),
00196 verticalScrollerWidth = _CGRectGetWidth([_verticalScroller frame]),
00197 horizontalScrollerHeight = _CGRectGetHeight([_horizontalScroller frame]),
00198 hasVerticalScroll = difference.height > 0.0,
00199 hasHorizontalScroll = difference.width > 0.0,
00200 shouldShowVerticalScroller = _hasVerticalScroller && (!_autohidesScrollers || hasVerticalScroll),
00201 shouldShowHorizontalScroller = _hasHorizontalScroller && (!_autohidesScrollers || hasHorizontalScroll);
00202
00203
00204 if (shouldShowVerticalScroller)
00205 {
00206 difference.width += verticalScrollerWidth;
00207 hasHorizontalScroll = difference.width > 0.0;
00208 shouldShowHorizontalScroller = _hasHorizontalScroller && (!_autohidesScrollers || hasHorizontalScroll);
00209 }
00210
00211 if (shouldShowHorizontalScroller)
00212 {
00213 difference.height += horizontalScrollerHeight;
00214 hasVerticalScroll = difference.height > 0.0;
00215 shouldShowVerticalScroller = _hasVerticalScroller && (!_autohidesScrollers || hasVerticalScroll);
00216 }
00217
00218
00219 [_verticalScroller setHidden:!shouldShowVerticalScroller];
00220 [_verticalScroller setEnabled:hasVerticalScroll];
00221
00222 [_horizontalScroller setHidden:!shouldShowHorizontalScroller];
00223 [_horizontalScroller setEnabled:hasHorizontalScroll];
00224
00225
00226 if (shouldShowVerticalScroller)
00227 contentFrame.size.width -= verticalScrollerWidth;
00228
00229 if (shouldShowHorizontalScroller)
00230 contentFrame.size.height -= horizontalScrollerHeight;
00231
00232 var scrollPoint = [_contentView bounds].origin,
00233 wasShowingVerticalScroller = ![_verticalScroller isHidden],
00234 wasShowingHorizontalScroller = ![_horizontalScroller isHidden];
00235
00236 if (shouldShowVerticalScroller)
00237 {
00238 var verticalScrollerY = MAX(_CGRectGetHeight([self _cornerViewFrame]), headerClipViewHeight),
00239 verticalScrollerHeight = _CGRectGetHeight([self bounds]) - verticalScrollerY;
00240
00241 if (shouldShowHorizontalScroller)
00242 verticalScrollerHeight -= horizontalScrollerHeight;
00243
00244 [_verticalScroller setFloatValue:(difference.height <= 0.0) ? 0.0 : scrollPoint.y / difference.height];
00245 [_verticalScroller setKnobProportion:_CGRectGetHeight(contentFrame) / _CGRectGetHeight(documentFrame)];
00246 [_verticalScroller setFrame:_CGRectMake(_CGRectGetMaxX(contentFrame), verticalScrollerY, verticalScrollerWidth, verticalScrollerHeight)];
00247 }
00248 else if (wasShowingVerticalScroller)
00249 {
00250 [_verticalScroller setFloatValue:0.0];
00251 [_verticalScroller setKnobProportion:1.0];
00252 }
00253
00254 if (shouldShowHorizontalScroller)
00255 {
00256 [_horizontalScroller setFloatValue:(difference.width <= 0.0) ? 0.0 : scrollPoint.x / difference.width];
00257 [_horizontalScroller setKnobProportion:_CGRectGetWidth(contentFrame) / _CGRectGetWidth(documentFrame)];
00258 [_horizontalScroller setFrame:_CGRectMake(0.0, _CGRectGetMaxY(contentFrame), _CGRectGetWidth(contentFrame), horizontalScrollerHeight)];
00259 }
00260 else if (wasShowingHorizontalScroller)
00261 {
00262 [_horizontalScroller setFloatValue:0.0];
00263 [_horizontalScroller setKnobProportion:1.0];
00264 }
00265
00266 [_contentView setFrame:contentFrame];
00267 [_headerClipView setFrame:headerClipViewFrame];
00268 [_cornerView setFrame:[self _cornerViewFrame]];
00269
00270 --_recursionCount;
00271 }
00272
00273
00278 - (void)setHorizontalScroller:(CPScroller)aScroller
00279 {
00280 if (_horizontalScroller === aScroller)
00281 return;
00282
00283 [_horizontalScroller removeFromSuperview];
00284 [_horizontalScroller setTarget:nil];
00285 [_horizontalScroller setAction:nil];
00286
00287 _horizontalScroller = aScroller;
00288
00289 [_horizontalScroller setTarget:self];
00290 [_horizontalScroller setAction:@selector(_horizontalScrollerDidScroll:)];
00291
00292 [self addSubview:_horizontalScroller];
00293
00294 [self reflectScrolledClipView:_contentView];
00295 }
00296
00300 - (CPScroller)horizontalScroller
00301 {
00302 return _horizontalScroller;
00303 }
00304
00310 - (void)setHasHorizontalScroller:(BOOL)shouldHaveHorizontalScroller
00311 {
00312 if (_hasHorizontalScroller === shouldHaveHorizontalScroller)
00313 return;
00314
00315 _hasHorizontalScroller = shouldHaveHorizontalScroller;
00316
00317 if (_hasHorizontalScroller && !_horizontalScroller)
00318 {
00319 [self setHorizontalScroller:[[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, MAX(_CGRectGetWidth([self bounds]), [CPScroller scrollerWidth]+1), [CPScroller scrollerWidth])]];
00320 [[self horizontalScroller] setFrameSize:CGSizeMake(_CGRectGetWidth([self bounds]), [CPScroller scrollerWidth])];
00321 }
00322
00323 [self reflectScrolledClipView:_contentView];
00324 }
00325
00329 - (BOOL)hasHorizontalScroller
00330 {
00331 return _hasHorizontalScroller;
00332 }
00333
00338 - (void)setVerticalScroller:(CPScroller)aScroller
00339 {
00340 if (_verticalScroller === aScroller)
00341 return;
00342
00343 [_verticalScroller removeFromSuperview];
00344 [_verticalScroller setTarget:nil];
00345 [_verticalScroller setAction:nil];
00346
00347 _verticalScroller = aScroller;
00348
00349 [_verticalScroller setTarget:self];
00350 [_verticalScroller setAction:@selector(_verticalScrollerDidScroll:)];
00351
00352 [self addSubview:_verticalScroller];
00353
00354 [self reflectScrolledClipView:_contentView];
00355 }
00356
00360 - (CPScroller)verticalScroller
00361 {
00362 return _verticalScroller;
00363 }
00364
00371 - (void)setHasVerticalScroller:(BOOL)shouldHaveVerticalScroller
00372 {
00373 if (_hasVerticalScroller === shouldHaveVerticalScroller)
00374 return;
00375
00376 _hasVerticalScroller = shouldHaveVerticalScroller;
00377
00378 if (_hasVerticalScroller && !_verticalScroller)
00379 {
00380 [self setVerticalScroller:[[CPScroller alloc] initWithFrame:_CGRectMake(0.0, 0.0, [CPScroller scrollerWidth], MAX(_CGRectGetHeight([self bounds]), [CPScroller scrollerWidth]+1))]];
00381 [[self verticalScroller] setFrameSize:CGSizeMake([CPScroller scrollerWidth], _CGRectGetHeight([self bounds]))];
00382 }
00383
00384 [self reflectScrolledClipView:_contentView];
00385 }
00386
00390 - (BOOL)hasVerticalScroller
00391 {
00392 return _hasVerticalScroller;
00393 }
00394
00400 - (void)setAutohidesScrollers:(BOOL)autohidesScrollers
00401 {
00402 if (_autohidesScrollers == autohidesScrollers)
00403 return;
00404
00405 _autohidesScrollers = autohidesScrollers;
00406
00407 [self reflectScrolledClipView:_contentView];
00408 }
00409
00414 - (BOOL)autohidesScrollers
00415 {
00416 return _autohidesScrollers;
00417 }
00418
00419 - (void)_updateCornerAndHeaderView
00420 {
00421 var documentView = [self documentView],
00422 currentHeaderView = [self _headerView],
00423 documentHeaderView = [documentView respondsToSelector:@selector(headerView)] ? [documentView headerView] : nil;
00424
00425 if (currentHeaderView !== documentHeaderView)
00426 {
00427 [currentHeaderView removeFromSuperview];
00428 [_headerClipView setDocumentView:documentHeaderView];
00429 }
00430
00431 var documentCornerView = [documentView respondsToSelector:@selector(cornerView)] ? [documentView cornerView] : nil;
00432
00433 if (_cornerView !== documentCornerView)
00434 {
00435 [_cornerView removeFromSuperview];
00436
00437 _cornerView = documentCornerView;
00438
00439 if (_cornerView)
00440 [self addSubview:_cornerView];
00441 }
00442
00443 [self reflectScrolledClipView:_contentView];
00444 }
00445
00446 - (CPView)_headerView
00447 {
00448 var headerClipViewSubviews = [_headerClipView subviews];
00449
00450 return [headerClipViewSubviews count] ? headerClipViewSubviews[0] : nil;
00451 }
00452
00453 - (CGRect)_cornerViewFrame
00454 {
00455 if (!_cornerView)
00456 return _CGRectMakeZero();
00457
00458 var bounds = [self bounds],
00459 frame = [_cornerView frame];
00460
00461 frame.origin.x = _CGRectGetMaxX(bounds) - _CGRectGetWidth(frame);
00462 frame.origin.y = 0;
00463
00464 return frame;
00465 }
00466
00467 - (CGRect)_headerClipViewFrame
00468 {
00469 var headerView = [self _headerView];
00470
00471 if (!headerView)
00472 return _CGRectMakeZero();
00473
00474 var frame = [self bounds];
00475
00476 frame.size.height = _CGRectGetHeight([headerView frame]);
00477 frame.size.width -= _CGRectGetWidth([self _cornerViewFrame]);
00478
00479 return frame;
00480 }
00481
00482
00483 - (void)_verticalScrollerDidScroll:(CPScroller)aScroller
00484 {
00485 var value = [aScroller floatValue],
00486 documentFrame = [[_contentView documentView] frame];
00487 contentBounds = [_contentView bounds];
00488
00489 switch ([_verticalScroller hitPart])
00490 {
00491 case CPScrollerDecrementLine: contentBounds.origin.y -= _verticalLineScroll;
00492 break;
00493
00494 case CPScrollerIncrementLine: contentBounds.origin.y += _verticalLineScroll;
00495 break;
00496
00497 case CPScrollerDecrementPage: contentBounds.origin.y -= _CGRectGetHeight(contentBounds) - _verticalPageScroll;
00498 break;
00499
00500 case CPScrollerIncrementPage: contentBounds.origin.y += _CGRectGetHeight(contentBounds) - _verticalPageScroll;
00501 break;
00502
00503 case CPScrollerKnobSlot:
00504 case CPScrollerKnob:
00505
00506 default: contentBounds.origin.y = ROUND(value * (_CGRectGetHeight(documentFrame) - _CGRectGetHeight(contentBounds)));
00507 }
00508
00509 [_contentView scrollToPoint:contentBounds.origin];
00510 }
00511
00512
00513 - (void)_horizontalScrollerDidScroll:(CPScroller)aScroller
00514 {
00515 var value = [aScroller floatValue],
00516 documentFrame = [[self documentView] frame],
00517 contentBounds = [_contentView bounds];
00518
00519 switch ([_horizontalScroller hitPart])
00520 {
00521 case CPScrollerDecrementLine: contentBounds.origin.x -= _horizontalLineScroll;
00522 break;
00523
00524 case CPScrollerIncrementLine: contentBounds.origin.x += _horizontalLineScroll;
00525 break;
00526
00527 case CPScrollerDecrementPage: contentBounds.origin.x -= _CGRectGetWidth(contentBounds) - _horizontalPageScroll;
00528 break;
00529
00530 case CPScrollerIncrementPage: contentBounds.origin.x += _CGRectGetWidth(contentBounds) - _horizontalPageScroll;
00531 break;
00532
00533 case CPScrollerKnobSlot:
00534 case CPScrollerKnob:
00535
00536 default: contentBounds.origin.x = ROUND(value * (_CGRectGetWidth(documentFrame) - _CGRectGetWidth(contentBounds)));
00537 }
00538
00539 [_contentView scrollToPoint:contentBounds.origin];
00540 [_headerClipView scrollToPoint:CGPointMake(contentBounds.origin.x, 0.0)];
00541 }
00542
00546 - (void)tile
00547 {
00548
00549
00550
00551
00552 }
00553
00554
00555
00556
00557 -(void)resizeSubviewsWithOldSize:(CGSize)aSize
00558 {
00559 [self reflectScrolledClipView:_contentView];
00560 }
00561
00562
00567 - (void)setLineScroll:(float)aLineScroll
00568 {
00569 [self setHorizonalLineScroll:aLineScroll];
00570 [self setVerticalLineScroll:aLineScroll];
00571 }
00572
00576 - (float)lineScroll
00577 {
00578 return [self horizontalLineScroll];
00579 }
00580
00585 - (void)setHorizontalLineScroll:(float)aLineScroll
00586 {
00587 _horizontalLineScroll = aLineScroll;
00588 }
00589
00593 - (float)horizontalLineScroll
00594 {
00595 return _horizontalLineScroll;
00596 }
00597
00602 - (void)setVerticalLineScroll:(float)aLineScroll
00603 {
00604 _verticalLineScroll = aLineScroll;
00605 }
00606
00610 - (float)verticalLineScroll
00611 {
00612 return _verticalLineScroll;
00613 }
00614
00619 - (void)setPageScroll:(float)aPageScroll
00620 {
00621 [self setHorizontalPageScroll:aPageScroll];
00622 [self setVerticalPageScroll:aPageScroll];
00623 }
00624
00628 - (float)pageScroll
00629 {
00630 return [self horizontalPageScroll];
00631 }
00632
00637 - (void)setHorizontalPageScroll:(float)aPageScroll
00638 {
00639 _horizontalPageScroll = aPageScroll;
00640 }
00641
00645 - (float)horizontalPageScroll
00646 {
00647 return _horizontalPageScroll;
00648 }
00649
00654 - (void)setVerticalPageScroll:(float)aPageScroll
00655 {
00656 _verticalPageScroll = aPageScroll;
00657 }
00658
00662 - (float)verticalPageScroll
00663 {
00664 return _verticalPageScroll;
00665 }
00666
00671 - (void)scrollWheel:(CPEvent)anEvent
00672 {
00673 var documentFrame = [[self documentView] frame],
00674 contentBounds = [_contentView bounds];
00675
00676
00677 contentBounds.origin.x = ROUND(contentBounds.origin.x + [anEvent deltaX] * _horizontalLineScroll);
00678 contentBounds.origin.y = ROUND(contentBounds.origin.y + [anEvent deltaY] * _verticalLineScroll);
00679
00680 [_contentView scrollToPoint:contentBounds.origin];
00681 [_headerClipView scrollToPoint:CGPointMake(contentBounds.origin.x, 0.0)];
00682 }
00683
00684 - (void)keyDown:(CPEvent)anEvent
00685 {
00686 [self interpretKeyEvents:[anEvent]];
00687 }
00688
00689 - (void)pageUp:(id)sender
00690 {
00691 var contentBounds = [_contentView bounds];
00692 [self moveByOffset:CGSizeMake(0.0, -(_CGRectGetHeight(contentBounds) - _verticalPageScroll))];
00693 }
00694
00695 - (void)pageDown:(id)sender
00696 {
00697 var contentBounds = [_contentView bounds];
00698 [self moveByOffset:CGSizeMake(0.0, _CGRectGetHeight(contentBounds) - _verticalPageScroll)];
00699 }
00700
00701 - (void)moveLeft:(id)sender
00702 {
00703 [self moveByOffset:CGSizeMake(-_horizontalLineScroll, 0.0)];
00704 }
00705
00706 - (void)moveRight:(id)sender
00707 {
00708 [self moveByOffset:CGSizeMake(_horizontalLineScroll, 0.0)];
00709 }
00710
00711 - (void)moveUp:(id)sender
00712 {
00713 [self moveByOffset:CGSizeMake(0.0, -_verticalLineScroll)];
00714 }
00715
00716 - (void)moveDown:(id)sender
00717 {
00718 [self moveByOffset:CGSizeMake(0.0, _verticalLineScroll)];
00719 }
00720
00721 - (void)moveByOffset:(CGSize)aSize
00722 {
00723 var documentFrame = [[self documentView] frame],
00724 contentBounds = [_contentView bounds];
00725
00726 contentBounds.origin.x += aSize.width;
00727 contentBounds.origin.y += aSize.height;
00728
00729 [_contentView scrollToPoint:contentBounds.origin];
00730 [_headerClipView scrollToPoint:CGPointMake(contentBounds.origin, 0)];
00731 }
00732
00733 @end
00734
00735 var CPScrollViewContentViewKey = "CPScrollViewContentView",
00736 CPScrollViewHeaderClipViewKey = "CPScrollViewHeaderClipViewKey",
00737 CPScrollViewVLineScrollKey = "CPScrollViewVLineScroll",
00738 CPScrollViewHLineScrollKey = "CPScrollViewHLineScroll",
00739 CPScrollViewVPageScrollKey = "CPScrollViewVPageScroll",
00740 CPScrollViewHPageScrollKey = "CPScrollViewHPageScroll",
00741 CPScrollViewHasVScrollerKey = "CPScrollViewHasVScroller",
00742 CPScrollViewHasHScrollerKey = "CPScrollViewHasHScroller",
00743 CPScrollViewVScrollerKey = "CPScrollViewVScroller",
00744 CPScrollViewHScrollerKey = "CPScrollViewHScroller",
00745 CPScrollViewAutohidesScrollerKey = "CPScrollViewAutohidesScroller",
00746 CPScrollViewCornerViewKey = "CPScrollViewCornerViewKey";
00747
00748 @implementation CPScrollView (CPCoding)
00749
00750 - (id)initWithCoder:(CPCoder)aCoder
00751 {
00752 if (self = [super initWithCoder:aCoder])
00753 {
00754 _verticalLineScroll = [aCoder decodeFloatForKey:CPScrollViewVLineScrollKey];
00755 _verticalPageScroll = [aCoder decodeFloatForKey:CPScrollViewVPageScrollKey];
00756
00757 _horizontalLineScroll = [aCoder decodeFloatForKey:CPScrollViewHLineScrollKey];
00758 _horizontalPageScroll = [aCoder decodeFloatForKey:CPScrollViewHPageScrollKey];
00759
00760 _contentView = [aCoder decodeObjectForKey:CPScrollViewContentViewKey];
00761 _headerClipView = [aCoder decodeObjectForKey:CPScrollViewHeaderClipViewKey];
00762
00763 _verticalScroller = [aCoder decodeObjectForKey:CPScrollViewVScrollerKey];
00764 _horizontalScroller = [aCoder decodeObjectForKey:CPScrollViewHScrollerKey];
00765
00766 _hasVerticalScroller = [aCoder decodeBoolForKey:CPScrollViewHasVScrollerKey];
00767 _hasHorizontalScroller = [aCoder decodeBoolForKey:CPScrollViewHasHScrollerKey];
00768 _autohidesScrollers = [aCoder decodeBoolForKey:CPScrollViewAutohidesScrollerKey];
00769
00770 _cornerView = [aCoder decodeObjectForKey:CPScrollViewCornerViewKey];
00771
00772
00773 [[CPRunLoop currentRunLoop] performSelector:@selector(reflectScrolledClipView:) target:self argument:_contentView order:0 modes:[CPDefaultRunLoopMode]];
00774 }
00775
00776 return self;
00777 }
00778
00779 - (void)encodeWithCoder:(CPCoder)aCoder
00780 {
00781 [super encodeWithCoder:aCoder];
00782
00783 [aCoder encodeObject:_contentView forKey:CPScrollViewContentViewKey];
00784 [aCoder encodeObject:_headerClipView forKey:CPScrollViewHeaderClipViewKey];
00785
00786 [aCoder encodeObject:_verticalScroller forKey:CPScrollViewVScrollerKey];
00787 [aCoder encodeObject:_horizontalScroller forKey:CPScrollViewHScrollerKey];
00788
00789 [aCoder encodeFloat:_verticalLineScroll forKey:CPScrollViewVLineScrollKey];
00790 [aCoder encodeFloat:_verticalPageScroll forKey:CPScrollViewVPageScrollKey];
00791 [aCoder encodeFloat:_horizontalLineScroll forKey:CPScrollViewHLineScrollKey];
00792 [aCoder encodeFloat:_horizontalPageScroll forKey:CPScrollViewHPageScrollKey];
00793
00794 [aCoder encodeBool:_hasVerticalScroller forKey:CPScrollViewHasVScrollerKey];
00795 [aCoder encodeBool:_hasHorizontalScroller forKey:CPScrollViewHasHScrollerKey];
00796 [aCoder encodeBool:_autohidesScrollers forKey:CPScrollViewAutohidesScrollerKey];
00797
00798 [aCoder encodeObject:_cornerView forKey:CPScrollViewCornerViewKey];
00799 }
00800
00801 @end