diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llstyle.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-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 '')
-rw-r--r-- | linden/indra/llui/llstyle.h | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/linden/indra/llui/llstyle.h b/linden/indra/llui/llstyle.h index 1712dc0..d6ae900 100644 --- a/linden/indra/llui/llstyle.h +++ b/linden/indra/llui/llstyle.h | |||
@@ -46,36 +46,52 @@ public: | |||
46 | 46 | ||
47 | LLStyle &operator=(const LLStyle &rhs); | 47 | LLStyle &operator=(const LLStyle &rhs); |
48 | 48 | ||
49 | virtual ~LLStyle(); | 49 | virtual ~LLStyle() { } |
50 | 50 | ||
51 | virtual void init (BOOL is_visible, const LLColor4 &color, const LLString& font_name); | 51 | virtual void init (BOOL is_visible, const LLColor4 &color, const LLString& font_name); |
52 | virtual void free (); | ||
53 | 52 | ||
54 | bool operator==(const LLStyle &rhs) const; | 53 | virtual const LLColor4& getColor() const { return mColor; } |
55 | bool operator!=(const LLStyle &rhs) const; | 54 | virtual void setColor(const LLColor4 &color) { mColor = color; } |
56 | 55 | ||
57 | virtual const LLColor4& getColor() const; | 56 | virtual BOOL isVisible() const { return mVisible; } |
58 | virtual void setColor(const LLColor4 &color); | 57 | virtual void setVisible(BOOL is_visible) { mVisible = is_visible; } |
59 | 58 | ||
60 | virtual BOOL isVisible() const; | 59 | virtual const LLString& getFontString() const { return mFontName; } |
61 | virtual void setVisible(BOOL is_visible); | ||
62 | |||
63 | virtual const LLString& getFontString() const; | ||
64 | virtual void setFontName(const LLString& fontname); | 60 | virtual void setFontName(const LLString& fontname); |
65 | virtual LLFONT_ID getFontID() const; | 61 | virtual LLFONT_ID getFontID() const { return mFontID; } |
66 | 62 | ||
67 | virtual const LLString& getLinkHREF() const; | 63 | virtual const LLString& getLinkHREF() const { return mLink; } |
68 | virtual void setLinkHREF(const LLString& fontname); | 64 | virtual void setLinkHREF(const LLString& href) { mLink = href; } |
69 | virtual BOOL isLink() const; | 65 | virtual BOOL isLink() const { return mLink.size(); } |
70 | 66 | ||
71 | virtual LLImageGL *getImage() const; | 67 | virtual LLImageGL *getImage() const { return mImagep; } |
72 | virtual void setImage(const LLString& src); | 68 | virtual void setImage(const LLString& src); |
73 | virtual BOOL isImage() const; | 69 | virtual BOOL isImage() const { return ((mImageWidth != 0) && (mImageHeight != 0)); } |
74 | virtual void setImageSize(S32 width, S32 height); | 70 | virtual void setImageSize(S32 width, S32 height); |
75 | 71 | ||
76 | BOOL getIsEmbeddedItem() const { return mIsEmbeddedItem; } | 72 | BOOL getIsEmbeddedItem() const { return mIsEmbeddedItem; } |
77 | void setIsEmbeddedItem( BOOL b ) { mIsEmbeddedItem = b; } | 73 | void setIsEmbeddedItem( BOOL b ) { mIsEmbeddedItem = b; } |
78 | 74 | ||
75 | // inlined here to make it easier to compare to member data below. -MG | ||
76 | bool operator==(const LLStyle &rhs) const | ||
77 | { | ||
78 | return | ||
79 | mVisible == rhs.isVisible() | ||
80 | && mColor == rhs.getColor() | ||
81 | && mFontName == rhs.getFontString() | ||
82 | && mLink == rhs.getLinkHREF() | ||
83 | && mImagep == rhs.mImagep | ||
84 | && mImageHeight == rhs.mImageHeight | ||
85 | && mImageWidth == rhs.mImageWidth | ||
86 | && mItalic == rhs.mItalic | ||
87 | && mBold == rhs.mBold | ||
88 | && mUnderline == rhs.mUnderline | ||
89 | && mDropShadow == rhs.mDropShadow | ||
90 | && mIsEmbeddedItem == rhs.mIsEmbeddedItem; | ||
91 | } | ||
92 | |||
93 | bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); } | ||
94 | |||
79 | public: | 95 | public: |
80 | BOOL mItalic; | 96 | BOOL mItalic; |
81 | BOOL mBold; | 97 | BOOL mBold; |
@@ -84,14 +100,13 @@ public: | |||
84 | S32 mImageWidth; | 100 | S32 mImageWidth; |
85 | S32 mImageHeight; | 101 | S32 mImageHeight; |
86 | 102 | ||
87 | protected: | 103 | private: |
88 | BOOL mVisible; | 104 | BOOL mVisible; |
89 | LLColor4 mColor; | 105 | LLColor4 mColor; |
90 | LLString mFontName; | 106 | LLString mFontName; |
91 | LLFONT_ID mFontID; | 107 | LLFONT_ID mFontID; |
92 | LLString mLink; | 108 | LLString mLink; |
93 | LLPointer<LLImageGL> mImagep; | 109 | LLPointer<LLImageGL> mImagep; |
94 | |||
95 | BOOL mIsEmbeddedItem; | 110 | BOOL mIsEmbeddedItem; |
96 | }; | 111 | }; |
97 | 112 | ||