diff options
author | Brian Cully <bjc@kublai.com> | 2008-04-14 21:45:08 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-04-14 21:45:08 -0400 |
commit | 17349a5e426dc7acf1216a3767a22f69974cbca0 (patch) | |
tree | 20029d02f07ab6257cccec36d34fb312f796e1d1 /Liaison/LiScrolLView.m | |
download | liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.tar.gz liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.zip |
Initial commit.
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 |