aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llview.cpp')
-rw-r--r--linden/indra/llui/llview.cpp138
1 files changed, 60 insertions, 78 deletions
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 91c9564..034c49b 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -41,8 +41,6 @@
41#include "llevent.h" 41#include "llevent.h"
42#include "llfontgl.h" 42#include "llfontgl.h"
43#include "llfocusmgr.h" 43#include "llfocusmgr.h"
44#include "llgl.h"
45#include "llglheaders.h"
46#include "llrect.h" 44#include "llrect.h"
47#include "llstl.h" 45#include "llstl.h"
48#include "llui.h" // colors saved settings 46#include "llui.h" // colors saved settings
@@ -64,8 +62,7 @@ BOOL LLView::sDebugRects = FALSE;
64BOOL LLView::sDebugKeys = FALSE; 62BOOL LLView::sDebugKeys = FALSE;
65S32 LLView::sDepth = 0; 63S32 LLView::sDepth = 0;
66BOOL LLView::sDebugMouseHandling = FALSE; 64BOOL LLView::sDebugMouseHandling = FALSE;
67LLString LLView::sMouseHandlerMessage; 65std::string LLView::sMouseHandlerMessage;
68S32 LLView::sSelectID = GL_NAME_UI_RESERVED;
69BOOL LLView::sEditingUI = FALSE; 66BOOL LLView::sEditingUI = FALSE;
70BOOL LLView::sForceReshape = FALSE; 67BOOL LLView::sForceReshape = FALSE;
71LLView* LLView::sEditingUIView = NULL; 68LLView* LLView::sEditingUIView = NULL;
@@ -92,7 +89,7 @@ LLView::LLView() :
92{ 89{
93} 90}
94 91
95LLView::LLView(const LLString& name, BOOL mouse_opaque) : 92LLView::LLView(const std::string& name, BOOL mouse_opaque) :
96 mParentView(NULL), 93 mParentView(NULL),
97 mName(name), 94 mName(name),
98 mReshapeFlags(FOLLOWS_NONE), 95 mReshapeFlags(FOLLOWS_NONE),
@@ -111,7 +108,7 @@ LLView::LLView(const LLString& name, BOOL mouse_opaque) :
111 108
112 109
113LLView::LLView( 110LLView::LLView(
114 const LLString& name, const LLRect& rect, BOOL mouse_opaque, U32 reshape) : 111 const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 reshape) :
115 mParentView(NULL), 112 mParentView(NULL),
116 mName(name), 113 mName(name),
117 mRect(rect), 114 mRect(rect),
@@ -196,7 +193,7 @@ BOOL LLView::setToolTipArg(const LLStringExplicit& key, const LLStringExplicit&
196 return TRUE; 193 return TRUE;
197} 194}
198 195
199void LLView::setToolTipArgs( const LLString::format_map_t& args ) 196void LLView::setToolTipArgs( const LLStringUtil::format_map_t& args )
200{ 197{
201 mToolTipMsg.setArgList(args); 198 mToolTipMsg.setArgList(args);
202} 199}
@@ -223,9 +220,9 @@ BOOL LLView::getUseBoundingRect()
223} 220}
224 221
225// virtual 222// virtual
226const LLString& LLView::getName() const 223const std::string& LLView::getName() const
227{ 224{
228 static const LLString unnamed("(no name)"); 225 static const std::string unnamed("(no name)");
229 return mName.empty() ? unnamed : mName; 226 return mName.empty() ? unnamed : mName;
230} 227}
231 228
@@ -462,7 +459,7 @@ void LLView::setEnabled(BOOL enabled)
462} 459}
463 460
464//virtual 461//virtual
465BOOL LLView::setLabelArg( const LLString& key, const LLStringExplicit& text ) 462BOOL LLView::setLabelArg( const std::string& key, const LLStringExplicit& text )
466{ 463{
467 return FALSE; 464 return FALSE;
468} 465}
@@ -668,11 +665,11 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
668 return handled; 665 return handled;
669} 666}
670 667
671LLString LLView::getShowNamesToolTip() 668std::string LLView::getShowNamesToolTip()
672{ 669{
673 LLView* view = getParent(); 670 LLView* view = getParent();
674 LLString name; 671 std::string name;
675 LLString tool_tip = mName; 672 std::string tool_tip = mName;
676 673
677 while (view) 674 while (view)
678 { 675 {
@@ -680,7 +677,7 @@ LLString LLView::getShowNamesToolTip()
680 677
681 if (name == "root") break; 678 if (name == "root") break;
682 679
683 if (view->getToolTip().find(".xml") != LLString::npos) 680 if (view->getToolTip().find(".xml") != std::string::npos)
684 { 681 {
685 tool_tip = view->getToolTip() + "/" + tool_tip; 682 tool_tip = view->getToolTip() + "/" + tool_tip;
686 break; 683 break;
@@ -697,11 +694,11 @@ LLString LLView::getShowNamesToolTip()
697} 694}
698 695
699 696
700BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen) 697BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
701{ 698{
702 BOOL handled = FALSE; 699 BOOL handled = FALSE;
703 700
704 LLString tool_tip; 701 std::string tool_tip;
705 702
706 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) 703 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
707 { 704 {
@@ -721,15 +718,15 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre
721 tool_tip = mToolTipMsg.getString(); 718 tool_tip = mToolTipMsg.getString();
722 if ( 719 if (
723 LLUI::sShowXUINames && 720 LLUI::sShowXUINames &&
724 (tool_tip.find(".xml", 0) == LLString::npos) && 721 (tool_tip.find(".xml", 0) == std::string::npos) &&
725 (mName.find("Drag", 0) == LLString::npos)) 722 (mName.find("Drag", 0) == std::string::npos))
726 { 723 {
727 tool_tip = getShowNamesToolTip(); 724 tool_tip = getShowNamesToolTip();
728 } 725 }
729 726
730 BOOL showNamesTextBox = LLUI::sShowXUINames && dynamic_cast<LLTextBox*>(this) != NULL; 727 BOOL show_names_text_box = LLUI::sShowXUINames && dynamic_cast<LLTextBox*>(this) != NULL;
731 728
732 if( !handled && (blockMouseEvent(x, y) || showNamesTextBox) && !tool_tip.empty()) 729 if( !handled && (blockMouseEvent(x, y) || show_names_text_box))
733 { 730 {
734 731
735 msg = tool_tip; 732 msg = tool_tip;
@@ -826,7 +823,7 @@ BOOL LLView::handleUnicodeCharHere(llwchar uni_char )
826BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, 823BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
827 EDragAndDropType cargo_type, void* cargo_data, 824 EDragAndDropType cargo_type, void* cargo_data,
828 EAcceptance* accept, 825 EAcceptance* accept,
829 LLString& tooltip_msg) 826 std::string& tooltip_msg)
830{ 827{
831 // CRO this is an experiment to allow drag and drop into object inventory based on the DragAndDrop tool's permissions rather than the parent 828 // CRO this is an experiment to allow drag and drop into object inventory based on the DragAndDrop tool's permissions rather than the parent
832 BOOL handled = childrenHandleDragAndDrop( x, y, mask, drop, 829 BOOL handled = childrenHandleDragAndDrop( x, y, mask, drop,
@@ -849,7 +846,7 @@ LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
849 EDragAndDropType cargo_type, 846 EDragAndDropType cargo_type,
850 void* cargo_data, 847 void* cargo_data,
851 EAcceptance* accept, 848 EAcceptance* accept,
852 LLString& tooltip_msg) 849 std::string& tooltip_msg)
853{ 850{
854 LLView* handled_view = FALSE; 851 LLView* handled_view = FALSE;
855 // CRO this is an experiment to allow drag and drop into object inventory based on the DragAndDrop tool's permissions rather than the parent 852 // CRO this is an experiment to allow drag and drop into object inventory based on the DragAndDrop tool's permissions rather than the parent
@@ -989,7 +986,7 @@ LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
989 { 986 {
990 if (sDebugMouseHandling) 987 if (sDebugMouseHandling)
991 { 988 {
992 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 989 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
993 } 990 }
994 991
995 handled_view = viewp; 992 handled_view = viewp;
@@ -1017,7 +1014,7 @@ LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
1017 { 1014 {
1018 if (sDebugMouseHandling) 1015 if (sDebugMouseHandling)
1019 { 1016 {
1020 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1017 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1021 } 1018 }
1022 1019
1023 handled_view = viewp; 1020 handled_view = viewp;
@@ -1095,7 +1092,7 @@ LLView* LLView::childrenHandleMouseDown(S32 x, S32 y, MASK mask)
1095 { 1092 {
1096 if (sDebugMouseHandling) 1093 if (sDebugMouseHandling)
1097 { 1094 {
1098 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1095 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1099 } 1096 }
1100 handled_view = viewp; 1097 handled_view = viewp;
1101 break; 1098 break;
@@ -1122,7 +1119,7 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
1122 { 1119 {
1123 if (sDebugMouseHandling) 1120 if (sDebugMouseHandling)
1124 { 1121 {
1125 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1122 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1126 } 1123 }
1127 handled_view = viewp; 1124 handled_view = viewp;
1128 break; 1125 break;
@@ -1150,7 +1147,7 @@ LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask)
1150 { 1147 {
1151 if (sDebugMouseHandling) 1148 if (sDebugMouseHandling)
1152 { 1149 {
1153 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1150 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1154 } 1151 }
1155 handled_view = viewp; 1152 handled_view = viewp;
1156 break; 1153 break;
@@ -1180,7 +1177,7 @@ LLView* LLView::childrenHandleMouseUp(S32 x, S32 y, MASK mask)
1180 { 1177 {
1181 if (sDebugMouseHandling) 1178 if (sDebugMouseHandling)
1182 { 1179 {
1183 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1180 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1184 } 1181 }
1185 handled_view = viewp; 1182 handled_view = viewp;
1186 break; 1183 break;
@@ -1207,7 +1204,7 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask)
1207 { 1204 {
1208 if (sDebugMouseHandling) 1205 if (sDebugMouseHandling)
1209 { 1206 {
1210 sMouseHandlerMessage = LLString("->") + viewp->mName.c_str() + sMouseHandlerMessage; 1207 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1211 } 1208 }
1212 handled_view = viewp; 1209 handled_view = viewp;
1213 break; 1210 break;
@@ -1328,7 +1325,7 @@ void LLView::drawDebugRect()
1328 gGL.color4fv( border_color.mV ); 1325 gGL.color4fv( border_color.mV );
1329 x = debug_rect.getWidth()/2; 1326 x = debug_rect.getWidth()/2;
1330 y = debug_rect.getHeight()/2; 1327 y = debug_rect.getHeight()/2;
1331 LLString debug_text = llformat("%s (%d x %d)", getName().c_str(), 1328 std::string debug_text = llformat("%s (%d x %d)", getName().c_str(),
1332 debug_rect.getWidth(), debug_rect.getHeight()); 1329 debug_rect.getWidth(), debug_rect.getHeight());
1333 LLFontGL::sSansSerifSmall->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color, 1330 LLFontGL::sSansSerifSmall->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color,
1334 LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, 1331 LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL,
@@ -1539,7 +1536,7 @@ BOOL LLView::hasAncestor(const LLView* parentp) const
1539 1536
1540//----------------------------------------------------------------------------- 1537//-----------------------------------------------------------------------------
1541 1538
1542BOOL LLView::childHasKeyboardFocus( const LLString& childname ) const 1539BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const
1543{ 1540{
1544 LLView *child = getChildView(childname, TRUE, FALSE); 1541 LLView *child = getChildView(childname, TRUE, FALSE);
1545 if (child) 1542 if (child)
@@ -1554,7 +1551,7 @@ BOOL LLView::childHasKeyboardFocus( const LLString& childname ) const
1554 1551
1555//----------------------------------------------------------------------------- 1552//-----------------------------------------------------------------------------
1556 1553
1557BOOL LLView::hasChild(const LLString& childname, BOOL recurse) const 1554BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const
1558{ 1555{
1559 return getChildView(childname, recurse, FALSE) != NULL; 1556 return getChildView(childname, recurse, FALSE) != NULL;
1560} 1557}
@@ -1562,7 +1559,7 @@ BOOL LLView::hasChild(const LLString& childname, BOOL recurse) const
1562//----------------------------------------------------------------------------- 1559//-----------------------------------------------------------------------------
1563// getChildView() 1560// getChildView()
1564//----------------------------------------------------------------------------- 1561//-----------------------------------------------------------------------------
1565LLView* LLView::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const 1562LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
1566{ 1563{
1567 //richard: should we allow empty names? 1564 //richard: should we allow empty names?
1568 //if(name.empty()) 1565 //if(name.empty())
@@ -1925,33 +1922,18 @@ LLView* LLView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fact
1925 1922
1926// static 1923// static
1927void LLView::addColorXML(LLXMLNodePtr node, const LLColor4& color, 1924void LLView::addColorXML(LLXMLNodePtr node, const LLColor4& color,
1928 const LLString& xml_name, const LLString& control_name) 1925 const char* xml_name, const char* control_name)
1929{ 1926{
1930 if (color != LLUI::sColorsGroup->getColor(control_name)) 1927 if (color != LLUI::sColorsGroup->getColor(ll_safe_string(control_name)))
1931 { 1928 {
1932 node->createChild(xml_name, TRUE)->setFloatValue(4, color.mV); 1929 node->createChild(xml_name, TRUE)->setFloatValue(4, color.mV);
1933 } 1930 }
1934} 1931}
1935 1932
1936// static
1937void LLView::saveColorToXML(std::ostream& out, const LLColor4& color,
1938 const LLString& xml_name, const LLString& control_name,
1939 const LLString& indent)
1940{
1941 if (color != LLUI::sColorsGroup->getColor(control_name))
1942 {
1943 out << indent << xml_name << "=\""
1944 << color.mV[VRED] << ", "
1945 << color.mV[VGREEN] << ", "
1946 << color.mV[VBLUE] << ", "
1947 << color.mV[VALPHA] << "\"\n";
1948 }
1949}
1950
1951//static 1933//static
1952LLString LLView::escapeXML(const LLString& xml, LLString& indent) 1934std::string LLView::escapeXML(const std::string& xml, std::string& indent)
1953{ 1935{
1954 LLString ret = indent + "\"" + LLXMLNode::escapeXML(xml); 1936 std::string ret = indent + "\"" + LLXMLNode::escapeXML(xml);
1955 1937
1956 //replace every newline with a close quote, new line, indent, open quote 1938 //replace every newline with a close quote, new line, indent, open quote
1957 size_t index = ret.size()-1; 1939 size_t index = ret.size()-1;
@@ -2406,12 +2388,12 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
2406// Listener dispatch functions 2388// Listener dispatch functions
2407//----------------------------------------------------------------------------- 2389//-----------------------------------------------------------------------------
2408 2390
2409void LLView::registerEventListener(LLString name, LLSimpleListener* function) 2391void LLView::registerEventListener(std::string name, LLSimpleListener* function)
2410{ 2392{
2411 mDispatchList.insert(std::pair<LLString, LLSimpleListener*>(name, function)); 2393 mDispatchList.insert(std::pair<std::string, LLSimpleListener*>(name, function));
2412} 2394}
2413 2395
2414void LLView::deregisterEventListener(LLString name) 2396void LLView::deregisterEventListener(std::string name)
2415{ 2397{
2416 dispatch_list_t::iterator itor = mDispatchList.find(name); 2398 dispatch_list_t::iterator itor = mDispatchList.find(name);
2417 if (itor != mDispatchList.end()) 2399 if (itor != mDispatchList.end())
@@ -2420,7 +2402,7 @@ void LLView::deregisterEventListener(LLString name)
2420 } 2402 }
2421} 2403}
2422 2404
2423LLString LLView::findEventListener(LLSimpleListener *listener) const 2405std::string LLView::findEventListener(LLSimpleListener *listener) const
2424{ 2406{
2425 dispatch_list_t::const_iterator itor; 2407 dispatch_list_t::const_iterator itor;
2426 for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor) 2408 for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor)
@@ -2434,10 +2416,10 @@ LLString LLView::findEventListener(LLSimpleListener *listener) const
2434 { 2416 {
2435 return mParentView->findEventListener(listener); 2417 return mParentView->findEventListener(listener);
2436 } 2418 }
2437 return LLString::null; 2419 return LLStringUtil::null;
2438} 2420}
2439 2421
2440LLSimpleListener* LLView::getListenerByName(const LLString& callback_name) 2422LLSimpleListener* LLView::getListenerByName(const std::string& callback_name)
2441{ 2423{
2442 LLSimpleListener* callback = NULL; 2424 LLSimpleListener* callback = NULL;
2443 dispatch_list_t::iterator itor = mDispatchList.find(callback_name); 2425 dispatch_list_t::iterator itor = mDispatchList.find(callback_name);
@@ -2452,7 +2434,7 @@ LLSimpleListener* LLView::getListenerByName(const LLString& callback_name)
2452 return callback; 2434 return callback;
2453} 2435}
2454 2436
2455LLControlVariable *LLView::findControl(LLString name) 2437LLControlVariable *LLView::findControl(const std::string& name)
2456{ 2438{
2457 control_map_t::iterator itor = mFloaterControls.find(name); 2439 control_map_t::iterator itor = mFloaterControls.find(name);
2458 if (itor != mFloaterControls.end()) 2440 if (itor != mFloaterControls.end())
@@ -2496,7 +2478,7 @@ U32 LLView::createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, con
2496 } 2478 }
2497 } 2479 }
2498 2480
2499 LLString rect_control; 2481 std::string rect_control;
2500 node->getAttributeString("rect_control", rect_control); 2482 node->getAttributeString("rect_control", rect_control);
2501 if (! rect_control.empty()) 2483 if (! rect_control.empty())
2502 { 2484 {
@@ -2657,14 +2639,14 @@ void LLView::initFromXML(LLXMLNodePtr node, LLView* parent)
2657 2639
2658 if (node->hasAttribute("control_name")) 2640 if (node->hasAttribute("control_name"))
2659 { 2641 {
2660 LLString control_name; 2642 std::string control_name;
2661 node->getAttributeString("control_name", control_name); 2643 node->getAttributeString("control_name", control_name);
2662 setControlName(control_name, NULL); 2644 setControlName(control_name, NULL);
2663 } 2645 }
2664 2646
2665 if (node->hasAttribute("tool_tip")) 2647 if (node->hasAttribute("tool_tip"))
2666 { 2648 {
2667 LLString tool_tip_msg(""); 2649 std::string tool_tip_msg;
2668 node->getAttributeString("tool_tip", tool_tip_msg); 2650 node->getAttributeString("tool_tip", tool_tip_msg);
2669 setToolTip(tool_tip_msg); 2651 setToolTip(tool_tip_msg);
2670 } 2652 }
@@ -2697,7 +2679,7 @@ void LLView::parseFollowsFlags(LLXMLNodePtr node)
2697 { 2679 {
2698 setFollowsNone(); 2680 setFollowsNone();
2699 2681
2700 LLString follows; 2682 std::string follows;
2701 node->getAttributeString("follows", follows); 2683 node->getAttributeString("follows", follows);
2702 2684
2703 typedef boost::tokenizer<boost::char_separator<char> > tokenizer; 2685 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -2741,10 +2723,10 @@ LLFontGL* LLView::selectFont(LLXMLNodePtr node)
2741 2723
2742 if (node->hasAttribute("font")) 2724 if (node->hasAttribute("font"))
2743 { 2725 {
2744 LLString font_name; 2726 std::string font_name;
2745 node->getAttributeString("font", font_name); 2727 node->getAttributeString("font", font_name);
2746 2728
2747 gl_font = LLFontGL::fontFromName(font_name.c_str()); 2729 gl_font = LLFontGL::fontFromName(font_name);
2748 } 2730 }
2749 return gl_font; 2731 return gl_font;
2750} 2732}
@@ -2756,7 +2738,7 @@ LLFontGL::HAlign LLView::selectFontHAlign(LLXMLNodePtr node)
2756 2738
2757 if (node->hasAttribute("halign")) 2739 if (node->hasAttribute("halign"))
2758 { 2740 {
2759 LLString horizontal_align_name; 2741 std::string horizontal_align_name;
2760 node->getAttributeString("halign", horizontal_align_name); 2742 node->getAttributeString("halign", horizontal_align_name);
2761 gl_hfont_align = LLFontGL::hAlignFromName(horizontal_align_name); 2743 gl_hfont_align = LLFontGL::hAlignFromName(horizontal_align_name);
2762 } 2744 }
@@ -2770,7 +2752,7 @@ LLFontGL::VAlign LLView::selectFontVAlign(LLXMLNodePtr node)
2770 2752
2771 if (node->hasAttribute("valign")) 2753 if (node->hasAttribute("valign"))
2772 { 2754 {
2773 LLString vert_align_name; 2755 std::string vert_align_name;
2774 node->getAttributeString("valign", vert_align_name); 2756 node->getAttributeString("valign", vert_align_name);
2775 gl_vfont_align = LLFontGL::vAlignFromName(vert_align_name); 2757 gl_vfont_align = LLFontGL::vAlignFromName(vert_align_name);
2776 } 2758 }
@@ -2784,7 +2766,7 @@ LLFontGL::StyleFlags LLView::selectFontStyle(LLXMLNodePtr node)
2784 2766
2785 if (node->hasAttribute("style")) 2767 if (node->hasAttribute("style"))
2786 { 2768 {
2787 LLString style_flags_name; 2769 std::string style_flags_name;
2788 node->getAttributeString("style", style_flags_name); 2770 node->getAttributeString("style", style_flags_name);
2789 2771
2790 if (style_flags_name == "normal") 2772 if (style_flags_name == "normal")
@@ -2810,7 +2792,7 @@ LLFontGL::StyleFlags LLView::selectFontStyle(LLXMLNodePtr node)
2810 2792
2811bool LLView::setControlValue(const LLSD& value) 2793bool LLView::setControlValue(const LLSD& value)
2812{ 2794{
2813 LLString ctrlname = getControlName(); 2795 std::string ctrlname = getControlName();
2814 if (!ctrlname.empty()) 2796 if (!ctrlname.empty())
2815 { 2797 {
2816 LLUI::sConfigGroup->setValue(ctrlname, value); 2798 LLUI::sConfigGroup->setValue(ctrlname, value);
@@ -2820,7 +2802,7 @@ bool LLView::setControlValue(const LLSD& value)
2820} 2802}
2821 2803
2822//virtual 2804//virtual
2823void LLView::setControlName(const LLString& control_name, LLView *context) 2805void LLView::setControlName(const std::string& control_name, LLView *context)
2824{ 2806{
2825 if (context == NULL) 2807 if (context == NULL)
2826 { 2808 {
@@ -2872,12 +2854,12 @@ bool LLView::controlListener(const LLSD& newvalue, LLHandle<LLView> handle, std:
2872 return false; 2854 return false;
2873} 2855}
2874 2856
2875void LLView::addBoolControl(LLString name, bool initial_value) 2857void LLView::addBoolControl(const std::string& name, bool initial_value)
2876{ 2858{
2877 mFloaterControls[name] = new LLControlVariable(name, TYPE_BOOLEAN, initial_value, "Internal floater control"); 2859 mFloaterControls[name] = new LLControlVariable(name, TYPE_BOOLEAN, initial_value, std::string("Internal floater control"));
2878} 2860}
2879 2861
2880LLControlVariable *LLView::getControl(LLString name) 2862LLControlVariable *LLView::getControl(const std::string& name)
2881{ 2863{
2882 control_map_t::iterator itor = mFloaterControls.find(name); 2864 control_map_t::iterator itor = mFloaterControls.find(name);
2883 if (itor != mFloaterControls.end()) 2865 if (itor != mFloaterControls.end())
@@ -2912,20 +2894,20 @@ LLWidgetClassRegistry::LLWidgetClassRegistry()
2912{ 2894{
2913} 2895}
2914 2896
2915void LLWidgetClassRegistry::registerCtrl(const LLString& tag, LLWidgetClassRegistry::factory_func_t function) 2897void LLWidgetClassRegistry::registerCtrl(const std::string& tag, LLWidgetClassRegistry::factory_func_t function)
2916{ 2898{
2917 LLString lower_case_tag = tag; 2899 std::string lower_case_tag = tag;
2918 LLString::toLower(lower_case_tag); 2900 LLStringUtil::toLower(lower_case_tag);
2919 2901
2920 mCreatorFunctions[lower_case_tag] = function; 2902 mCreatorFunctions[lower_case_tag] = function;
2921} 2903}
2922 2904
2923BOOL LLWidgetClassRegistry::isTagRegistered(const LLString &tag) 2905BOOL LLWidgetClassRegistry::isTagRegistered(const std::string &tag)
2924{ 2906{
2925 return mCreatorFunctions.find(tag) != mCreatorFunctions.end(); 2907 return mCreatorFunctions.find(tag) != mCreatorFunctions.end();
2926} 2908}
2927 2909
2928LLWidgetClassRegistry::factory_func_t LLWidgetClassRegistry::getCreatorFunc(const LLString& ctrl_type) 2910LLWidgetClassRegistry::factory_func_t LLWidgetClassRegistry::getCreatorFunc(const std::string& ctrl_type)
2929{ 2911{
2930 factory_map_t::const_iterator found_it = mCreatorFunctions.find(ctrl_type); 2912 factory_map_t::const_iterator found_it = mCreatorFunctions.find(ctrl_type);
2931 if (found_it == mCreatorFunctions.end()) 2913 if (found_it == mCreatorFunctions.end())