diff options
Diffstat (limited to 'Liaison/LiScrolLView.m')
-rw-r--r-- | Liaison/LiScrolLView.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Liaison/LiScrolLView.m b/Liaison/LiScrolLView.m new file mode 100644 index 0000000..2441ed0 --- /dev/null +++ b/Liaison/LiScrolLView.m @@ -0,0 +1,34 @@ +// +// LiScrolLView.m +// Liaison +// +// Created by Brian Cully on Sat May 10 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +#import "LiScrolLView.h" + +@implementation LiScrollView +- (void)validateScrollers; +{ + BOOL horizVisible, vertVisible; + NSSize mySize, contentSize; + + mySize = [self frame].size; + contentSize = [[self documentView] frame].size; + + vertVisible = mySize.height < contentSize.height; + horizVisible = mySize.width < contentSize.width; + + [self setHasVerticalScroller: vertVisible]; + [self setHasHorizontalScroller: horizVisible]; + + return; +} + +- (void)drawRect: (NSRect)aRect +{ + [self validateScrollers]; + [super drawRect: aRect]; +} +@end |