00001 00002 00003 #ifndef __PROGRESS_H 00004 #define __PROGRESS_H 00005 00006 #include "GSemaphore.h" 00007 00009 class LgiClass Progress : public GSemaphore { 00010 protected: 00011 char *Description; 00012 int Start; 00013 int Val; 00014 int Low, High; 00015 char *Type; 00016 double Scale; 00017 bool Canceled; 00018 00019 public: 00020 uint64 UserData; 00021 00022 Progress(); 00023 Progress(char *desc, int l, int h, char *type = NULL, double scale = 1.0); 00024 virtual ~Progress(); 00025 00026 virtual char *GetDescription() { return Description; } 00027 virtual void SetDescription(char *d = 0); 00028 virtual void GetLimits(int *l, int *h); 00029 virtual void SetLimits(int l, int h); 00030 virtual int Value() { return Val; } 00031 virtual void Value(int v) { Val = v; } 00032 virtual double GetScale() { return Scale; } 00033 virtual void SetScale(double s) { Scale = s; } 00034 virtual char *GetType() { return Type; } 00035 virtual void SetType(char *t) { Type = t; } 00036 00037 virtual bool Cancel() { return Canceled; } 00038 virtual void Cancel(bool i) { Canceled = i; } 00039 virtual void SetParameter(int Which, int What) {} 00040 00041 virtual Progress &operator =(Progress &p); 00042 }; 00043 00044 00045 #endif