summaryrefslogtreecommitdiff
path: root/indra/llxuixml/lluicolor.h
blob: 365f61003b49c2c120b640e6a661ae73c36f272a (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
/** 
 * @file lluicolor.h
 * @brief brief LLUIColor class header file
 *
 * $LicenseInfo:firstyear=2009&license=viewergpl$
 * Copyright (c) 2009, Linden Research, Inc.
 * $/LicenseInfo$
 */

#ifndef LL_LLUICOLOR_H_
#define LL_LLUICOLOR_H_

#include "v4color.h"

namespace LLInitParam
{
	template<typename T>
	class ParamCompare;
}

class LLUIColor
{
public:
	LLUIColor();
	LLUIColor(const LLColor4* color);
	LLUIColor(const LLColor4& color);

	void set(const LLColor4& color);
	void set(const LLColor4* color);

	const LLColor4& get() const;

	operator const LLColor4& () const;
	const LLColor4& operator()() const;

	bool isReference() const;

private:
	friend class LLInitParam::ParamCompare<LLUIColor>;

	const LLColor4* mColorPtr;
	LLColor4 mColor;
};

#endif