From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/llui/llviewborder.h | 57 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 16 deletions(-) (limited to 'indra/llui/llviewborder.h') diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h index a40e6534a8..37e13fb181 100644 --- a/indra/llui/llviewborder.h +++ b/indra/llui/llviewborder.h @@ -35,15 +35,41 @@ #include "llview.h" - class LLViewBorder : public LLView { public: - enum EBevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE }; - enum EStyle { STYLE_LINE, STYLE_TEXTURE }; - - LLViewBorder( const std::string& name, const LLRect& rect, EBevel bevel = BEVEL_OUT, EStyle style = STYLE_LINE, S32 width = 1 ); - + typedef enum e_bevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE } EBevel ; + typedef enum e_style { STYLE_LINE, STYLE_TEXTURE } EStyle; + + struct BevelValues + : public LLInitParam::TypeValuesHelper + { + static void declareValues(); + }; + + struct StyleValues + : public LLInitParam::TypeValuesHelper + { + static void declareValues(); + }; + + struct Params : public LLInitParam::Block + { + Optional bevel_type; + Optional render_style; + Optional border_thickness; + + Optional highlight_light_color, + highlight_dark_color, + shadow_light_color, + shadow_dark_color; + + Params(); + }; +protected: + LLViewBorder(const Params&); + friend class LLUICtrlFactory; +public: virtual void setValue(const LLSD& val) { setRect(LLRect(val)); } virtual BOOL isCtrl() const { return FALSE; } @@ -51,7 +77,6 @@ public: // llview functionality virtual void draw(); - static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style); void setBorderWidth(S32 width) { mBorderWidth = width; } @@ -63,8 +88,8 @@ public: const LLColor4& highlight_light, const LLColor4& highlight_dark ); void setTexture( const class LLUUID &image_id ); - LLColor4 getHighlightLight() {return mHighlightLight;} - LLColor4 getShadowDark() {return mHighlightDark;} + LLColor4 getHighlightLight() {return mHighlightLight.get();} + LLColor4 getShadowDark() {return mHighlightDark.get();} EStyle getStyle() const { return mStyle; } @@ -77,14 +102,14 @@ private: void drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y ); EBevel mBevel; - const EStyle mStyle; - LLColor4 mHighlightLight; - LLColor4 mHighlightDark; - LLColor4 mShadowLight; - LLColor4 mShadowDark; - LLColor4 mBackgroundColor; + EStyle mStyle; + LLUIColor mHighlightLight; + LLUIColor mHighlightDark; + LLUIColor mShadowLight; + LLUIColor mShadowDark; + LLUIColor mBackgroundColor; S32 mBorderWidth; - LLUIImagePtr mTexture; + LLPointer mTexture; BOOL mHasKeyboardFocus; }; -- cgit v1.2.3