diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llui/llpanel.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 130 |
1 files changed, 64 insertions, 66 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 7db3725..f1ccb01 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -55,8 +55,6 @@ | |||
55 | #include "llbutton.h" | 55 | #include "llbutton.h" |
56 | 56 | ||
57 | // LLLayoutStack | 57 | // LLLayoutStack |
58 | #include "llgl.h" | ||
59 | #include "llglheaders.h" | ||
60 | #include "llresizebar.h" | 58 | #include "llresizebar.h" |
61 | #include "llcriticaldamp.h" | 59 | #include "llcriticaldamp.h" |
62 | 60 | ||
@@ -88,10 +86,10 @@ LLPanel::LLPanel() | |||
88 | : mRectControl() | 86 | : mRectControl() |
89 | { | 87 | { |
90 | init(); | 88 | init(); |
91 | setName("panel"); | 89 | setName(std::string("panel")); |
92 | } | 90 | } |
93 | 91 | ||
94 | LLPanel::LLPanel(const LLString& name) | 92 | LLPanel::LLPanel(const std::string& name) |
95 | : LLUICtrl(name, LLRect(0, 0, 0, 0), TRUE, NULL, NULL), | 93 | : LLUICtrl(name, LLRect(0, 0, 0, 0), TRUE, NULL, NULL), |
96 | mRectControl() | 94 | mRectControl() |
97 | { | 95 | { |
@@ -99,7 +97,7 @@ LLPanel::LLPanel(const LLString& name) | |||
99 | } | 97 | } |
100 | 98 | ||
101 | 99 | ||
102 | LLPanel::LLPanel(const LLString& name, const LLRect& rect, BOOL bordered) | 100 | LLPanel::LLPanel(const std::string& name, const LLRect& rect, BOOL bordered) |
103 | : LLUICtrl(name, rect, TRUE, NULL, NULL), | 101 | : LLUICtrl(name, rect, TRUE, NULL, NULL), |
104 | mRectControl() | 102 | mRectControl() |
105 | { | 103 | { |
@@ -111,7 +109,7 @@ LLPanel::LLPanel(const LLString& name, const LLRect& rect, BOOL bordered) | |||
111 | } | 109 | } |
112 | 110 | ||
113 | 111 | ||
114 | LLPanel::LLPanel(const LLString& name, const LLString& rect_control, BOOL bordered) | 112 | LLPanel::LLPanel(const std::string& name, const std::string& rect_control, BOOL bordered) |
115 | : LLUICtrl(name, LLUI::sConfigGroup->getRect(rect_control), TRUE, NULL, NULL), | 113 | : LLUICtrl(name, LLUI::sConfigGroup->getRect(rect_control), TRUE, NULL, NULL), |
116 | mRectControl( rect_control ) | 114 | mRectControl( rect_control ) |
117 | { | 115 | { |
@@ -143,7 +141,7 @@ void LLPanel::addBorder(LLViewBorder::EBevel border_bevel, | |||
143 | LLViewBorder::EStyle border_style, S32 border_thickness) | 141 | LLViewBorder::EStyle border_style, S32 border_thickness) |
144 | { | 142 | { |
145 | removeBorder(); | 143 | removeBorder(); |
146 | mBorder = new LLViewBorder( "panel border", | 144 | mBorder = new LLViewBorder( std::string("panel border"), |
147 | LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), | 145 | LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), |
148 | border_bevel, border_style, border_thickness ); | 146 | border_bevel, border_style, border_thickness ); |
149 | mBorder->setSaveToXML(false); | 147 | mBorder->setSaveToXML(false); |
@@ -248,7 +246,7 @@ void LLPanel::setDefaultBtn(LLButton* btn) | |||
248 | } | 246 | } |
249 | } | 247 | } |
250 | 248 | ||
251 | void LLPanel::setDefaultBtn(const LLString& id) | 249 | void LLPanel::setDefaultBtn(const std::string& id) |
252 | { | 250 | { |
253 | LLButton *button = getChild<LLButton>(id); | 251 | LLButton *button = getChild<LLButton>(id); |
254 | if (button) | 252 | if (button) |
@@ -346,14 +344,14 @@ BOOL LLPanel::checkRequirements() | |||
346 | { | 344 | { |
347 | if (!mRequirementsError.empty()) | 345 | if (!mRequirementsError.empty()) |
348 | { | 346 | { |
349 | LLString::format_map_t args; | 347 | LLStringUtil::format_map_t args; |
350 | args["[COMPONENTS]"] = mRequirementsError; | 348 | args["[COMPONENTS]"] = mRequirementsError; |
351 | args["[FLOATER]"] = getName(); | 349 | args["[FLOATER]"] = getName(); |
352 | 350 | ||
353 | llwarns << getName() << " failed requirements check on: \n" | 351 | llwarns << getName() << " failed requirements check on: \n" |
354 | << mRequirementsError << llendl; | 352 | << mRequirementsError << llendl; |
355 | 353 | ||
356 | alertXml("FailedRequirementsCheck", args); | 354 | alertXml(std::string("FailedRequirementsCheck"), args); |
357 | mRequirementsError.clear(); | 355 | mRequirementsError.clear(); |
358 | return FALSE; | 356 | return FALSE; |
359 | } | 357 | } |
@@ -362,7 +360,7 @@ BOOL LLPanel::checkRequirements() | |||
362 | } | 360 | } |
363 | 361 | ||
364 | //static | 362 | //static |
365 | void LLPanel::alertXml(LLString label, LLString::format_map_t args) | 363 | void LLPanel::alertXml(const std::string& label, LLStringUtil::format_map_t args) |
366 | { | 364 | { |
367 | sAlertQueue.push(LLAlertInfo(label,args)); | 365 | sAlertQueue.push(LLAlertInfo(label,args)); |
368 | } | 366 | } |
@@ -462,7 +460,7 @@ LLXMLNodePtr LLPanel::getXML(bool save_children) const | |||
462 | 460 | ||
463 | LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *factory) | 461 | LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *factory) |
464 | { | 462 | { |
465 | LLString name("panel"); | 463 | std::string name("panel"); |
466 | node->getAttributeString("name", name); | 464 | node->getAttributeString("name", name); |
467 | 465 | ||
468 | LLPanel* panelp = factory->createFactoryPanel(name); | 466 | LLPanel* panelp = factory->createFactoryPanel(name); |
@@ -491,7 +489,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *fac | |||
491 | 489 | ||
492 | BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) | 490 | BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
493 | { | 491 | { |
494 | LLString name = getName(); | 492 | std::string name = getName(); |
495 | node->getAttributeString("name", name); | 493 | node->getAttributeString("name", name); |
496 | setName(name); | 494 | setName(name); |
497 | 495 | ||
@@ -499,7 +497,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f | |||
499 | 497 | ||
500 | initChildrenXML(node, factory); | 498 | initChildrenXML(node, factory); |
501 | 499 | ||
502 | LLString xml_filename; | 500 | std::string xml_filename; |
503 | node->getAttributeString("filename", xml_filename); | 501 | node->getAttributeString("filename", xml_filename); |
504 | 502 | ||
505 | BOOL didPost; | 503 | BOOL didPost; |
@@ -538,7 +536,7 @@ void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory) | |||
538 | // look for string declarations for programmatic text | 536 | // look for string declarations for programmatic text |
539 | if (child->hasName("string")) | 537 | if (child->hasName("string")) |
540 | { | 538 | { |
541 | LLString string_name; | 539 | std::string string_name; |
542 | child->getAttributeString("name", string_name); | 540 | child->getAttributeString("name", string_name); |
543 | if (!string_name.empty()) | 541 | if (!string_name.empty()) |
544 | { | 542 | { |
@@ -566,9 +564,9 @@ void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parent) | |||
566 | LLViewBorder::getBevelFromAttribute(node, bevel_style); | 564 | LLViewBorder::getBevelFromAttribute(node, bevel_style); |
567 | 565 | ||
568 | LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE; | 566 | LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE; |
569 | LLString border_string; | 567 | std::string border_string; |
570 | node->getAttributeString("border_style", border_string); | 568 | node->getAttributeString("border_style", border_string); |
571 | LLString::toLower(border_string); | 569 | LLStringUtil::toLower(border_string); |
572 | 570 | ||
573 | if (border_string == "texture") | 571 | if (border_string == "texture") |
574 | { | 572 | { |
@@ -603,12 +601,12 @@ void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parent) | |||
603 | LLUICtrlFactory::getAttributeColor(node,"bg_alpha_color", color); | 601 | LLUICtrlFactory::getAttributeColor(node,"bg_alpha_color", color); |
604 | setTransparentColor(color); | 602 | setTransparentColor(color); |
605 | 603 | ||
606 | LLString label = getLabel(); | 604 | std::string label = getLabel(); |
607 | node->getAttributeString("label", label); | 605 | node->getAttributeString("label", label); |
608 | setLabel(label); | 606 | setLabel(label); |
609 | } | 607 | } |
610 | 608 | ||
611 | LLString LLPanel::getString(const LLString& name, const LLString::format_map_t& args) const | 609 | std::string LLPanel::getString(const std::string& name, const LLStringUtil::format_map_t& args) const |
612 | { | 610 | { |
613 | ui_string_map_t::const_iterator found_it = mUIStrings.find(name); | 611 | ui_string_map_t::const_iterator found_it = mUIStrings.find(name); |
614 | if (found_it != mUIStrings.end()) | 612 | if (found_it != mUIStrings.end()) |
@@ -618,7 +616,7 @@ LLString LLPanel::getString(const LLString& name, const LLString::format_map_t& | |||
618 | formatted_string.setArgList(args); | 616 | formatted_string.setArgList(args); |
619 | return formatted_string.getString(); | 617 | return formatted_string.getString(); |
620 | } | 618 | } |
621 | LLString err_str("Failed to find string " + name + " in panel " + getName()); | 619 | std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate |
622 | // *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be | 620 | // *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be |
623 | //if(LLUI::sConfigGroup->getBOOL("QAMode")) | 621 | //if(LLUI::sConfigGroup->getBOOL("QAMode")) |
624 | if(LLUI::sQAMode) | 622 | if(LLUI::sQAMode) |
@@ -629,10 +627,10 @@ LLString LLPanel::getString(const LLString& name, const LLString::format_map_t& | |||
629 | { | 627 | { |
630 | llwarns << err_str << llendl; | 628 | llwarns << err_str << llendl; |
631 | } | 629 | } |
632 | return LLString::null; | 630 | return LLStringUtil::null; |
633 | } | 631 | } |
634 | 632 | ||
635 | LLUIString LLPanel::getUIString(const LLString& name) const | 633 | LLUIString LLPanel::getUIString(const std::string& name) const |
636 | { | 634 | { |
637 | ui_string_map_t::const_iterator found_it = mUIStrings.find(name); | 635 | ui_string_map_t::const_iterator found_it = mUIStrings.find(name); |
638 | if (found_it != mUIStrings.end()) | 636 | if (found_it != mUIStrings.end()) |
@@ -640,11 +638,11 @@ LLUIString LLPanel::getUIString(const LLString& name) const | |||
640 | return found_it->second; | 638 | return found_it->second; |
641 | } | 639 | } |
642 | llerrs << "Failed to find string " << name << " in panel " << getName() << llendl; | 640 | llerrs << "Failed to find string " << name << " in panel " << getName() << llendl; |
643 | return LLUIString(LLString::null); | 641 | return LLUIString(LLStringUtil::null); |
644 | } | 642 | } |
645 | 643 | ||
646 | 644 | ||
647 | void LLPanel::childSetVisible(const LLString& id, bool visible) | 645 | void LLPanel::childSetVisible(const std::string& id, bool visible) |
648 | { | 646 | { |
649 | LLView* child = getChild<LLView>(id); | 647 | LLView* child = getChild<LLView>(id); |
650 | if (child) | 648 | if (child) |
@@ -653,7 +651,7 @@ void LLPanel::childSetVisible(const LLString& id, bool visible) | |||
653 | } | 651 | } |
654 | } | 652 | } |
655 | 653 | ||
656 | bool LLPanel::childIsVisible(const LLString& id) const | 654 | bool LLPanel::childIsVisible(const std::string& id) const |
657 | { | 655 | { |
658 | LLView* child = getChild<LLView>(id); | 656 | LLView* child = getChild<LLView>(id); |
659 | if (child) | 657 | if (child) |
@@ -663,7 +661,7 @@ bool LLPanel::childIsVisible(const LLString& id) const | |||
663 | return false; | 661 | return false; |
664 | } | 662 | } |
665 | 663 | ||
666 | void LLPanel::childSetEnabled(const LLString& id, bool enabled) | 664 | void LLPanel::childSetEnabled(const std::string& id, bool enabled) |
667 | { | 665 | { |
668 | LLView* child = getChild<LLView>(id); | 666 | LLView* child = getChild<LLView>(id); |
669 | if (child) | 667 | if (child) |
@@ -672,7 +670,7 @@ void LLPanel::childSetEnabled(const LLString& id, bool enabled) | |||
672 | } | 670 | } |
673 | } | 671 | } |
674 | 672 | ||
675 | void LLPanel::childSetTentative(const LLString& id, bool tentative) | 673 | void LLPanel::childSetTentative(const std::string& id, bool tentative) |
676 | { | 674 | { |
677 | LLView* child = getChild<LLView>(id); | 675 | LLView* child = getChild<LLView>(id); |
678 | if (child) | 676 | if (child) |
@@ -681,7 +679,7 @@ void LLPanel::childSetTentative(const LLString& id, bool tentative) | |||
681 | } | 679 | } |
682 | } | 680 | } |
683 | 681 | ||
684 | bool LLPanel::childIsEnabled(const LLString& id) const | 682 | bool LLPanel::childIsEnabled(const std::string& id) const |
685 | { | 683 | { |
686 | LLView* child = getChild<LLView>(id); | 684 | LLView* child = getChild<LLView>(id); |
687 | if (child) | 685 | if (child) |
@@ -692,7 +690,7 @@ bool LLPanel::childIsEnabled(const LLString& id) const | |||
692 | } | 690 | } |
693 | 691 | ||
694 | 692 | ||
695 | void LLPanel::childSetToolTip(const LLString& id, const LLString& msg) | 693 | void LLPanel::childSetToolTip(const std::string& id, const std::string& msg) |
696 | { | 694 | { |
697 | LLView* child = getChild<LLView>(id); | 695 | LLView* child = getChild<LLView>(id); |
698 | if (child) | 696 | if (child) |
@@ -701,7 +699,7 @@ void LLPanel::childSetToolTip(const LLString& id, const LLString& msg) | |||
701 | } | 699 | } |
702 | } | 700 | } |
703 | 701 | ||
704 | void LLPanel::childSetRect(const LLString& id, const LLRect& rect) | 702 | void LLPanel::childSetRect(const std::string& id, const LLRect& rect) |
705 | { | 703 | { |
706 | LLView* child = getChild<LLView>(id); | 704 | LLView* child = getChild<LLView>(id); |
707 | if (child) | 705 | if (child) |
@@ -710,7 +708,7 @@ void LLPanel::childSetRect(const LLString& id, const LLRect& rect) | |||
710 | } | 708 | } |
711 | } | 709 | } |
712 | 710 | ||
713 | bool LLPanel::childGetRect(const LLString& id, LLRect& rect) const | 711 | bool LLPanel::childGetRect(const std::string& id, LLRect& rect) const |
714 | { | 712 | { |
715 | LLView* child = getChild<LLView>(id); | 713 | LLView* child = getChild<LLView>(id); |
716 | if (child) | 714 | if (child) |
@@ -721,7 +719,7 @@ bool LLPanel::childGetRect(const LLString& id, LLRect& rect) const | |||
721 | return false; | 719 | return false; |
722 | } | 720 | } |
723 | 721 | ||
724 | void LLPanel::childSetFocus(const LLString& id, BOOL focus) | 722 | void LLPanel::childSetFocus(const std::string& id, BOOL focus) |
725 | { | 723 | { |
726 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 724 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
727 | if (child) | 725 | if (child) |
@@ -730,7 +728,7 @@ void LLPanel::childSetFocus(const LLString& id, BOOL focus) | |||
730 | } | 728 | } |
731 | } | 729 | } |
732 | 730 | ||
733 | BOOL LLPanel::childHasFocus(const LLString& id) | 731 | BOOL LLPanel::childHasFocus(const std::string& id) |
734 | { | 732 | { |
735 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 733 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
736 | if (child) | 734 | if (child) |
@@ -745,7 +743,7 @@ BOOL LLPanel::childHasFocus(const LLString& id) | |||
745 | } | 743 | } |
746 | 744 | ||
747 | 745 | ||
748 | void LLPanel::childSetFocusChangedCallback(const LLString& id, void (*cb)(LLFocusableElement*, void*), void* user_data) | 746 | void LLPanel::childSetFocusChangedCallback(const std::string& id, void (*cb)(LLFocusableElement*, void*), void* user_data) |
749 | { | 747 | { |
750 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 748 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
751 | if (child) | 749 | if (child) |
@@ -754,7 +752,7 @@ void LLPanel::childSetFocusChangedCallback(const LLString& id, void (*cb)(LLFocu | |||
754 | } | 752 | } |
755 | } | 753 | } |
756 | 754 | ||
757 | void LLPanel::childSetCommitCallback(const LLString& id, void (*cb)(LLUICtrl*, void*), void *userdata ) | 755 | void LLPanel::childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void *userdata ) |
758 | { | 756 | { |
759 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 757 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
760 | if (child) | 758 | if (child) |
@@ -764,7 +762,7 @@ void LLPanel::childSetCommitCallback(const LLString& id, void (*cb)(LLUICtrl*, v | |||
764 | } | 762 | } |
765 | } | 763 | } |
766 | 764 | ||
767 | void LLPanel::childSetDoubleClickCallback(const LLString& id, void (*cb)(void*), void *userdata ) | 765 | void LLPanel::childSetDoubleClickCallback(const std::string& id, void (*cb)(void*), void *userdata ) |
768 | { | 766 | { |
769 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 767 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
770 | if (child) | 768 | if (child) |
@@ -777,7 +775,7 @@ void LLPanel::childSetDoubleClickCallback(const LLString& id, void (*cb)(void*), | |||
777 | } | 775 | } |
778 | } | 776 | } |
779 | 777 | ||
780 | void LLPanel::childSetValidate(const LLString& id, BOOL (*cb)(LLUICtrl*, void*)) | 778 | void LLPanel::childSetValidate(const std::string& id, BOOL (*cb)(LLUICtrl*, void*)) |
781 | { | 779 | { |
782 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 780 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
783 | if (child) | 781 | if (child) |
@@ -786,7 +784,7 @@ void LLPanel::childSetValidate(const LLString& id, BOOL (*cb)(LLUICtrl*, void*)) | |||
786 | } | 784 | } |
787 | } | 785 | } |
788 | 786 | ||
789 | void LLPanel::childSetUserData(const LLString& id, void* userdata) | 787 | void LLPanel::childSetUserData(const std::string& id, void* userdata) |
790 | { | 788 | { |
791 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 789 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
792 | if (child) | 790 | if (child) |
@@ -795,7 +793,7 @@ void LLPanel::childSetUserData(const LLString& id, void* userdata) | |||
795 | } | 793 | } |
796 | } | 794 | } |
797 | 795 | ||
798 | void LLPanel::childSetColor(const LLString& id, const LLColor4& color) | 796 | void LLPanel::childSetColor(const std::string& id, const LLColor4& color) |
799 | { | 797 | { |
800 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 798 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
801 | if (child) | 799 | if (child) |
@@ -804,7 +802,7 @@ void LLPanel::childSetColor(const LLString& id, const LLColor4& color) | |||
804 | } | 802 | } |
805 | } | 803 | } |
806 | 804 | ||
807 | LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const LLString& id) const | 805 | LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const |
808 | { | 806 | { |
809 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 807 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
810 | if (child) | 808 | if (child) |
@@ -814,7 +812,7 @@ LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const LLString& id | |||
814 | return NULL; | 812 | return NULL; |
815 | } | 813 | } |
816 | 814 | ||
817 | LLCtrlListInterface* LLPanel::childGetListInterface(const LLString& id) const | 815 | LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const |
818 | { | 816 | { |
819 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 817 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
820 | if (child) | 818 | if (child) |
@@ -824,7 +822,7 @@ LLCtrlListInterface* LLPanel::childGetListInterface(const LLString& id) const | |||
824 | return NULL; | 822 | return NULL; |
825 | } | 823 | } |
826 | 824 | ||
827 | LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const LLString& id) const | 825 | LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) const |
828 | { | 826 | { |
829 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 827 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
830 | if (child) | 828 | if (child) |
@@ -834,7 +832,7 @@ LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const LLString& id) cons | |||
834 | return NULL; | 832 | return NULL; |
835 | } | 833 | } |
836 | 834 | ||
837 | void LLPanel::childSetValue(const LLString& id, LLSD value) | 835 | void LLPanel::childSetValue(const std::string& id, LLSD value) |
838 | { | 836 | { |
839 | LLView* child = getChild<LLView>(id, true); | 837 | LLView* child = getChild<LLView>(id, true); |
840 | if (child) | 838 | if (child) |
@@ -843,7 +841,7 @@ void LLPanel::childSetValue(const LLString& id, LLSD value) | |||
843 | } | 841 | } |
844 | } | 842 | } |
845 | 843 | ||
846 | LLSD LLPanel::childGetValue(const LLString& id) const | 844 | LLSD LLPanel::childGetValue(const std::string& id) const |
847 | { | 845 | { |
848 | LLView* child = getChild<LLView>(id, true); | 846 | LLView* child = getChild<LLView>(id, true); |
849 | if (child) | 847 | if (child) |
@@ -854,7 +852,7 @@ LLSD LLPanel::childGetValue(const LLString& id) const | |||
854 | return LLSD(); | 852 | return LLSD(); |
855 | } | 853 | } |
856 | 854 | ||
857 | BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text) | 855 | BOOL LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text) |
858 | { | 856 | { |
859 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 857 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
860 | if (child) | 858 | if (child) |
@@ -864,7 +862,7 @@ BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLS | |||
864 | return FALSE; | 862 | return FALSE; |
865 | } | 863 | } |
866 | 864 | ||
867 | BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text) | 865 | BOOL LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text) |
868 | { | 866 | { |
869 | LLView* child = getChild<LLView>(id); | 867 | LLView* child = getChild<LLView>(id); |
870 | if (child) | 868 | if (child) |
@@ -874,7 +872,7 @@ BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LL | |||
874 | return FALSE; | 872 | return FALSE; |
875 | } | 873 | } |
876 | 874 | ||
877 | BOOL LLPanel::childSetToolTipArg(const LLString& id, const LLString& key, const LLStringExplicit& text) | 875 | BOOL LLPanel::childSetToolTipArg(const std::string& id, const std::string& key, const LLStringExplicit& text) |
878 | { | 876 | { |
879 | LLView* child = getChildView(id, true, FALSE); | 877 | LLView* child = getChildView(id, true, FALSE); |
880 | if (child) | 878 | if (child) |
@@ -884,7 +882,7 @@ BOOL LLPanel::childSetToolTipArg(const LLString& id, const LLString& key, const | |||
884 | return FALSE; | 882 | return FALSE; |
885 | } | 883 | } |
886 | 884 | ||
887 | void LLPanel::childSetMinValue(const LLString& id, LLSD min_value) | 885 | void LLPanel::childSetMinValue(const std::string& id, LLSD min_value) |
888 | { | 886 | { |
889 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 887 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
890 | if (child) | 888 | if (child) |
@@ -893,7 +891,7 @@ void LLPanel::childSetMinValue(const LLString& id, LLSD min_value) | |||
893 | } | 891 | } |
894 | } | 892 | } |
895 | 893 | ||
896 | void LLPanel::childSetMaxValue(const LLString& id, LLSD max_value) | 894 | void LLPanel::childSetMaxValue(const std::string& id, LLSD max_value) |
897 | { | 895 | { |
898 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | 896 | LLUICtrl* child = getChild<LLUICtrl>(id, true); |
899 | if (child) | 897 | if (child) |
@@ -902,7 +900,7 @@ void LLPanel::childSetMaxValue(const LLString& id, LLSD max_value) | |||
902 | } | 900 | } |
903 | } | 901 | } |
904 | 902 | ||
905 | void LLPanel::childShowTab(const LLString& id, const LLString& tabname, bool visible) | 903 | void LLPanel::childShowTab(const std::string& id, const std::string& tabname, bool visible) |
906 | { | 904 | { |
907 | LLTabContainer* child = getChild<LLTabContainer>(id); | 905 | LLTabContainer* child = getChild<LLTabContainer>(id); |
908 | if (child) | 906 | if (child) |
@@ -911,7 +909,7 @@ void LLPanel::childShowTab(const LLString& id, const LLString& tabname, bool vis | |||
911 | } | 909 | } |
912 | } | 910 | } |
913 | 911 | ||
914 | LLPanel *LLPanel::childGetVisibleTab(const LLString& id) const | 912 | LLPanel *LLPanel::childGetVisibleTab(const std::string& id) const |
915 | { | 913 | { |
916 | LLTabContainer* child = getChild<LLTabContainer>(id); | 914 | LLTabContainer* child = getChild<LLTabContainer>(id); |
917 | if (child) | 915 | if (child) |
@@ -921,7 +919,7 @@ LLPanel *LLPanel::childGetVisibleTab(const LLString& id) const | |||
921 | return NULL; | 919 | return NULL; |
922 | } | 920 | } |
923 | 921 | ||
924 | void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabname, void (*on_tab_clicked)(void*, bool), void *userdata) | 922 | void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata) |
925 | { | 923 | { |
926 | LLTabContainer* child = getChild<LLTabContainer>(id); | 924 | LLTabContainer* child = getChild<LLTabContainer>(id); |
927 | if (child) | 925 | if (child) |
@@ -935,7 +933,7 @@ void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabn | |||
935 | } | 933 | } |
936 | } | 934 | } |
937 | 935 | ||
938 | void LLPanel::childSetKeystrokeCallback(const LLString& id, void (*keystroke_callback)(LLLineEditor* caller, void* user_data), void *user_data) | 936 | void LLPanel::childSetKeystrokeCallback(const std::string& id, void (*keystroke_callback)(LLLineEditor* caller, void* user_data), void *user_data) |
939 | { | 937 | { |
940 | LLLineEditor* child = getChild<LLLineEditor>(id); | 938 | LLLineEditor* child = getChild<LLLineEditor>(id); |
941 | if (child) | 939 | if (child) |
@@ -948,7 +946,7 @@ void LLPanel::childSetKeystrokeCallback(const LLString& id, void (*keystroke_cal | |||
948 | } | 946 | } |
949 | } | 947 | } |
950 | 948 | ||
951 | void LLPanel::childSetPrevalidate(const LLString& id, BOOL (*func)(const LLWString &) ) | 949 | void LLPanel::childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWString &) ) |
952 | { | 950 | { |
953 | LLLineEditor* child = getChild<LLLineEditor>(id); | 951 | LLLineEditor* child = getChild<LLLineEditor>(id); |
954 | if (child) | 952 | if (child) |
@@ -957,7 +955,7 @@ void LLPanel::childSetPrevalidate(const LLString& id, BOOL (*func)(const LLWStri | |||
957 | } | 955 | } |
958 | } | 956 | } |
959 | 957 | ||
960 | void LLPanel::childSetWrappedText(const LLString& id, const LLString& text, bool visible) | 958 | void LLPanel::childSetWrappedText(const std::string& id, const std::string& text, bool visible) |
961 | { | 959 | { |
962 | LLTextBox* child = getChild<LLTextBox>(id); | 960 | LLTextBox* child = getChild<LLTextBox>(id); |
963 | if (child) | 961 | if (child) |
@@ -967,7 +965,7 @@ void LLPanel::childSetWrappedText(const LLString& id, const LLString& text, bool | |||
967 | } | 965 | } |
968 | } | 966 | } |
969 | 967 | ||
970 | void LLPanel::childSetAction(const LLString& id, void(*function)(void*), void* value) | 968 | void LLPanel::childSetAction(const std::string& id, void(*function)(void*), void* value) |
971 | { | 969 | { |
972 | LLButton* button = getChild<LLButton>(id); | 970 | LLButton* button = getChild<LLButton>(id); |
973 | if (button) | 971 | if (button) |
@@ -976,7 +974,7 @@ void LLPanel::childSetAction(const LLString& id, void(*function)(void*), void* v | |||
976 | } | 974 | } |
977 | } | 975 | } |
978 | 976 | ||
979 | void LLPanel::childSetActionTextbox(const LLString& id, void(*function)(void*)) | 977 | void LLPanel::childSetActionTextbox(const std::string& id, void(*function)(void*)) |
980 | { | 978 | { |
981 | LLTextBox* textbox = getChild<LLTextBox>(id); | 979 | LLTextBox* textbox = getChild<LLTextBox>(id); |
982 | if (textbox) | 980 | if (textbox) |
@@ -985,7 +983,7 @@ void LLPanel::childSetActionTextbox(const LLString& id, void(*function)(void*)) | |||
985 | } | 983 | } |
986 | } | 984 | } |
987 | 985 | ||
988 | void LLPanel::childSetControlName(const LLString& id, const LLString& control_name) | 986 | void LLPanel::childSetControlName(const std::string& id, const std::string& control_name) |
989 | { | 987 | { |
990 | LLView* view = getChild<LLView>(id); | 988 | LLView* view = getChild<LLView>(id); |
991 | if (view) | 989 | if (view) |
@@ -995,7 +993,7 @@ void LLPanel::childSetControlName(const LLString& id, const LLString& control_na | |||
995 | } | 993 | } |
996 | 994 | ||
997 | //virtual | 995 | //virtual |
998 | LLView* LLPanel::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const | 996 | LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const |
999 | { | 997 | { |
1000 | // just get child, don't try to create a dummy one | 998 | // just get child, don't try to create a dummy one |
1001 | LLView* view = LLUICtrl::getChildView(name, recurse, FALSE); | 999 | LLView* view = LLUICtrl::getChildView(name, recurse, FALSE); |
@@ -1010,7 +1008,7 @@ LLView* LLPanel::getChildView(const LLString& name, BOOL recurse, BOOL create_if | |||
1010 | return view; | 1008 | return view; |
1011 | } | 1009 | } |
1012 | 1010 | ||
1013 | void LLPanel::childNotFound(const LLString& id) const | 1011 | void LLPanel::childNotFound(const std::string& id) const |
1014 | { | 1012 | { |
1015 | if (mExpectedMembers.find(id) == mExpectedMembers.end()) | 1013 | if (mExpectedMembers.find(id) == mExpectedMembers.end()) |
1016 | { | 1014 | { |
@@ -1024,7 +1022,7 @@ void LLPanel::childDisplayNotFound() | |||
1024 | { | 1022 | { |
1025 | return; | 1023 | return; |
1026 | } | 1024 | } |
1027 | LLString msg; | 1025 | std::string msg; |
1028 | expected_members_list_t::iterator itor; | 1026 | expected_members_list_t::iterator itor; |
1029 | for (itor=mNewExpectedMembers.begin(); itor!=mNewExpectedMembers.end(); ++itor) | 1027 | for (itor=mNewExpectedMembers.begin(); itor!=mNewExpectedMembers.end(); ++itor) |
1030 | { | 1028 | { |
@@ -1033,7 +1031,7 @@ void LLPanel::childDisplayNotFound() | |||
1033 | mExpectedMembers.insert(*itor); | 1031 | mExpectedMembers.insert(*itor); |
1034 | } | 1032 | } |
1035 | mNewExpectedMembers.clear(); | 1033 | mNewExpectedMembers.clear(); |
1036 | LLString::format_map_t args; | 1034 | LLStringUtil::format_map_t args; |
1037 | args["[CONTROLS]"] = msg; | 1035 | args["[CONTROLS]"] = msg; |
1038 | LLAlertDialog::showXml("FloaterNotFound", args); | 1036 | LLAlertDialog::showXml("FloaterNotFound", args); |
1039 | } | 1037 | } |
@@ -1073,7 +1071,7 @@ struct LLLayoutStack::LLEmbeddedPanel | |||
1073 | { | 1071 | { |
1074 | min_dim = mMinWidth; | 1072 | min_dim = mMinWidth; |
1075 | } | 1073 | } |
1076 | mResizeBar = new LLResizeBar("resizer", mPanel, LLRect(), min_dim, S32_MAX, side); | 1074 | mResizeBar = new LLResizeBar(std::string("resizer"), mPanel, LLRect(), min_dim, S32_MAX, side); |
1077 | mResizeBar->setEnableSnapping(FALSE); | 1075 | mResizeBar->setEnableSnapping(FALSE); |
1078 | // panels initialized as hidden should not start out partially visible | 1076 | // panels initialized as hidden should not start out partially visible |
1079 | if (!mPanel->getVisible()) | 1077 | if (!mPanel->getVisible()) |
@@ -1168,7 +1166,7 @@ LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const | |||
1168 | //static | 1166 | //static |
1169 | LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) | 1167 | LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
1170 | { | 1168 | { |
1171 | LLString orientation_string("vertical"); | 1169 | std::string orientation_string("vertical"); |
1172 | node->getAttributeString("orientation", orientation_string); | 1170 | node->getAttributeString("orientation", orientation_string); |
1173 | 1171 | ||
1174 | eLayoutOrientation orientation = VERTICAL; | 1172 | eLayoutOrientation orientation = VERTICAL; |
@@ -1192,7 +1190,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor | |||
1192 | // don't allow negative spacing values | 1190 | // don't allow negative spacing values |
1193 | layout_stackp->mPanelSpacing = llmax(layout_stackp->mPanelSpacing, 0); | 1191 | layout_stackp->mPanelSpacing = llmax(layout_stackp->mPanelSpacing, 0); |
1194 | 1192 | ||
1195 | LLString name("stack"); | 1193 | std::string name("stack"); |
1196 | node->getAttributeString("name", name); | 1194 | node->getAttributeString("name", name); |
1197 | 1195 | ||
1198 | layout_stackp->setName(name); | 1196 | layout_stackp->setName(name); |
@@ -1225,7 +1223,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor | |||
1225 | BOOL user_resize = FALSE; | 1223 | BOOL user_resize = FALSE; |
1226 | child->getAttributeBOOL("user_resize", user_resize); | 1224 | child->getAttributeBOOL("user_resize", user_resize); |
1227 | 1225 | ||
1228 | LLPanel* panelp = new LLPanel("auto_panel"); | 1226 | LLPanel* panelp = new LLPanel(std::string("auto_panel")); |
1229 | LLView* new_child = factory->createWidget(panelp, child); | 1227 | LLView* new_child = factory->createWidget(panelp, child); |
1230 | if (new_child) | 1228 | if (new_child) |
1231 | { | 1229 | { |