aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llviewborder.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llviewborder.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llviewborder.h')
-rw-r--r--linden/indra/llui/llviewborder.h38
1 files changed, 15 insertions, 23 deletions
diff --git a/linden/indra/llui/llviewborder.h b/linden/indra/llui/llviewborder.h
index d9c2916..4e5dfee 100644
--- a/linden/indra/llui/llviewborder.h
+++ b/linden/indra/llui/llviewborder.h
@@ -1,6 +1,6 @@
1/** 1/**
2 * @file llviewborder.h 2 * @file llviewborder.h
3 * @brief LLViewBorder base class 3 * @brief A customizable decorative border. Does not interact with mouse events.
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
@@ -29,64 +29,56 @@
29 * $/LicenseInfo$ 29 * $/LicenseInfo$
30 */ 30 */
31 31
32// A customizable decorative border. Does not interact with mouse events.
33
34#ifndef LL_LLVIEWBORDER_H 32#ifndef LL_LLVIEWBORDER_H
35#define LL_LLVIEWBORDER_H 33#define LL_LLVIEWBORDER_H
36 34
37#include "llview.h" 35#include "llview.h"
38#include "v4color.h"
39#include "lluuid.h"
40#include "llimagegl.h"
41#include "llxmlnode.h"
42
43class LLUUID;
44class LLUICtrlFactory;
45 36
46 37
47class LLViewBorder : public LLView 38class LLViewBorder : public LLView
48{ 39{
49public: 40public:
50 enum EBevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE }; 41 enum EBevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE };
51
52 enum EStyle { STYLE_LINE, STYLE_TEXTURE }; 42 enum EStyle { STYLE_LINE, STYLE_TEXTURE };
53 43
54 LLViewBorder( const LLString& name, const LLRect& rect, EBevel bevel = BEVEL_OUT, EStyle style = STYLE_LINE, S32 width = 1 ); 44 LLViewBorder( const LLString& name, const LLRect& rect, EBevel bevel = BEVEL_OUT, EStyle style = STYLE_LINE, S32 width = 1 );
55 45
56 virtual void setValue(const LLSD& val); 46 virtual void setValue(const LLSD& val) { setRect(LLRect(val)); }
57 virtual EWidgetType getWidgetType() const; 47 virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_VIEW_BORDER; }
58 virtual LLString getWidgetTag() const; 48 virtual LLString getWidgetTag() const { return LL_VIEW_BORDER_TAG; }
59 49
60 virtual BOOL isCtrl() const; 50 virtual BOOL isCtrl() const { return FALSE; }
61 51
62 // llview functionality 52 // llview functionality
63 virtual void draw(); 53 virtual void draw();
64 54
65 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 55 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
66 static bool getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style); 56 static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style);
67 57
68 void setBorderWidth(S32 width) { mBorderWidth = width; } 58 void setBorderWidth(S32 width) { mBorderWidth = width; }
59 S32 getBorderWidth() const { return mBorderWidth; }
69 void setBevel(EBevel bevel) { mBevel = bevel; } 60 void setBevel(EBevel bevel) { mBevel = bevel; }
61 EBevel getBevel() const { return mBevel; }
70 void setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light ); 62 void setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light );
71 void setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark, 63 void setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
72 const LLColor4& highlight_light, const LLColor4& highlight_dark ); 64 const LLColor4& highlight_light, const LLColor4& highlight_dark );
73 void setTexture( const LLUUID &image_id ); 65 void setTexture( const class LLUUID &image_id );
66
67 LLColor4 getHighlightLight() {return mHighlightLight;}
68 LLColor4 getShadowDark() {return mHighlightDark;}
74 69
75 EBevel getBevel() const { return mBevel; }
76 EStyle getStyle() const { return mStyle; } 70 EStyle getStyle() const { return mStyle; }
77 S32 getBorderWidth() const { return mBorderWidth; }
78 71
79 void setKeyboardFocusHighlight( BOOL b ) { mHasKeyboardFocus = b; } 72 void setKeyboardFocusHighlight( BOOL b ) { mHasKeyboardFocus = b; }
80 73
81protected: 74private:
82 void drawOnePixelLines(); 75 void drawOnePixelLines();
83 void drawTwoPixelLines(); 76 void drawTwoPixelLines();
84 void drawTextures(); 77 void drawTextures();
85 void drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y ); 78 void drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y );
86 79
87protected:
88 EBevel mBevel; 80 EBevel mBevel;
89 EStyle mStyle; 81 const EStyle mStyle;
90 LLColor4 mHighlightLight; 82 LLColor4 mHighlightLight;
91 LLColor4 mHighlightDark; 83 LLColor4 mHighlightDark;
92 LLColor4 mShadowLight; 84 LLColor4 mShadowLight;