From 1dedd3de05503067b36096007eeb0bb6a6204587 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 19 Apr 2011 16:16:54 -0700 Subject: EXP-648 FIX As a developer, I want to be able to specify param blocks that use Multiple for a sequence of images Factored out param block data classes so that specialized param block types, such as LLUIImage, LLFontGL, LLRect, etc. can be stored in a Multiple context Converted loading_indicator to take image sequence from XUI deprecated name-value pairs for LLUIColor values, and put them in colors.xml --- indra/llui/llui.h | 79 +++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 49 deletions(-) (limited to 'indra/llui/llui.h') diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 50cb9e6632..6a43477693 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -398,10 +398,10 @@ public: namespace LLInitParam { template<> - class TypedParam - : public BlockValue + class ParamValue > + : public CustomParamValue { - typedef BlockValue super_t; + typedef CustomParamValue super_t; public: Optional left, top, @@ -410,62 +410,43 @@ namespace LLInitParam width, height; - TypedParam(BlockDescriptor& descriptor, const char* name, const LLRect& value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); + ParamValue(const LLRect& value); - void setValueFromBlock() const; - void setBlockFromValue(); + void updateValueFromBlock(); + void updateBlockFromValue(); }; template<> - struct TypeValues : public TypeValuesHelper + class ParamValue > + : public CustomParamValue { - static void declareValues(); - }; + typedef CustomParamValue super_t; - template<> - class TypedParam - : public BlockValue - { - typedef BlockValue super_t; public: - Optional red, - green, - blue, - alpha; - Optional control; - - TypedParam(BlockDescriptor& descriptor, const char* name, const LLUIColor& value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); - void setValueFromBlock() const; - void setBlockFromValue(); + Optional red, + green, + blue, + alpha; + Optional control; + + ParamValue(const LLUIColor& color); + void updateValueFromBlock(); + void updateBlockFromValue(); }; - // provide a better default for Optional than NULL - template <> - struct DefaultInitializer - { - // return reference to a single default instance of T - // built-in types will be initialized to zero, default constructor otherwise - static const LLFontGL* get() - { - static const LLFontGL* sDefaultFont = LLFontGL::getFontDefault(); - return sDefaultFont; - } - }; - - template<> - class TypedParam - : public BlockValue + class ParamValue > + : public CustomParamValue { - typedef BlockValue super_t; + typedef CustomParamValue super_t; public: Optional name, size, style; - TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL* const value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); - void setValueFromBlock() const; - void setBlockFromValue(); + ParamValue(const LLFontGL* value); + void updateValueFromBlock(); + void updateBlockFromValue(); }; template<> @@ -494,17 +475,17 @@ namespace LLInitParam template<> - class TypedParam - : public BlockValue + class ParamValue > + : public CustomParamValue { - typedef BlockValue super_t; + typedef CustomParamValue super_t; public: Optional x, y; - TypedParam(BlockDescriptor& descriptor, const char* name, LLCoordGL value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); - void setValueFromBlock() const; - void setBlockFromValue(); + ParamValue(const LLCoordGL& val); + void updateValueFromBlock(); + void updateBlockFromValue(); }; } -- cgit v1.2.3