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.cpp | |
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.cpp | 94 |
1 files changed, 1 insertions, 93 deletions
diff --git a/linden/indra/llui/llstyle.cpp b/linden/indra/llui/llstyle.cpp index 693e0be..cdf87d3 100644 --- a/linden/indra/llui/llstyle.cpp +++ b/linden/indra/llui/llstyle.cpp | |||
@@ -71,11 +71,6 @@ LLStyle::LLStyle(BOOL is_visible, const LLColor4 &color, const LLString& font_na | |||
71 | init(is_visible, color, font_name); | 71 | init(is_visible, color, font_name); |
72 | } | 72 | } |
73 | 73 | ||
74 | LLStyle::~LLStyle() | ||
75 | { | ||
76 | free(); | ||
77 | } | ||
78 | |||
79 | void LLStyle::init(BOOL is_visible, const LLColor4 &color, const LLString& font_name) | 74 | void LLStyle::init(BOOL is_visible, const LLColor4 &color, const LLString& font_name) |
80 | { | 75 | { |
81 | mVisible = is_visible; | 76 | mVisible = is_visible; |
@@ -91,14 +86,6 @@ void LLStyle::init(BOOL is_visible, const LLColor4 &color, const LLString& font_ | |||
91 | mIsEmbeddedItem = FALSE; | 86 | mIsEmbeddedItem = FALSE; |
92 | } | 87 | } |
93 | 88 | ||
94 | void LLStyle::free() | ||
95 | { | ||
96 | } | ||
97 | |||
98 | LLFONT_ID LLStyle::getFontID() const | ||
99 | { | ||
100 | return mFontID; | ||
101 | } | ||
102 | 89 | ||
103 | // Copy assignment | 90 | // Copy assignment |
104 | LLStyle &LLStyle::operator=(const LLStyle &rhs) | 91 | LLStyle &LLStyle::operator=(const LLStyle &rhs) |
@@ -122,48 +109,6 @@ LLStyle &LLStyle::operator=(const LLStyle &rhs) | |||
122 | return *this; | 109 | return *this; |
123 | } | 110 | } |
124 | 111 | ||
125 | // Compare | ||
126 | bool LLStyle::operator==(const LLStyle &rhs) const | ||
127 | { | ||
128 | if ((mVisible != rhs.isVisible()) | ||
129 | || (mColor != rhs.getColor()) | ||
130 | || (mFontName != rhs.getFontString()) | ||
131 | || (mLink != rhs.getLinkHREF()) | ||
132 | || (mImagep != rhs.mImagep) | ||
133 | || (mImageHeight != rhs.mImageHeight) | ||
134 | || (mImageWidth != rhs.mImageWidth) | ||
135 | || (mItalic != rhs.mItalic) | ||
136 | || (mBold != rhs.mBold) | ||
137 | || (mUnderline != rhs.mUnderline) | ||
138 | || (mDropShadow != rhs.mDropShadow) | ||
139 | || (mIsEmbeddedItem != rhs.mIsEmbeddedItem) | ||
140 | ) | ||
141 | { | ||
142 | return FALSE; | ||
143 | } | ||
144 | return TRUE; | ||
145 | } | ||
146 | |||
147 | bool LLStyle::operator!=(const LLStyle& rhs) const | ||
148 | { | ||
149 | return !(*this == rhs); | ||
150 | } | ||
151 | |||
152 | |||
153 | const LLColor4& LLStyle::getColor() const | ||
154 | { | ||
155 | return(mColor); | ||
156 | } | ||
157 | |||
158 | void LLStyle::setColor(const LLColor4 &color) | ||
159 | { | ||
160 | mColor = color; | ||
161 | } | ||
162 | |||
163 | const LLString& LLStyle::getFontString() const | ||
164 | { | ||
165 | return mFontName; | ||
166 | } | ||
167 | 112 | ||
168 | void LLStyle::setFontName(const LLString& fontname) | 113 | void LLStyle::setFontName(const LLString& fontname) |
169 | { | 114 | { |
@@ -192,52 +137,15 @@ void LLStyle::setFontName(const LLString& fontname) | |||
192 | } | 137 | } |
193 | } | 138 | } |
194 | 139 | ||
195 | const LLString& LLStyle::getLinkHREF() const | ||
196 | { | ||
197 | return mLink; | ||
198 | } | ||
199 | |||
200 | void LLStyle::setLinkHREF(const LLString& href) | ||
201 | { | ||
202 | mLink = href; | ||
203 | } | ||
204 | |||
205 | BOOL LLStyle::isLink() const | ||
206 | { | ||
207 | return mLink.size(); | ||
208 | } | ||
209 | |||
210 | BOOL LLStyle::isVisible() const | ||
211 | { | ||
212 | return mVisible; | ||
213 | } | ||
214 | |||
215 | void LLStyle::setVisible(BOOL is_visible) | ||
216 | { | ||
217 | mVisible = is_visible; | ||
218 | } | ||
219 | |||
220 | LLImageGL *LLStyle::getImage() const | ||
221 | { | ||
222 | return mImagep; | ||
223 | } | ||
224 | 140 | ||
225 | void LLStyle::setImage(const LLString& src) | 141 | void LLStyle::setImage(const LLString& src) |
226 | { | 142 | { |
227 | if (src.size() < UUID_STR_LENGTH - 1) | 143 | if (src.size() >= UUID_STR_LENGTH - 1) |
228 | { | ||
229 | return; | ||
230 | } | ||
231 | else | ||
232 | { | 144 | { |
233 | mImagep = LLUI::sImageProvider->getImageByID(LLUUID(src)); | 145 | mImagep = LLUI::sImageProvider->getImageByID(LLUUID(src)); |
234 | } | 146 | } |
235 | } | 147 | } |
236 | 148 | ||
237 | BOOL LLStyle::isImage() const | ||
238 | { | ||
239 | return ((mImageWidth != 0) && (mImageHeight != 0)); | ||
240 | } | ||
241 | 149 | ||
242 | void LLStyle::setImageSize(S32 width, S32 height) | 150 | void LLStyle::setImageSize(S32 width, S32 height) |
243 | { | 151 | { |