00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_PROGRESSBAR_H_
00023 #define _FL_PROGRESSBAR_H_
00024
00025 #include "Fl_Widget.h"
00026 #include "Fl.h"
00027 #include "fl_draw.h"
00028
00030 class FL_API Fl_ProgressBar : public Fl_Widget
00031 {
00032 public:
00033 static Fl_Named_Style* default_style;
00034
00036 Fl_ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
00037
00039 Fl_ProgressBar(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00040
00041 void range(float min, float max, float step = 1) { mMin = min; mMax = max; mStep = step; };
00042
00043 float minimum() { return mMin; }
00044 float maximum() { return mMax; }
00045 void minimum(float nm) { mMin = nm; };
00046 void maximum(float nm) { mMax = nm; };
00047
00048 void step(float step) { mPresent += step; redraw(); };
00049 float step() { return mStep; }
00050
00051 void value(float v) { mPresent = v; redraw(); }
00052 float value() const { return mPresent; }
00053
00054 void showtext(bool st) { mShowPct = st; }
00055 bool showtext() { return mShowPct; }
00056
00057 virtual void draw();
00058
00059 protected:
00060 float mMin, mMax;
00061 float mPresent, mStep;
00062 bool mShowPct;
00063 };
00064
00065 #endif