00001
00002
00003
00004
00005
00006
00007
00008
00009 #import <Cocoa/Cocoa.h>
00010
00029 @interface HFProgressTracker : NSObject {
00030 @public
00031 volatile unsigned long long currentProgress;
00032 volatile int cancelRequested;
00033 @private
00034 unsigned long long maxProgress;
00035 NSProgressIndicator *progressIndicator;
00036 NSTimer *progressTimer;
00037 double lastSetValue;
00038 NSDictionary *userInfo;
00039 id delegate;
00040 }
00041
00045 - (void)setMaxProgress:(unsigned long long)max;
00046 - (unsigned long long)maxProgress;
00047
00051 - (void)setUserInfo:(NSDictionary *)info;
00052 - (NSDictionary *)userInfo;
00053
00057 - (void)setProgressIndicator:(NSProgressIndicator *)indicator;
00058 - (NSProgressIndicator *)progressIndicator;
00059
00063 - (void)beginTrackingProgress;
00064
00068 - (void)endTrackingProgress;
00069
00073 - (void)noteFinished:(id)sender;
00074
00078 - (void)requestCancel:(id)sender;
00079
00083 - (void)setDelegate:(id)delegate;
00084 - (id)delegate;
00085
00086 @end
00087
00088
00095 @protocol HFProgressTrackerDelegate <NSObject>
00096
00100 - (void)progressTracker:(HFProgressTracker *)tracker didChangeProgressTo:(double)fraction;
00101
00105 - (void)progressTrackerDidFinish:(HFProgressTracker *)tracker;
00106
00107 @end