-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSYDocTabViewController.m
86 lines (68 loc) · 2.22 KB
/
SSYDocTabViewController.m
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#import "SSYDocTabViewController.h"
/*
I was going to factor much of BkmxDocTabViewController into this,
and also factor an SSYLazyView out of BkmxLazyView, but
then decided not to, because it would just be for reuse vanity that
no one would ever re-use.
*/
#if 0
@interface SSYDocTabViewController ()
@end
@implementation SSYDocTabViewController
@synthesize windowController = m_windowController ;
@synthesize awakened = m_awakened ;
- (void)logIfBadInit {
if (self) {
if (![self conformsToProtocol:@protocol(BkmxDocTabViewControls)]) {
NSLog(@"Internal Error 194-2390 %@ no conform", [self className]) ;
}
}
}
- (id)initWithNibName:(NSString*)nibNameOrNil
windowController:(BkmxDocWinCon*)windowController
bundle:(NSBundle*)nibBundleOrNil {
[self setWindowController:windowController] ;
self = [super initWithNibName:nibNameOrNil
bundle:nibBundleOrNil] ;
[self logIfBadInit] ;
return self ;
}
- (id)initWithCoder:(NSCoder*)aDecoder {
self = [super initWithCoder:aDecoder] ;
[self logIfBadInit] ;
return self ;
}
- (void)endEditing:(NSNotification*)note {
[[self windowController] endEditing] ;
}
- (void)awakeFromNib {
// Safely invoke super
[self safelySendSuperSelector:_cmd
prettyFunction:__PRETTY_FUNCTION__
arguments:nil] ;
[self setNextResponder:[[self windowController] nextResponder]] ;
[[self windowController] setNextResponder:self] ;
}
- (BOOL) tabView:(NSTabView*)tabView
shouldSelectTabViewItem:(NSTabViewItem*)tabViewItem {
return [[self windowController] tabView:tabView
shouldSelectTabViewItem:tabViewItem] ;
}
- (void) tabView:(NSTabView*)tabView
willSelectTabViewItem:(NSTabViewItem*)tabViewItem {
[[self windowController] tabView:tabView
willSelectTabViewItem:tabViewItem] ;
}
- (void) tabView:(NSTabView*)tabView
didSelectTabViewItem:(NSTabViewItem*)tabViewItem {
[[self windowController] tabView:tabView
didSelectTabViewItem:tabViewItem] ;
}
- (void)tearDown {
[self setWindowController:nil] ;
}
- (BkmxDoc*)document {
return [[self windowController] document] ;
}
@end
#endif