PageRenderTime 37ms CodeModel.GetById 33ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/llui/llprogressbar.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 66 lines | 29 code | 12 blank | 25 comment | 0 complexity | 523229e1cc960a65845afd0e7afd8837 MD5 | raw file
 1/** 
 2 * @file llprogressbar.h
 3 * @brief LLProgressBar class definition
 4 *
 5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLPROGRESSBAR_H
28#define LL_LLPROGRESSBAR_H
29
30#include "llframetimer.h"
31#include "lluictrl.h"
32#include "lluiimage.h"
33
34class LLProgressBar
35	: public LLUICtrl
36{
37public:
38	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
39	{
40		Optional<LLUIImage*>	image_bar,
41								image_fill;
42
43		Optional<LLUIColor>		color_bar,
44								color_bg;
45
46		Params();
47	};
48	LLProgressBar(const Params&);
49	virtual ~LLProgressBar();
50
51	void setValue(const LLSD& value);
52
53	/*virtual*/ void draw();
54
55private:
56	F32 mPercentDone;
57
58	LLPointer<LLUIImage>	mImageBar;
59	LLUIColor	mColorBar;
60
61	LLUIColor    mColorBackground;
62	
63	LLPointer<LLUIImage>	mImageFill;
64};
65
66#endif // LL_LLPROGRESSBAR_H