2011-01-19 23:19:43 +03:00
|
|
|
//
|
|
|
|
// PSMProgressIndicator.m
|
|
|
|
// PSMTabBarControl
|
|
|
|
//
|
|
|
|
// Created by John Pannell on 2/23/06.
|
|
|
|
// Copyright 2006 Positive Spin Media. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "PSMProgressIndicator.h"
|
2011-01-26 13:52:13 +03:00
|
|
|
#import "PSMTabBarControl.h"
|
|
|
|
|
|
|
|
@interface PSMTabBarControl (PSMProgressIndicatorExtensions)
|
|
|
|
|
|
|
|
- (void)update;
|
|
|
|
|
|
|
|
@end
|
2011-01-19 23:19:43 +03:00
|
|
|
|
|
|
|
@implementation PSMProgressIndicator
|
|
|
|
|
2011-01-26 13:52:13 +03:00
|
|
|
- (id) initWithFrame: (NSRect)frameRect;
|
2011-01-19 23:19:43 +03:00
|
|
|
{
|
2011-01-26 13:52:13 +03:00
|
|
|
if ((self = [super initWithFrame: frameRect]) == nil) return nil;
|
|
|
|
[self setControlSize: NSSmallControlSize];
|
|
|
|
return self;
|
2011-01-19 23:19:43 +03:00
|
|
|
}
|
|
|
|
|
2011-01-26 13:52:13 +03:00
|
|
|
// overrides to make tab bar control re-layout things if status changes
|
|
|
|
- (void)setHidden:(BOOL)flag {
|
|
|
|
[super setHidden:flag];
|
|
|
|
[(PSMTabBarControl *)[self superview] update];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)stopAnimation:(id)sender {
|
2011-01-19 23:19:43 +03:00
|
|
|
[NSObject cancelPreviousPerformRequestsWithTarget:self
|
2011-01-26 13:52:13 +03:00
|
|
|
selector:@selector(startAnimation:)
|
|
|
|
object:nil];
|
2011-01-19 23:19:43 +03:00
|
|
|
[super stopAnimation:sender];
|
|
|
|
}
|
2011-01-26 13:52:13 +03:00
|
|
|
|
2011-01-19 23:19:43 +03:00
|
|
|
@end
|