blob: 2441ed0eb18216fe46ff8515f922e44ca3095d44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|