@@ -120,14 +120,14 @@ - (void)dealloc {
120
120
#pragma mark -
121
121
#pragma mark Accessors
122
122
123
- - (PSMTabBarControl *)controlView {
124
- return (PSMTabBarControl *)[super controlView ];
125
- }
126
-
127
- - (void )setControlView : (PSMTabBarControl *)newControl {
128
- [super setControlView: newControl];
129
- }
130
-
123
+ // - (PSMTabBarControl *)controlView {
124
+ // return (PSMTabBarControl *)[super controlView];
125
+ // }
126
+ //
127
+ // - (void)setControlView:(PSMTabBarControl *)newControl {
128
+ // [super setControlView:newControl];
129
+ // }
130
+ //
131
131
- (CGFloat )width {
132
132
return _frame.size .width ;
133
133
}
@@ -139,7 +139,7 @@ - (NSRect)frame {
139
139
- (void )setFrame : (NSRect )rect {
140
140
_frame = rect;
141
141
142
- PSMTabBarControl *tabBarControl = [self controlView ];
142
+ PSMTabBarControl *tabBarControl = (PSMTabBarControl *) [self controlView ];
143
143
144
144
// move the status indicator along with the rest of the cell
145
145
if (![[self indicator ] isHidden ] && ![tabBarControl isTabBarHidden ]) {
@@ -152,7 +152,7 @@ - (void)setTitle:(NSString *)aString {
152
152
[super setTitle: aString];
153
153
_attributedStringSize = [[self attributedStringValue ] size ];
154
154
// need to redisplay now - binding observation was too quick.
155
- [[self controlView ] update ];
155
+ [(PSMTabBarControl *) [self controlView ] update ];
156
156
}
157
157
158
158
- (NSSize )attributedStringSize {
@@ -191,7 +191,7 @@ - (void)setIsInOverflowMenu:(BOOL)value {
191
191
if (_isInOverflowMenu != value) {
192
192
_isInOverflowMenu = value;
193
193
194
- PSMTabBarControl *tabBarControl = [self controlView ];
194
+ PSMTabBarControl *tabBarControl = (PSMTabBarControl *) [self controlView ];
195
195
196
196
if ([[tabBarControl delegate ] respondsToSelector: @selector (tabView:tabViewItem:isInOverflowMenu: )]) {
197
197
[[tabBarControl delegate ] tabView: [tabBarControl tabView ] tabViewItem: [self representedObject ] isInOverflowMenu: _isInOverflowMenu];
@@ -200,7 +200,7 @@ - (void)setIsInOverflowMenu:(BOOL)value {
200
200
}
201
201
202
202
- (BOOL )closeButtonOver {
203
- return (_closeButtonOver && ([[self controlView ] allowsBackgroundTabClosing ] || ([self tabState ] & PSMTab_SelectedMask) || [[NSApp currentEvent ] modifierFlags ] & NSCommandKeyMask ));
203
+ return (_closeButtonOver && ([(PSMTabBarControl *) [self controlView ] allowsBackgroundTabClosing ] || ([self tabState ] & PSMTab_SelectedMask) || [[NSApp currentEvent ] modifierFlags ] & NSCommandKeyMask ));
204
204
}
205
205
206
206
- (void )setCloseButtonOver : (BOOL )value {
@@ -248,7 +248,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
248
248
249
249
- (NSImage *)closeButtonImageOfType : (PSMCloseButtonImageType)type {
250
250
251
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
251
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
252
252
253
253
if ([tabStyle respondsToSelector: @selector (closeButtonImageOfType:forTabCell: )]) {
254
254
return [tabStyle closeButtonImageOfType: type forTabCell: self ];
@@ -263,7 +263,7 @@ - (NSImage *)closeButtonImageOfType:(PSMCloseButtonImageType)type {
263
263
#pragma mark Determining Cell Size
264
264
265
265
- (NSRect )drawingRectForBounds : (NSRect )theRect {
266
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
266
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
267
267
if ([tabStyle respondsToSelector: @selector (drawingRectForBounds:ofTabCell: )])
268
268
return [tabStyle drawingRectForBounds: theRect ofTabCell: self ];
269
269
else
@@ -272,7 +272,7 @@ - (NSRect)drawingRectForBounds:(NSRect)theRect {
272
272
273
273
- (NSRect )titleRectForBounds : (NSRect )theRect {
274
274
275
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
275
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
276
276
if ([tabStyle respondsToSelector: @selector (titleRectForBounds:ofTabCell: )])
277
277
return [tabStyle titleRectForBounds: theRect ofTabCell: self ];
278
278
else {
@@ -282,7 +282,7 @@ - (NSRect)titleRectForBounds:(NSRect)theRect {
282
282
283
283
- (NSRect )iconRectForBounds : (NSRect )theRect {
284
284
285
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
285
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
286
286
if ([tabStyle respondsToSelector: @selector (iconRectForBounds:ofTabCell: )]) {
287
287
return [tabStyle iconRectForBounds: theRect ofTabCell: self ];
288
288
} else {
@@ -296,7 +296,7 @@ - (NSRect)largeImageRectForBounds:(NSRect)theRect {
296
296
if ([(PSMTabBarControl *)[self controlView ] orientation ] == PSMTabBarHorizontalOrientation)
297
297
return NSZeroRect ;
298
298
299
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
299
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
300
300
if ([tabStyle respondsToSelector: @selector (largeImageRectForBounds:ofTabCell: )]) {
301
301
return [tabStyle largeImageRectForBounds: theRect ofTabCell: self ];
302
302
} else {
@@ -306,7 +306,7 @@ - (NSRect)largeImageRectForBounds:(NSRect)theRect {
306
306
307
307
- (NSRect )indicatorRectForBounds : (NSRect )theRect {
308
308
309
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
309
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
310
310
if ([tabStyle respondsToSelector: @selector (indicatorRectForBounds:ofTabCell: )])
311
311
return [tabStyle indicatorRectForBounds: theRect ofTabCell: self ];
312
312
else {
@@ -329,7 +329,7 @@ - (NSSize)objectCounterSize
329
329
330
330
- (NSRect )objectCounterRectForBounds : (NSRect )theRect {
331
331
332
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
332
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
333
333
if ([tabStyle respondsToSelector: @selector (objectCounterRectForBounds:ofTabCell: )]) {
334
334
return [tabStyle objectCounterRectForBounds: theRect ofTabCell: self ];
335
335
} else {
@@ -339,7 +339,7 @@ - (NSRect)objectCounterRectForBounds:(NSRect)theRect {
339
339
340
340
- (NSRect )closeButtonRectForBounds : (NSRect )theRect {
341
341
342
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
342
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
343
343
344
344
// ask style for rect if available
345
345
if ([tabStyle respondsToSelector: @selector (closeButtonRectForBounds:ofTabCell: )]) {
@@ -352,7 +352,7 @@ - (NSRect)closeButtonRectForBounds:(NSRect)theRect {
352
352
353
353
- (CGFloat )minimumWidthOfCell {
354
354
355
- id < PSMTabStyle > style = [[self controlView ] style ];
355
+ id < PSMTabStyle > style = [(PSMTabBarControl *) [self controlView ] style ];
356
356
if ([style respondsToSelector: @selector (minimumWidthOfTabCell: )]) {
357
357
return [style minimumWidthOfTabCell: self ];
358
358
} else {
@@ -362,7 +362,7 @@ - (CGFloat)minimumWidthOfCell {
362
362
363
363
- (CGFloat )desiredWidthOfCell {
364
364
365
- id < PSMTabStyle > style = [[self controlView ] style ];
365
+ id < PSMTabStyle > style = [(PSMTabBarControl *) [self controlView ] style ];
366
366
if ([style respondsToSelector: @selector (desiredWidthOfTabCell: )]) {
367
367
return [style desiredWidthOfTabCell: self ];
368
368
} else {
@@ -581,7 +581,7 @@ - (void)addTrackingAreasForView:(NSView *)controlView inRect:(NSRect)cellFrame w
581
581
582
582
- (void )mouseEntered : (NSEvent *)theEvent {
583
583
584
- PSMTabBarControl *tabBarControl = [self controlView ];
584
+ PSMTabBarControl *tabBarControl = (PSMTabBarControl *) [self controlView ];
585
585
NSDictionary *userInfo = [theEvent userData ];
586
586
587
587
NSUInteger type = [[userInfo objectForKey: @" type" ] unsignedIntegerValue ];
@@ -609,7 +609,7 @@ - (void)mouseEntered:(NSEvent *)theEvent {
609
609
610
610
- (void )mouseExited : (NSEvent *)theEvent {
611
611
612
- PSMTabBarControl *tabBarControl = [self controlView ];
612
+ PSMTabBarControl *tabBarControl = (PSMTabBarControl *) [self controlView ];
613
613
NSDictionary *userInfo = [theEvent userData ];
614
614
615
615
NSUInteger type = [[userInfo objectForKey: @" type" ] unsignedIntegerValue ];
@@ -635,9 +635,9 @@ - (void)mouseExited:(NSEvent *)theEvent {
635
635
#pragma mark Drag Support
636
636
637
637
- (NSRect )draggingRect {
638
- id <PSMTabStyle> tabStyle = [[self controlView ] style ];
638
+ id <PSMTabStyle> tabStyle = [(PSMTabBarControl *) [self controlView ] style ];
639
639
if ([tabStyle respondsToSelector: @selector (dragRectForTabCell:ofTabBarControl: )])
640
- return [tabStyle dragRectForTabCell: self ofTabBarControl: [self controlView ]];
640
+ return [tabStyle dragRectForTabCell: self ofTabBarControl: (PSMTabBarControl *) [self controlView ]];
641
641
else
642
642
return [self _draggingRect ];
643
643
}
@@ -646,7 +646,7 @@ - (NSImage *)dragImage {
646
646
647
647
NSRect cellFrame = [self draggingRect ];
648
648
649
- PSMTabBarControl *tabBarControl = [self controlView ];
649
+ PSMTabBarControl *tabBarControl = (PSMTabBarControl *) [self controlView ];
650
650
651
651
[tabBarControl lockFocus ];
652
652
NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc ] initWithFocusedViewRect: cellFrame] autorelease ];
@@ -733,10 +733,10 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
733
733
} else if ([attribute isEqualToString: NSAccessibilityTitleAttribute ]) {
734
734
attributeValue = [self title ];
735
735
} else if ([attribute isEqualToString: NSAccessibilityHelpAttribute ]) {
736
- if ([[[self controlView ] delegate ] respondsToSelector: @selector (accessibilityStringForTabView:objectCount: )]) {
736
+ if ([[(PSMTabBarControl *) [self controlView ] delegate ] respondsToSelector: @selector (accessibilityStringForTabView:objectCount: )]) {
737
737
attributeValue = [NSString stringWithFormat: @" %@ , %lu %@ " , [self title ],
738
738
(unsigned long )[self count ],
739
- [[[self controlView ] delegate ] accessibilityStringForTabView: [[self controlView ] tabView ] objectCount: [self count ]]];
739
+ [[(PSMTabBarControl *) [self controlView ] delegate ] accessibilityStringForTabView: [(PSMTabBarControl *) [self controlView ] tabView ] objectCount: [self count ]]];
740
740
} else {
741
741
attributeValue = [self stringValue ];
742
742
}
0 commit comments