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