00001 00032 #ifndef LL_LLPROGRESSVIEW_H 00033 #define LL_LLPROGRESSVIEW_H 00034 00035 #include "llpanel.h" 00036 #include "llframetimer.h" 00037 00038 class LLImageRaw; 00039 class LLButton; 00040 00041 class LLProgressView : public LLPanel 00042 { 00043 public: 00044 LLProgressView(const std::string& name, const LLRect& rect); 00045 virtual ~LLProgressView(); 00046 00047 virtual EWidgetType getWidgetType() const; 00048 virtual LLString getWidgetTag() const; 00049 00050 /*virtual*/ void draw(); 00051 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); 00052 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); 00053 /*virtual*/ void setVisible(BOOL visible); 00054 00055 void setText(const LLString& text); 00056 void setPercent(const F32 percent); 00057 00058 // Set it to NULL when you want to eliminate the message. 00059 void setMessage(const LLString& msg); 00060 00061 void setCancelButtonVisible(BOOL b, const LLString& label); 00062 00063 static void onCancelButtonClicked( void* ); 00064 00065 protected: 00066 BOOL mDrawBackground; 00067 F32 mPercentDone; 00068 LLString mText; 00069 LLString mMessage; 00070 LLButton* mCancelBtn; 00071 LLFrameTimer mFadeTimer; 00072 LLFrameTimer mProgressTimer; 00073 00074 static LLProgressView* sInstance; 00075 }; 00076 00077 #endif // LL_LLPROGRESSVIEW_H