diff options
Diffstat (limited to 'linden/indra/llui/lltextbox.cpp')
-rw-r--r-- | linden/indra/llui/lltextbox.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index 0f411b8..6997c61 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | static LLRegisterWidget<LLTextBox> r("text"); | 37 | static LLRegisterWidget<LLTextBox> r("text"); |
38 | 38 | ||
39 | LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& text, | 39 | LLTextBox::LLTextBox(const std::string& name, const LLRect& rect, const std::string& text, |
40 | const LLFontGL* font, BOOL mouse_opaque) | 40 | const LLFontGL* font, BOOL mouse_opaque) |
41 | : LLUICtrl(name, rect, mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP ), | 41 | : LLUICtrl(name, rect, mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP ), |
42 | mFontGL(font ? font : LLFontGL::sSansSerifSmall), | 42 | mFontGL(font ? font : LLFontGL::sSansSerifSmall), |
@@ -63,7 +63,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t | |||
63 | setTabStop(FALSE); | 63 | setTabStop(FALSE); |
64 | } | 64 | } |
65 | 65 | ||
66 | LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, | 66 | LLTextBox::LLTextBox(const std::string& name, const std::string& text, F32 max_width, |
67 | const LLFontGL* font, BOOL mouse_opaque) : | 67 | const LLFontGL* font, BOOL mouse_opaque) : |
68 | LLUICtrl(name, LLRect(0, 0, 1, 1), mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), | 68 | LLUICtrl(name, LLRect(0, 0, 1, 1), mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), |
69 | mFontGL(font ? font : LLFontGL::sSansSerifSmall), | 69 | mFontGL(font ? font : LLFontGL::sSansSerifSmall), |
@@ -91,7 +91,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, | |||
91 | setTabStop(FALSE); | 91 | setTabStop(FALSE); |
92 | } | 92 | } |
93 | 93 | ||
94 | LLTextBox::LLTextBox(const LLString& name_and_label, const LLRect& rect) : | 94 | LLTextBox::LLTextBox(const std::string& name_and_label, const LLRect& rect) : |
95 | LLUICtrl(name_and_label, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), | 95 | LLUICtrl(name_and_label, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), |
96 | mFontGL(LLFontGL::sSansSerifSmall), | 96 | mFontGL(LLFontGL::sSansSerifSmall), |
97 | mTextColor(LLUI::sColorsGroup->getColor("LabelTextColor")), | 97 | mTextColor(LLUI::sColorsGroup->getColor("LabelTextColor")), |
@@ -113,7 +113,7 @@ LLTextBox::LLTextBox(const LLString& name_and_label, const LLRect& rect) : | |||
113 | setTabStop(FALSE); | 113 | setTabStop(FALSE); |
114 | } | 114 | } |
115 | 115 | ||
116 | LLTextBox::LLTextBox(const LLString& name_and_label) : | 116 | LLTextBox::LLTextBox(const std::string& name_and_label) : |
117 | LLUICtrl(name_and_label, LLRect(0, 0, 1, 1), TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), | 117 | LLUICtrl(name_and_label, LLRect(0, 0, 1, 1), TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), |
118 | mFontGL(LLFontGL::sSansSerifSmall), | 118 | mFontGL(LLFontGL::sSansSerifSmall), |
119 | mTextColor(LLUI::sColorsGroup->getColor("LabelTextColor")), | 119 | mTextColor(LLUI::sColorsGroup->getColor("LabelTextColor")), |
@@ -211,15 +211,15 @@ void LLTextBox::setLineLengths() | |||
211 | { | 211 | { |
212 | mLineLengthList.clear(); | 212 | mLineLengthList.clear(); |
213 | 213 | ||
214 | LLString::size_type cur = 0; | 214 | std::string::size_type cur = 0; |
215 | LLString::size_type len = mText.getWString().size(); | 215 | std::string::size_type len = mText.getWString().size(); |
216 | 216 | ||
217 | while (cur < len) | 217 | while (cur < len) |
218 | { | 218 | { |
219 | LLString::size_type end = mText.getWString().find('\n', cur); | 219 | std::string::size_type end = mText.getWString().find('\n', cur); |
220 | LLString::size_type runLen; | 220 | std::string::size_type runLen; |
221 | 221 | ||
222 | if (end == LLString::npos) | 222 | if (end == std::string::npos) |
223 | { | 223 | { |
224 | runLen = len - cur; | 224 | runLen = len - cur; |
225 | cur = len; | 225 | cur = len; |
@@ -276,7 +276,7 @@ void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width) | |||
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
279 | LLString final_text = wstring_to_utf8str(final_wtext); | 279 | std::string final_text = wstring_to_utf8str(final_wtext); |
280 | setText(final_text); | 280 | setText(final_text); |
281 | } | 281 | } |
282 | 282 | ||
@@ -316,7 +316,7 @@ S32 LLTextBox::getTextPixelHeight() | |||
316 | } | 316 | } |
317 | 317 | ||
318 | 318 | ||
319 | BOOL LLTextBox::setTextArg( const LLString& key, const LLStringExplicit& text ) | 319 | BOOL LLTextBox::setTextArg( const std::string& key, const LLStringExplicit& text ) |
320 | { | 320 | { |
321 | mText.setArg(key, text); | 321 | mText.setArg(key, text); |
322 | setLineLengths(); | 322 | setLineLengths(); |
@@ -451,11 +451,11 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const | |||
451 | // static | 451 | // static |
452 | LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) | 452 | LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
453 | { | 453 | { |
454 | LLString name("text_box"); | 454 | std::string name("text_box"); |
455 | node->getAttributeString("name", name); | 455 | node->getAttributeString("name", name); |
456 | LLFontGL* font = LLView::selectFont(node); | 456 | LLFontGL* font = LLView::selectFont(node); |
457 | 457 | ||
458 | LLString text = node->getTextContents(); | 458 | std::string text = node->getTextContents(); |
459 | 459 | ||
460 | LLTextBox* text_box = new LLTextBox(name, | 460 | LLTextBox* text_box = new LLTextBox(name, |
461 | LLRect(), | 461 | LLRect(), |
@@ -469,7 +469,7 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f | |||
469 | 469 | ||
470 | text_box->initFromXML(node, parent); | 470 | text_box->initFromXML(node, parent); |
471 | 471 | ||
472 | LLString font_style; | 472 | std::string font_style; |
473 | if (node->getAttributeString("font-style", font_style)) | 473 | if (node->getAttributeString("font-style", font_style)) |
474 | { | 474 | { |
475 | text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); | 475 | text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); |