summaryrefslogtreecommitdiff
path: root/indra/llui/llviewborder.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
commita4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch)
tree7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/llui/llviewborder.h
parent6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff)
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/llui/llviewborder.h')
-rw-r--r--indra/llui/llviewborder.h57
1 files changed, 41 insertions, 16 deletions
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<LLViewBorder::EBevel, BevelValues>
+ {
+ static void declareValues();
+ };
+
+ struct StyleValues
+ : public LLInitParam::TypeValuesHelper<LLViewBorder::EStyle, StyleValues>
+ {
+ static void declareValues();
+ };
+
+ struct Params : public LLInitParam::Block<Params, LLView::Params>
+ {
+ Optional<EBevel, BevelValues> bevel_type;
+ Optional<EStyle, StyleValues> render_style;
+ Optional<S32> border_thickness;
+
+ Optional<LLUIColor> 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<LLUIImage> mTexture;
BOOL mHasKeyboardFocus;
};