summaryrefslogtreecommitdiff
path: root/indra/newview/llprogressview.h
blob: 474a431b09d40527eba28ac8a4c035753b0d2293 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/** 
 * @file llprogressview.h
 * @brief LLProgressView class definition
 *
 * Copyright (c) 2002-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

#ifndef LL_LLPROGRESSVIEW_H
#define LL_LLPROGRESSVIEW_H

#include "llview.h"
#include "llframetimer.h"

class LLImageRaw;
class LLButton;

class LLProgressView : public LLView
{
public:
	LLProgressView(const std::string& name, const LLRect& rect);
	virtual ~LLProgressView();

	virtual EWidgetType getWidgetType() const;
	virtual LLString getWidgetTag() const;

	/*virtual*/ void draw();
	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
	/*virtual*/ void setVisible(BOOL visible);

	void setText(const LLString& text);
	void setPercent(const F32 percent);

	// Set it to NULL when you want to eliminate the message.
	void setMessage(const LLString& msg);
	
	void setCancelButtonVisible(BOOL b, const LLString& label);

	static void onCancelButtonClicked( void* );

protected:
	BOOL mDrawBackground;
	F32 mPercentDone;
	LLString mText;
	LLString mMessage;
	LLButton*	mCancelBtn;
	LLFrameTimer	mFadeTimer;
	LLFrameTimer mProgressTimer;

	static LLProgressView* sInstance;
};

#endif // LL_LLPROGRESSVIEW_H