/** * @file lluicolortable.h * @brief brief LLUIColorTable class header file * * $LicenseInfo:firstyear=2009&license=viewergpl$ * Copyright (c) 2009, Linden Research, Inc. * $/LicenseInfo$ */ #ifndef LL_LLUICOLORTABLE_H_ #define LL_LLUICOLORTABLE_H_ #include #include "llinitparam.h" #include "llsingleton.h" #include "v4color.h" class LLUIColorTable : public LLSingleton { public: struct ColorParams : LLInitParam::Choice { Alternative value; Alternative reference; ColorParams(); }; struct ColorEntryParams : LLInitParam::Block { Mandatory name; Mandatory color; ColorEntryParams(); }; struct Params : LLInitParam::Block { Multiple color_entries; Params(); }; // define colors by passing in a param block that can be generated via XUI file or manually void init(const Params& p); // color lookup const LLColor4& getColor(const std::string& name) const; private: // consider using sorted vector typedef std::map string_color_map_t; string_color_map_t mColors; }; #endif // LL_LLUICOLORTABLE_H