00001
00018 #ifndef CUI_PROGRESSBAR_H
00019 #define CUI_PROGRESSBAR_H
00020
00021 #include "UI_Lib.h"
00022 #include "UI_types.h"
00023 #include "CUI_Widget.h"
00024
00026
00042 class GLGUI_ENTRY CUI_ProgressBar : public CUI_Widget
00043 {
00044 public:
00046 CUI_ProgressBar( CUI_UI *ui = NULL, float x = 0, float y = 0, float x2 = 1, float y2 = 1,
00047 CUI_Frame *parent = NULL, IUI_Shader *shader = NULL,
00048 IUI_Shader *cursor = NULL, CUI_CoordSys *coordsys = NULL,
00049
00050 char *text = NULL, IUI_Font *font = NULL, float textscale = 0.8,
00051 IUI_Border *border = NULL,
00052
00053 float min = 0, float max = 100, float value = 0,
00054 IUI_Shader *barshader = NULL, bool displayValue = false );
00056 virtual ~CUI_ProgressBar();
00057
00059 virtual bool Render( double dtime, IUI_Renderer *renderer );
00060
00062 virtual bool SetRange( float min, float max );
00064 virtual bool GetRange( v2_f range );
00066 virtual bool SetValue( float val );
00068 virtual float GetValue( void );
00070 virtual bool SetBarShader( IUI_Shader *shader );
00071
00073 virtual bool SetDisplayValue( bool disp )
00074 { m_displayValue = disp; return false; }
00075 protected:
00076
00078 float m_min;
00080 float m_max;
00082 float m_value;
00083
00085 IUI_Shader *m_barshader;
00086
00088 bool m_displayValue;
00089 };
00090
00091 #endif