00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00033 #ifndef PG_PROGRESSBAR_H
00034 #define PG_PROGRESSBAR_H
00035
00036 #include "pgthemewidget.h"
00037
00045
00046
00047
00048
00049 class DECLSPEC PG_ProgressBar : public PG_ThemeWidget {
00050 public:
00051
00053 PG_ProgressBar(PG_Widget* parent, const PG_Rect& r = PG_Rect::null, const std::string& style="Progressbar");
00054
00056 ~PG_ProgressBar();
00057
00059
00063 void SetProgress(double p);
00064
00065 void LoadThemeStyle(const std::string& widgettype);
00066
00068
00071 void SetDrawPercentage(bool drawit = true);
00072
00073 protected:
00074
00076 void eventBlit(SDL_Surface* surface, const PG_Rect& src, const PG_Rect& dst);
00077
00078 private:
00079
00080 PG_ProgressBar(const PG_ProgressBar&);
00081 PG_ProgressBar& operator=(const PG_ProgressBar&);
00082
00083 PG_Gradient my_pbGradient;
00084
00085 SDL_Surface* my_pbBackground;
00086
00087 PG_Draw::BkMode my_pbBackmode;
00088
00089 int my_pbBlend;
00090
00091 PG_Color my_colorText;
00092
00093 double my_percentCurrent;
00094
00095 bool my_drawPercentage;
00096 };
00097
00098 #endif // PG_PROGRESSBAR_H