aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llstyle.cpp
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/llstyle.cpp
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 '')
-rw-r--r--linden/indra/llui/llstyle.cpp94
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
74LLStyle::~LLStyle()
75{
76 free();
77}
78
79void LLStyle::init(BOOL is_visible, const LLColor4 &color, const LLString& font_name) 74void 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
94void LLStyle::free()
95{
96}
97
98LLFONT_ID LLStyle::getFontID() const
99{
100 return mFontID;
101}
102 89
103// Copy assignment 90// Copy assignment
104LLStyle &LLStyle::operator=(const LLStyle &rhs) 91LLStyle &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
126bool 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
147bool LLStyle::operator!=(const LLStyle& rhs) const
148{
149 return !(*this == rhs);
150}
151
152
153const LLColor4& LLStyle::getColor() const
154{
155 return(mColor);
156}
157
158void LLStyle::setColor(const LLColor4 &color)
159{
160 mColor = color;
161}
162
163const LLString& LLStyle::getFontString() const
164{
165 return mFontName;
166}
167 112
168void LLStyle::setFontName(const LLString& fontname) 113void LLStyle::setFontName(const LLString& fontname)
169{ 114{
@@ -192,52 +137,15 @@ void LLStyle::setFontName(const LLString& fontname)
192 } 137 }
193} 138}
194 139
195const LLString& LLStyle::getLinkHREF() const
196{
197 return mLink;
198}
199
200void LLStyle::setLinkHREF(const LLString& href)
201{
202 mLink = href;
203}
204
205BOOL LLStyle::isLink() const
206{
207 return mLink.size();
208}
209
210BOOL LLStyle::isVisible() const
211{
212 return mVisible;
213}
214
215void LLStyle::setVisible(BOOL is_visible)
216{
217 mVisible = is_visible;
218}
219
220LLImageGL *LLStyle::getImage() const
221{
222 return mImagep;
223}
224 140
225void LLStyle::setImage(const LLString& src) 141void 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
237BOOL LLStyle::isImage() const
238{
239 return ((mImageWidth != 0) && (mImageHeight != 0));
240}
241 149
242void LLStyle::setImageSize(S32 width, S32 height) 150void LLStyle::setImageSize(S32 width, S32 height)
243{ 151{