~ubuntu-branches/ubuntu/quantal/viewpdf.app/quantal

1 by Gürkan Sengün
Import upstream version 0.9
1
/*
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
2
 * Copyright (C) 2004  Stefan Kleine Stegemann
1 by Gürkan Sengün
Import upstream version 0.9
3
 *
4
 * This program is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU General Public License
6
 * as published by the Free Software Foundation; either version 2
7
 * of the License, or (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17
 */
18
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
19
#import "ExtendedScrollView.h"
20
21
/**
1 by Gürkan Sengün
Import upstream version 0.9
22
 * Non-Public methods.
23
 */
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
24
@interface ExtendedScrollView (Private)
25
- (void) _notifyDocumentView;
1 by Gürkan Sengün
Import upstream version 0.9
26
@end
27
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
28
1 by Gürkan Sengün
Import upstream version 0.9
29
@implementation ExtendedScrollView
30
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
31
- (void)resizeWithOldSuperviewSize:(NSSize)oldBoundsSize
32
{
33
   [super resizeWithOldSuperviewSize: oldBoundsSize];
34
   if (![self inLiveResize])
35
   {
36
      [self _notifyDocumentView];
37
   }
38
}
39
40
- (void) viewDidEndLiveResize
41
{
42
   [self _notifyDocumentView];
1 by Gürkan Sengün
Import upstream version 0.9
43
}
44
45
@end
46
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
47
/* ----------------------------------------------------- */
48
/*  Category Private                                     */
49
/* ----------------------------------------------------- */
1 by Gürkan Sengün
Import upstream version 0.9
50
51
@implementation ExtendedScrollView (Private)
52
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
53
- (void) _notifyDocumentView
54
{
55
   if ([[self documentView] respondsToSelector: @selector(scrollViewDidResize:)])
1 by Gürkan Sengün
Import upstream version 0.9
56
   {
1.1.1 by Gürkan Sengün
Import upstream version 0.2dfsg1
57
      [[self documentView] scrollViewDidResize: self];
1 by Gürkan Sengün
Import upstream version 0.9
58
   }
59
}
60
61
@end