From 215f423cbe18fe9ca14a26caef918d303bad28ff Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:11 -0500 Subject: Second Life viewer sources 1.18.4.0-RC --- linden/indra/llui/llalertdialog.cpp | 94 ++++--------- linden/indra/llui/llalertdialog.h | 5 +- linden/indra/llui/llbutton.cpp | 15 ++- linden/indra/llui/llbutton.h | 29 ++-- linden/indra/llui/llcallbackmap.h | 3 + linden/indra/llui/llcheckboxctrl.cpp | 7 +- linden/indra/llui/llcheckboxctrl.h | 7 +- linden/indra/llui/llclipboard.cpp | 3 + linden/indra/llui/llclipboard.h | 3 + linden/indra/llui/llcombobox.cpp | 21 +-- linden/indra/llui/llcombobox.h | 9 +- linden/indra/llui/llctrlselectioninterface.cpp | 3 + linden/indra/llui/llctrlselectioninterface.h | 3 + linden/indra/llui/lldraghandle.cpp | 3 + linden/indra/llui/lldraghandle.h | 3 + linden/indra/llui/lleditmenuhandler.cpp | 43 +++--- linden/indra/llui/lleditmenuhandler.h | 43 +++--- linden/indra/llui/llfloater.cpp | 3 + linden/indra/llui/llfloater.h | 3 + linden/indra/llui/llfocusmgr.cpp | 3 + linden/indra/llui/llfocusmgr.h | 3 + linden/indra/llui/llhtmlhelp.h | 3 + linden/indra/llui/lliconctrl.cpp | 3 + linden/indra/llui/lliconctrl.h | 3 + linden/indra/llui/llkeywords.cpp | 3 + linden/indra/llui/llkeywords.h | 3 + linden/indra/llui/lllineeditor.cpp | 50 ++++--- linden/indra/llui/lllineeditor.h | 19 ++- linden/indra/llui/llmemberlistener.h | 5 +- linden/indra/llui/llmenugl.cpp | 15 ++- linden/indra/llui/llmenugl.h | 9 +- linden/indra/llui/llmodaldialog.cpp | 3 + linden/indra/llui/llmodaldialog.h | 3 + linden/indra/llui/llpanel.cpp | 13 +- linden/indra/llui/llpanel.h | 11 +- linden/indra/llui/llradiogroup.cpp | 3 + linden/indra/llui/llradiogroup.h | 3 + linden/indra/llui/llresizebar.cpp | 3 + linden/indra/llui/llresizebar.h | 3 + linden/indra/llui/llresizehandle.cpp | 3 + linden/indra/llui/llresizehandle.h | 3 + linden/indra/llui/llresmgr.cpp | 3 + linden/indra/llui/llresmgr.h | 3 + linden/indra/llui/llrootview.cpp | 3 + linden/indra/llui/llrootview.h | 3 + linden/indra/llui/llscrollbar.cpp | 3 + linden/indra/llui/llscrollbar.h | 3 + linden/indra/llui/llscrollcontainer.cpp | 3 + linden/indra/llui/llscrollcontainer.h | 3 + linden/indra/llui/llscrollingpanellist.cpp | 3 + linden/indra/llui/llscrollingpanellist.h | 3 + linden/indra/llui/llscrolllistctrl.cpp | 46 +++++-- linden/indra/llui/llscrolllistctrl.h | 13 +- linden/indra/llui/llslider.cpp | 3 + linden/indra/llui/llslider.h | 3 + linden/indra/llui/llsliderctrl.cpp | 9 +- linden/indra/llui/llsliderctrl.h | 7 +- linden/indra/llui/llspinctrl.cpp | 5 +- linden/indra/llui/llspinctrl.h | 5 +- linden/indra/llui/llstyle.cpp | 3 + linden/indra/llui/llstyle.h | 3 + linden/indra/llui/lltabcontainer.cpp | 3 + linden/indra/llui/lltabcontainer.h | 3 + linden/indra/llui/lltabcontainervertical.cpp | 3 + linden/indra/llui/lltabcontainervertical.h | 3 + linden/indra/llui/lltextbox.cpp | 9 +- linden/indra/llui/lltextbox.h | 9 +- linden/indra/llui/lltexteditor.cpp | 25 +++- linden/indra/llui/lltexteditor.h | 17 ++- linden/indra/llui/llui.cpp | 3 + linden/indra/llui/llui.h | 3 + linden/indra/llui/lluiconstants.h | 3 + linden/indra/llui/lluictrl.cpp | 7 +- linden/indra/llui/lluictrl.h | 7 +- linden/indra/llui/lluictrlfactory.cpp | 6 +- linden/indra/llui/lluictrlfactory.h | 3 + linden/indra/llui/lluistring.cpp | 3 + linden/indra/llui/lluistring.h | 3 + linden/indra/llui/lluixmltags.h | 177 +++++++++++++------------ linden/indra/llui/llundo.cpp | 3 + linden/indra/llui/llundo.h | 3 + linden/indra/llui/llview.cpp | 26 ++-- linden/indra/llui/llview.h | 27 ++-- linden/indra/llui/llviewborder.cpp | 3 + linden/indra/llui/llviewborder.h | 3 + linden/indra/llui/llviewquery.cpp | 3 + linden/indra/llui/llviewquery.h | 3 + 87 files changed, 612 insertions(+), 340 deletions(-) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llalertdialog.cpp b/linden/indra/llui/llalertdialog.cpp index 8950fcd..0fa3585 100644 --- a/linden/indra/llui/llalertdialog.cpp +++ b/linden/indra/llui/llalertdialog.cpp @@ -2,6 +2,8 @@ * @file llalertdialog.cpp * @brief LLAlertDialog base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -255,11 +258,9 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); const S32 EDITOR_HEIGHT = 20; - // buttons + // Buttons std::vector default_option_list; - mNumOptions = optionsp->size(); - if( 0 == mNumOptions ) { default_option_list.push_back("Close"); @@ -269,7 +270,6 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa } const std::vector& options = *optionsp; - mButtonData = new ButtonData[mNumOptions]; // Calc total width of buttons @@ -286,55 +286,16 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa btn_total_width = (mNumOptions * button_width) + ((mNumOptions - 1) * BTN_HPAD); } - // Split message into lines, separated by '\n' + // Message: create text box using raw string, as text has been structure deliberately + // Use size of created text box to generate dialog box size LLString msg = msg_in; - LLAlertDialog::format(msg, args); - + LLAlertDialog::format( msg, args ); llwarns << "Alert: " << msg << llendl; + LLTextBox* msg_box = new LLTextBox( "Alert message", msg, (F32)MAX_ALLOWED_MSG_WIDTH, font ); - S32 max_msg_width = 0; - std::vector msg_lines; - - boost_tokenizer tokens(msg, boost::char_separator("\n")); - for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - LLString line(*token_iter); - boost_tokenizer line_toks(line, boost::char_separator(" \t")); - LLString cur_line; - S32 cur_line_width = 0; - for (boost_tokenizer::iterator token_iter2 = line_toks.begin(); token_iter2 != line_toks.end(); ++token_iter2) - { - LLString tok(*token_iter2); - LLString word; - if (cur_line_width > 0) - { - word = " "; - } - word += tok; - S32 word_width = S32(font->getWidth( word ) + 0.99f); - if (cur_line_width > 0 && cur_line_width + word_width > MAX_ALLOWED_MSG_WIDTH) - { - max_msg_width = llmax( max_msg_width, cur_line_width + MSG_PAD); - msg_lines.push_back( cur_line ); - cur_line.clear(); - cur_line_width = 0; - word = tok; // no ' ' - } - cur_line += word; - cur_line_width += word_width; - } - if (cur_line_width > 0) - { - max_msg_width = llmax( max_msg_width, cur_line_width ); - msg_lines.push_back( cur_line ); - } - } - - // pad message box so we don't clip last character - max_msg_width += 2; - - S32 dialog_width = llmax( btn_total_width, max_msg_width ) + 2 * HPAD; - S32 dialog_height = LINE_HEIGHT * msg_lines.size() + 3 * VPAD + BTN_HEIGHT; + const LLRect& text_rect = msg_box->getRect(); + S32 dialog_width = llmax( btn_total_width, text_rect.getWidth() ) + 2 * HPAD; + S32 dialog_height = text_rect.getHeight() + 3 * VPAD + BTN_HEIGHT; if (hasTitleBar()) { @@ -346,26 +307,20 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa dialog_width = llmax(dialog_width, S32(font->getWidth( edit_text ) + 0.99f)); dialog_height += EDITOR_HEIGHT; } - + reshape( dialog_width, dialog_height, FALSE ); - // Message - S32 msg_x = (mRect.getWidth() - max_msg_width) / 2; - S32 msg_y = mRect.getHeight() - VPAD - LINE_HEIGHT; + S32 msg_y = mRect.getHeight() - VPAD; if (hasTitleBar()) { msg_y -= LINE_HEIGHT; // room for title } - - for( std::vector::iterator iter = msg_lines.begin(); iter != msg_lines.end(); ++iter ) - { - LLRect msg_rect; - msg_rect.setOriginAndSize( msg_x, msg_y, max_msg_width, LINE_HEIGHT ); - LLTextBox* label_box = new LLTextBox( "Alert message", msg_rect, iter->c_str(), font ); - label_box->setColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ); - addChild(label_box); - msg_y -= LINE_HEIGHT; - } + + LLRect rect; + rect.setLeftTopAndSize( HPAD, msg_y, text_rect.getWidth(), text_rect.getHeight() ); + msg_box->setRect( rect ); + msg_box->setColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ); + addChild(msg_box); // Buttons S32 button_left = (mRect.getWidth() - btn_total_width) / 2; @@ -386,7 +341,7 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa mButtonData[i].mSelf = this; mButtonData[i].mButton = btn; mButtonData[i].mOption = i; - + addChild(btn); if( i == default_option ) @@ -402,13 +357,12 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa { S32 y = VPAD + BTN_HEIGHT + VPAD/2; mLineEditor = new LLLineEditor("lineeditor", - LLRect( HPAD, y+EDITOR_HEIGHT, dialog_width-HPAD, y), - edit_text, - LLFontGL::sSansSerif, - STD_STRING_STR_LEN); + LLRect( HPAD, y+EDITOR_HEIGHT, dialog_width-HPAD, y), + edit_text, + LLFontGL::sSansSerif, + STD_STRING_STR_LEN); addChild(mLineEditor); } - } bool LLAlertDialog::setCheckBox( const LLString& check_title, const LLString& check_control ) diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h index 1add4a4..acd0b7f 100644 --- a/linden/indra/llui/llalertdialog.h +++ b/linden/indra/llui/llalertdialog.h @@ -2,6 +2,8 @@ * @file llalertdialog.h * @brief LLAlertDialog base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_ALERTDIALOG_H @@ -139,7 +142,7 @@ public: class LLAlertDialogTemplate : public LLRefCount { public: - LLAlertDialogTemplate() : mTitle(""), mModal(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {} + LLAlertDialogTemplate() : mTitle(), mModal(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {} void addOption(const LLString& label, const LLString& ignore_text, BOOL is_default = FALSE) { diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index 6ed6885..65cbcf3 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp @@ -2,6 +2,8 @@ * @file llbutton.cpp * @brief LLButton base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -773,36 +776,36 @@ LLSD LLButton::getValue() const return mToggleState; } -void LLButton::setLabel( const LLString& label ) +void LLButton::setLabel( const LLStringExplicit& label ) { setLabelUnselected(label); setLabelSelected(label); } //virtual -BOOL LLButton::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLButton::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mUnselectedLabel.setArg(key, text); mSelectedLabel.setArg(key, text); return TRUE; } -void LLButton::setLabelUnselected( const LLString& label ) +void LLButton::setLabelUnselected( const LLStringExplicit& label ) { mUnselectedLabel = label; } -void LLButton::setLabelSelected( const LLString& label ) +void LLButton::setLabelSelected( const LLStringExplicit& label ) { mSelectedLabel = label; } -void LLButton::setDisabledLabel( const LLString& label ) +void LLButton::setDisabledLabel( const LLStringExplicit& label ) { mDisabledLabel = label; } -void LLButton::setDisabledSelectedLabel( const LLString& label ) +void LLButton::setDisabledSelectedLabel( const LLStringExplicit& label ) { mDisabledSelectedLabel = label; } diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index d26011b..5f7d917 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h @@ -2,6 +2,8 @@ * @file llbutton.h * @brief Header for buttons * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLBUTTON_H @@ -65,7 +68,7 @@ class LLButton { public: // simple button with text label - LLButton(const LLString& name, const LLRect &rect, const LLString& control_name = "", + LLButton(const LLString& name, const LLRect &rect, const LLString& control_name = LLString(), void (*on_click)(void*) = NULL, void *data = NULL); LLButton(const LLString& name, const LLRect& rect, @@ -149,12 +152,12 @@ public: virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - void setLabel( const LLString& label); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); - void setLabelUnselected(const LLString& label); - void setLabelSelected(const LLString& label); - void setDisabledLabel(const LLString& disabled_label); - void setDisabledSelectedLabel(const LLString& disabled_label); + void setLabel( const LLStringExplicit& label); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); + void setLabelUnselected(const LLStringExplicit& label); + void setLabelSelected(const LLStringExplicit& label); + void setDisabledLabel(const LLStringExplicit& disabled_label); + void setDisabledSelectedLabel(const LLStringExplicit& disabled_label); void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; } void setFont(const LLFontGL *font) @@ -285,12 +288,12 @@ class LLSquareButton { public: LLSquareButton(const LLString& name, const LLRect& rect, - const LLString& label, - const LLFontGL *font = NULL, - const LLString& control_name = "", - void (*click_callback)(void*) = NULL, - void *callback_data = NULL, - const LLString& selected_label = LLString::null ); + const LLString& label, + const LLFontGL *font = NULL, + const LLString& control_name = LLString(), + void (*click_callback)(void*) = NULL, + void *callback_data = NULL, + const LLString& selected_label = LLString::null ); }; // Helpful functions diff --git a/linden/indra/llui/llcallbackmap.h b/linden/indra/llui/llcallbackmap.h index 4a47f60..0efda5d 100644 --- a/linden/indra/llui/llcallbackmap.h +++ b/linden/indra/llui/llcallbackmap.h @@ -2,6 +2,8 @@ * @file llcallbackmap.h * @brief LLCallbackMap base class * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // llcallbackmap.h diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp index f49e220..504b342 100644 --- a/linden/indra/llui/llcheckboxctrl.cpp +++ b/linden/indra/llui/llcheckboxctrl.cpp @@ -2,6 +2,8 @@ * @file llcheckboxctrl.cpp * @brief LLCheckBoxCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // The mutants are coming! @@ -239,7 +242,7 @@ LLSD LLCheckBoxCtrl::getValue() const return mButton->getToggleState(); } -void LLCheckBoxCtrl::setLabel( const LLString& label ) +void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label ) { mLabel->setText( label ); reshape(getRect().getWidth(), getRect().getHeight(), FALSE); @@ -250,7 +253,7 @@ LLString LLCheckBoxCtrl::getLabel() const return mLabel->getText(); } -BOOL LLCheckBoxCtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLCheckBoxCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { BOOL res = mLabel->setTextArg(key, text); reshape(getRect().getWidth(), getRect().getHeight(), FALSE); diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h index 6aa7113..513b293 100644 --- a/linden/indra/llui/llcheckboxctrl.h +++ b/linden/indra/llui/llcheckboxctrl.h @@ -2,6 +2,8 @@ * @file llcheckboxctrl.h * @brief LLCheckBoxCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLCHECKBOXCTRL_H @@ -91,7 +94,7 @@ public: virtual void setTentative(BOOL b) { mButton->setTentative(b); } virtual BOOL getTentative() const { return mButton->getTentative(); } - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void clear(); virtual void onCommit(); @@ -102,7 +105,7 @@ public: void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; } void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; } - void setLabel( const LLString& label ); + void setLabel( const LLStringExplicit& label ); LLString getLabel() const; virtual void setControlName(const LLString& control_name, LLView* context); diff --git a/linden/indra/llui/llclipboard.cpp b/linden/indra/llui/llclipboard.cpp index 19f0188..fc3967f 100644 --- a/linden/indra/llui/llclipboard.cpp +++ b/linden/indra/llui/llclipboard.cpp @@ -2,6 +2,8 @@ * @file llclipboard.cpp * @brief LLClipboard base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llclipboard.h b/linden/indra/llui/llclipboard.h index dc4cb32..999a17a 100644 --- a/linden/indra/llui/llclipboard.h +++ b/linden/indra/llui/llclipboard.h @@ -2,6 +2,8 @@ * @file llclipboard.h * @brief LLClipboard base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLCLIPBOARD_H diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index b71d88f..5f76cfc 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp @@ -2,6 +2,8 @@ * @file llcombobox.cpp * @brief LLComboBox base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A control that displays the name of the chosen item, which when @@ -226,12 +229,12 @@ void LLComboBox::clear() { if (mTextEntry) { - mTextEntry->setText(""); + mTextEntry->setText(LLString::null); } - mButton->setLabelSelected(""); - mButton->setLabelUnselected(""); - mButton->setDisabledLabel(""); - mButton->setDisabledSelectedLabel(""); + mButton->setLabelSelected(LLString::null); + mButton->setLabelUnselected(LLString::null); + mButton->setDisabledLabel(LLString::null); + mButton->setDisabledSelectedLabel(LLString::null); mList->deselectAllItems(); } @@ -306,7 +309,7 @@ void LLComboBox::sortByName() // Choose an item with a given name in the menu. // Returns TRUE if the item was found. -BOOL LLComboBox::setSimple(const LLString& name) +BOOL LLComboBox::setSimple(const LLStringExplicit& name) { BOOL found = mList->selectSimpleItem(name, FALSE); @@ -368,7 +371,7 @@ LLSD LLComboBox::getValue() const } } -void LLComboBox::setLabel(const LLString& name) +void LLComboBox::setLabel(const LLStringExplicit& name) { if ( mAllowTextEntry ) { @@ -800,7 +803,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative // clear label on button LLString cur_label = mButton->getLabelSelected(); - setLabel(""); + setLabel(LLString::null); if (!mTextEntry) { LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); @@ -849,7 +852,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative mTextEntryTentative = set_tentative; } -void LLComboBox::setTextEntry(const LLString& text) +void LLComboBox::setTextEntry(const LLStringExplicit& text) { if (mTextEntry) { diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index 1589c30..ff17d28 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h @@ -2,6 +2,8 @@ * @file llcombobox.h * @brief LLComboBox base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A control that displays the name of the chosen item, which when clicked @@ -102,7 +105,7 @@ public: virtual LLSD getValue() const; void setAllowTextEntry(BOOL allow, S32 max_chars = 50, BOOL make_tentative = TRUE); - void setTextEntry(const LLString& text); + void setTextEntry(const LLStringExplicit& text); void add(const LLString& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu void add(const LLString& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); @@ -114,7 +117,7 @@ public: void sortByName(); // Sort the entries in the combobox by name // Select current item by name using selectSimpleItem. Returns FALSE if not found. - BOOL setSimple(const LLString& name); + BOOL setSimple(const LLStringExplicit& name); // Get name of current item. Returns an empty string if not found. const LLString& getSimple() const; // Get contents of column x of selected row @@ -122,7 +125,7 @@ public: // Sets the label, which doesn't have to exist in the label. // This is probably a UI abuse. - void setLabel(const LLString& name); + void setLabel(const LLStringExplicit& name); BOOL remove(const LLString& name); // remove item "name", return TRUE if found and removed diff --git a/linden/indra/llui/llctrlselectioninterface.cpp b/linden/indra/llui/llctrlselectioninterface.cpp index d3b83a2..3dd4019 100644 --- a/linden/indra/llui/llctrlselectioninterface.cpp +++ b/linden/indra/llui/llctrlselectioninterface.cpp @@ -2,6 +2,8 @@ * @file llctrlselectioninterface.cpp * @brief Programmatic selection of items in a list. * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llctrlselectioninterface.h b/linden/indra/llui/llctrlselectioninterface.h index 237aa94..688c0a2 100644 --- a/linden/indra/llui/llctrlselectioninterface.h +++ b/linden/indra/llui/llctrlselectioninterface.h @@ -2,6 +2,8 @@ * @file llctrlselectioninterface.h * @brief Programmatic selection of items in a list. * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LLCTRLSELECTIONINTERFACE_H diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp index 3497f0d..ca536ea 100644 --- a/linden/indra/llui/lldraghandle.cpp +++ b/linden/indra/llui/lldraghandle.cpp @@ -2,6 +2,8 @@ * @file lldraghandle.cpp * @brief LLDragHandle base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A widget for dragging a view around the screen using the mouse. diff --git a/linden/indra/llui/lldraghandle.h b/linden/indra/llui/lldraghandle.h index 691851d..50d199f 100644 --- a/linden/indra/llui/lldraghandle.h +++ b/linden/indra/llui/lldraghandle.h @@ -2,6 +2,8 @@ * @file lldraghandle.h * @brief LLDragHandle base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A widget for dragging a view around the screen using the mouse. diff --git a/linden/indra/llui/lleditmenuhandler.cpp b/linden/indra/llui/lleditmenuhandler.cpp index 559cef4..9fb9cbe 100644 --- a/linden/indra/llui/lleditmenuhandler.cpp +++ b/linden/indra/llui/lleditmenuhandler.cpp @@ -2,28 +2,31 @@ * @file lleditmenuhandler.cpp * @authors Aaron Yonas, James Cook * +* $LicenseInfo:firstyear=2006&license=viewergpl$ +* * Copyright (c) 2006-2007, Linden Research, Inc. * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. +* Second Life Viewer Source Code +* The source code in this file ("Source Code") is provided by Linden Lab +* to you under the terms of the GNU General Public License, version 2.0 +* ("GPL"), unless you have obtained a separate licensing agreement +* ("Other License"), formally executed by you and Linden Lab. Terms of +* the GPL can be found in doc/GPL-license.txt in this distribution, or +* online at http://secondlife.com/developers/opensource/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlife.com/developers/opensource/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/lleditmenuhandler.h b/linden/indra/llui/lleditmenuhandler.h index ec3d246..b035a29 100644 --- a/linden/indra/llui/lleditmenuhandler.h +++ b/linden/indra/llui/lleditmenuhandler.h @@ -2,28 +2,31 @@ * @file lleditmenuhandler.h * @authors Aaron Yonas, James Cook * +* $LicenseInfo:firstyear=2006&license=viewergpl$ +* * Copyright (c) 2006-2007, Linden Research, Inc. * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. +* Second Life Viewer Source Code +* The source code in this file ("Source Code") is provided by Linden Lab +* to you under the terms of the GNU General Public License, version 2.0 +* ("GPL"), unless you have obtained a separate licensing agreement +* ("Other License"), formally executed by you and Linden Lab. Terms of +* the GPL can be found in doc/GPL-license.txt in this distribution, or +* online at http://secondlife.com/developers/opensource/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlife.com/developers/opensource/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ */ #ifndef LLEDITMENUHANDLER_H diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 77fddfb..41a67f2 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -2,6 +2,8 @@ * @file llfloater.cpp * @brief LLFloater base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Floating "windows" within the GL display, like the inventory floater, diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index baa192a..d0494ea 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h @@ -2,6 +2,8 @@ * @file llfloater.h * @brief LLFloater base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Floating "windows" within the GL display, like the inventory floater, diff --git a/linden/indra/llui/llfocusmgr.cpp b/linden/indra/llui/llfocusmgr.cpp index f9f3350..6358ccb 100644 --- a/linden/indra/llui/llfocusmgr.cpp +++ b/linden/indra/llui/llfocusmgr.cpp @@ -2,6 +2,8 @@ * @file llfocusmgr.cpp * @brief LLFocusMgr base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llfocusmgr.h b/linden/indra/llui/llfocusmgr.h index 9b7a84e..1c25153 100644 --- a/linden/indra/llui/llfocusmgr.h +++ b/linden/indra/llui/llfocusmgr.h @@ -2,6 +2,8 @@ * @file llfocusmgr.h * @brief LLFocusMgr base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Singleton that manages keyboard and mouse focus diff --git a/linden/indra/llui/llhtmlhelp.h b/linden/indra/llui/llhtmlhelp.h index 4b2a43a..816d0dd 100644 --- a/linden/indra/llui/llhtmlhelp.h +++ b/linden/indra/llui/llhtmlhelp.h @@ -2,6 +2,8 @@ * @file llhtmlhelp.h * @brief HTML Help floater interface * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLHTMLHELP_H diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp index 2d3071b..1e49210 100644 --- a/linden/indra/llui/lliconctrl.cpp +++ b/linden/indra/llui/lliconctrl.cpp @@ -2,6 +2,8 @@ * @file lliconctrl.cpp * @brief LLIconCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/lliconctrl.h b/linden/indra/llui/lliconctrl.h index 8dbe6db..b789269 100644 --- a/linden/indra/llui/lliconctrl.h +++ b/linden/indra/llui/lliconctrl.h @@ -2,6 +2,8 @@ * @file lliconctrl.h * @brief LLIconCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLICONCTRL_H diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp index 8997bd6..5efb8be 100644 --- a/linden/indra/llui/llkeywords.cpp +++ b/linden/indra/llui/llkeywords.cpp @@ -2,6 +2,8 @@ * @file llkeywords.cpp * @brief Keyword list for LSL * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * * Copyright (c) 2000-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llkeywords.h b/linden/indra/llui/llkeywords.h index 040df53..4309f16 100644 --- a/linden/indra/llui/llkeywords.h +++ b/linden/indra/llui/llkeywords.h @@ -2,6 +2,8 @@ * @file llkeywords.h * @brief Keyword list for LSL * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLKEYWORDS_H diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index dca62d7..9671065 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -2,6 +2,8 @@ * @file lllineeditor.cpp * @brief LLLineEditor base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Text editor widget to let users enter a single line. @@ -155,7 +158,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mHandleEditKeysDirectly( FALSE ), mSelectAllonFocusReceived( FALSE ), mPassDelete(FALSE), - mReadOnly(FALSE) + mReadOnly(FALSE), + mLastIMEPosition( -1, -1 ) { llassert( max_length_bytes > 0 ); @@ -316,12 +320,12 @@ void LLLineEditor::setBorderWidth(S32 left, S32 right) mMaxHPixels = mRect.getWidth() - mMinHPixels - mBorderThickness - mBorderRight; } -void LLLineEditor::setLabel(const LLString &new_label) +void LLLineEditor::setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } -void LLLineEditor::setText(const LLString &new_text) +void LLLineEditor::setText(const LLStringExplicit &new_text) { // If new text is identical, don't copy and don't move insertion point if (mText.getString() == new_text) @@ -1629,6 +1633,17 @@ void LLLineEditor::draw() LLFontGL::NORMAL, 1); } + + // Make sure the IME is in the right place + S32 pixels_after_scroll = findPixelNearestPos(); // RCalculcate for IME position + LLRect screen_pos = getScreenRect(); + LLCoordGL ime_pos( screen_pos.mLeft + pixels_after_scroll, screen_pos.mTop - UI_LINEEDITOR_V_PAD ); + if ( ime_pos.mX != mLastIMEPosition.mX || ime_pos.mY != mLastIMEPosition.mY ) + { + mLastIMEPosition.mX = ime_pos.mX; + mLastIMEPosition.mY = ime_pos.mY; + getWindow()->setLanguageTextInput( ime_pos ); + } } } @@ -1792,7 +1807,7 @@ BOOL LLLineEditor::prevalidateFloat(const LLWString &str) for( ; i < len; i++ ) { - if( (decimal_point != trimmed[i] ) && !isdigit( trimmed[i] ) ) + if( (decimal_point != trimmed[i] ) && !LLStringOps::isDigit( trimmed[i] ) ) { success = FALSE; break; @@ -1847,7 +1862,7 @@ BOOL LLLineEditor::postvalidateFloat(const LLString &str) } } else - if( isdigit( trimmed[i] ) ) + if( LLStringOps::isDigit( trimmed[i] ) ) { has_digit = TRUE; } @@ -1890,7 +1905,7 @@ BOOL LLLineEditor::prevalidateInt(const LLWString &str) for( ; i < len; i++ ) { - if( !isdigit( trimmed[i] ) ) + if( !LLStringOps::isDigit( trimmed[i] ) ) { success = FALSE; break; @@ -1919,7 +1934,7 @@ BOOL LLLineEditor::prevalidatePositiveS32(const LLWString &str) S32 i = 0; while(success && (i < len)) { - if(!isdigit(trimmed[i++])) + if(!LLStringOps::isDigit(trimmed[i++])) { success = FALSE; } @@ -1953,7 +1968,7 @@ BOOL LLLineEditor::prevalidateNonNegativeS32(const LLWString &str) S32 i = 0; while(success && (i < len)) { - if(!isdigit(trimmed[i++])) + if(!LLStringOps::isDigit(trimmed[i++])) { success = FALSE; } @@ -2307,13 +2322,13 @@ LLSD LLLineEditor::getValue() const return ret; } -BOOL LLLineEditor::setTextArg( const LLString& key, const LLString& text ) +BOOL LLLineEditor::setTextArg( const LLString& key, const LLStringExplicit& text ) { mText.setArg(key, text); return TRUE; } -BOOL LLLineEditor::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLLineEditor::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); return TRUE; @@ -2338,8 +2353,7 @@ LLSearchEditor::LLSearchEditor(const LLString& name, onSearchEdit, NULL, this); - // TODO: this should be translatable - mSearchEdit->setLabel("Type here to search"); + mSearchEdit->setFollowsAll(); mSearchEdit->setSelectAllonFocusReceived(TRUE); @@ -2394,13 +2408,13 @@ LLSD LLSearchEditor::getValue() const } //virtual -BOOL LLSearchEditor::setTextArg( const LLString& key, const LLString& text ) +BOOL LLSearchEditor::setTextArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setTextArg(key, text); } //virtual -BOOL LLSearchEditor::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLSearchEditor::setLabelArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setLabelArg(key, text); } @@ -2422,7 +2436,7 @@ void LLSearchEditor::draw() LLUICtrl::draw(); } -void LLSearchEditor::setText(const LLString &new_text) +void LLSearchEditor::setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); } @@ -2468,6 +2482,12 @@ LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto max_text_length, NULL, NULL); + LLString label; + if(node->getAttributeString("label", label)) + { + search_editor->mSearchEdit->setLabel(label); + } + search_editor->setText(text); search_editor->initFromXML(node, parent); diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index 04c53b4..2cd2ebf 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h @@ -2,6 +2,8 @@ * @file lllineeditor.h * @brief LLLineEditor base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Text editor widget to let users enter/edit a single line. @@ -133,11 +136,11 @@ public: // assumes UTF8 text virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); - void setLabel(const LLString &new_label); - void setText(const LLString &new_text); + void setLabel(const LLStringExplicit &new_label); + void setText(const LLStringExplicit &new_text); const LLString& getText() const { return mText.getString(); } const LLWString& getWText() const { return mText.getWString(); } @@ -276,6 +279,8 @@ protected: S32 mBorderThickness; + LLCoordGL mLastIMEPosition; // Last screen position used for the IME editor + BOOL mIgnoreArrowKeys; BOOL mIgnoreTab; BOOL mDrawAsterixes; @@ -307,15 +312,15 @@ public: virtual LLString getWidgetTag() const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - void setText(const LLString &new_text); + void setText(const LLStringExplicit &new_text); void setSearchCallback(void (*search_callback)(const LLString& search_string, void* user_data), void* data) { mSearchCallback = search_callback; mCallbackUserData = data; } // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void clear(); diff --git a/linden/indra/llui/llmemberlistener.h b/linden/indra/llui/llmemberlistener.h index bc67519..b6f6b3c 100644 --- a/linden/indra/llui/llmemberlistener.h +++ b/linden/indra/llui/llmemberlistener.h @@ -2,6 +2,8 @@ * @file llmemberlistener.h * @brief Listener class which registers itself with its parent view * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLMEMBERLISTENER_H @@ -36,7 +39,7 @@ template class LLMemberListener : public LLSimpleListener { public: - LLMemberListener() : mPtr(NULL), mRegisteredName("") { } + LLMemberListener() : mPtr(NULL), mRegisteredName() { } void registerListener(T *pointer, const LLString& register_name) { diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index b0d2d9f..5d2a052 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp @@ -2,6 +2,8 @@ * @file llmenugl.cpp * @brief LLMenuItemGL base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ //***************************************************************************** @@ -370,7 +373,7 @@ void LLMenuItemGL::setHighlightFGColor( const LLColor4& color ) // change the label -void LLMenuItemGL::setLabel( const LLString& label ) +void LLMenuItemGL::setLabel( const LLStringExplicit& label ) { mLabel = label; } @@ -595,7 +598,7 @@ void LLMenuItemGL::draw( void ) mGotHover = FALSE; } -BOOL LLMenuItemGL::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLMenuItemGL::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); return TRUE; @@ -1236,6 +1239,7 @@ BOOL LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask) doIt(); make_ui_sound("UISndClickRelease"); + return TRUE; } return FALSE; } @@ -1547,7 +1551,7 @@ public: // LLView functionality virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); - virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ) {return FALSE; } + virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual void draw( void ); virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); @@ -1671,6 +1675,11 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask ) return TRUE; } +BOOL LLMenuItemBranchDownGL::handleMouseUp( S32 x, S32 y, MASK mask ) +{ + return TRUE; +} + BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask) { diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index 6051a26..6dc9282 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h @@ -2,6 +2,8 @@ * @file llmenugl.h * @brief Declaration of the opengl based menu system. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLMENUGL_H @@ -124,8 +127,8 @@ public: LLString getLabel( void ) const { return mLabel.getString(); } // change the label - void setLabel( const LLString& label ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + void setLabel( const LLStringExplicit& label ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); // Get the parent menu for this item virtual LLMenuGL* getMenu(); @@ -440,7 +443,7 @@ public: // return the name label const LLString& getLabel( void ) const { return mLabel.getString(); } - void setLabel(const LLString& label) { mLabel = label; } + void setLabel(const LLStringExplicit& label) { mLabel = label; } static void setDefaultBackgroundColor( const LLColor4& color ); void setBackgroundColor( const LLColor4& color ); diff --git a/linden/indra/llui/llmodaldialog.cpp b/linden/indra/llui/llmodaldialog.cpp index 788dead..b8b8bf9 100644 --- a/linden/indra/llui/llmodaldialog.cpp +++ b/linden/indra/llui/llmodaldialog.cpp @@ -2,6 +2,8 @@ * @file llmodaldialog.cpp * @brief LLModalDialog base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llmodaldialog.h b/linden/indra/llui/llmodaldialog.h index c2564af..2355861 100644 --- a/linden/indra/llui/llmodaldialog.h +++ b/linden/indra/llui/llmodaldialog.h @@ -2,6 +2,8 @@ * @file llmodaldialog.h * @brief LLModalDialog base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLMODALDIALOG_H diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 91a327b..3a0ee9b 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp @@ -2,6 +2,8 @@ * @file llpanel.cpp * @brief LLPanel base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Opaque view with a background and a border. Can contain LLUICtrls. @@ -959,7 +962,7 @@ LLSD LLPanel::childGetValue(const LLString& id) const return LLSD(); } -BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLString& text) +BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text) { LLUICtrl* child = (LLUICtrl*)getChildByName(id, true); if (child) @@ -969,7 +972,7 @@ BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLS return FALSE; } -BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LLString& text) +BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text) { LLView* child = getChildByName(id, true); if (child) @@ -1030,7 +1033,7 @@ void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabn } } -void LLPanel::childSetText(const LLString& id, const LLString& text) +void LLPanel::childSetText(const LLString& id, const LLStringExplicit& text) { childSetValue(id, LLSD(text)); } @@ -1103,7 +1106,7 @@ void LLPanel::childSetControlName(const LLString& id, const LLString& control_na LLView* LLPanel::getChildByName(const LLString& name, BOOL recurse) const { LLView* view = LLUICtrl::getChildByName(name, recurse); - if (!view) + if (!view && !recurse) { childNotFound(name); } @@ -1293,9 +1296,9 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor child->getAttributeBOOL("auto_resize", auto_resize); LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child, layout_stackp, factory); - panelp->setFollowsNone(); if (panelp) { + panelp->setFollowsNone(); layout_stackp->addPanel(panelp, min_width, min_height, auto_resize); } } diff --git a/linden/indra/llui/llpanel.h b/linden/indra/llui/llpanel.h index 28c56fa..dfd7a51 100644 --- a/linden/indra/llui/llpanel.h +++ b/linden/indra/llui/llpanel.h @@ -3,6 +3,8 @@ * @author James Cook, Tom Yedwab * @brief LLPanel base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -25,6 +27,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLPANEL_H @@ -116,7 +119,7 @@ public: void setBackgroundOpaque(BOOL b) { mBgOpaque = b; } void setDefaultBtn(LLButton* btn = NULL); void setDefaultBtn(const LLString& id); - void setLabel(LLString label) { mLabel = label; } + void setLabel(const LLStringExplicit& label) { mLabel = label; } LLString getLabel() const { return mLabel; } void setRectControl(const LLString& rect_control) { mRectControl.assign(rect_control); } @@ -189,8 +192,8 @@ public: // For setting text / label replacement params, e.g. "Hello [NAME]" // Not implemented for all types, defaults to noop, returns FALSE if not applicaple - BOOL childSetTextArg(const LLString& id, const LLString& key, const LLString& text); - BOOL childSetLabelArg(const LLString& id, const LLString& key, const LLString& text); + BOOL childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text); + BOOL childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text); // LLSlider / LLSpinCtrl void childSetMinValue(const LLString& id, LLSD min_value); @@ -205,7 +208,7 @@ public: void childSetWrappedText(const LLString& id, const LLString& text, bool visible = true); // LLTextBox/LLTextEditor/LLLineEditor - void childSetText(const LLString& id, const LLString& text); + void childSetText(const LLString& id, const LLStringExplicit& text); LLString childGetText(const LLString& id); // LLLineEditor diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp index 0104998..5b9a353 100644 --- a/linden/indra/llui/llradiogroup.cpp +++ b/linden/indra/llui/llradiogroup.cpp @@ -2,6 +2,8 @@ * @file llradiogroup.cpp * @brief LLRadioGroup base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // An invisible view containing multiple mutually exclusive toggling diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h index 5b3e4db..aa19b3a 100644 --- a/linden/indra/llui/llradiogroup.h +++ b/linden/indra/llui/llradiogroup.h @@ -2,6 +2,8 @@ * @file llradiogroup.h * @brief LLRadioGroup base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // An invisible view containing multiple mutually exclusive toggling diff --git a/linden/indra/llui/llresizebar.cpp b/linden/indra/llui/llresizebar.cpp index f716e8e..ac8c47c 100644 --- a/linden/indra/llui/llresizebar.cpp +++ b/linden/indra/llui/llresizebar.cpp @@ -2,6 +2,8 @@ * @file llresizebar.cpp * @brief LLResizeBar base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llresizebar.h b/linden/indra/llui/llresizebar.h index d3596ec..d040a8b 100644 --- a/linden/indra/llui/llresizebar.h +++ b/linden/indra/llui/llresizebar.h @@ -2,6 +2,8 @@ * @file llresizebar.h * @brief LLResizeBar base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_RESIZEBAR_H diff --git a/linden/indra/llui/llresizehandle.cpp b/linden/indra/llui/llresizehandle.cpp index d9b8fac..17b76de 100644 --- a/linden/indra/llui/llresizehandle.cpp +++ b/linden/indra/llui/llresizehandle.cpp @@ -2,6 +2,8 @@ * @file llresizehandle.cpp * @brief LLResizeHandle base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llresizehandle.h b/linden/indra/llui/llresizehandle.h index b091f1f..2701613 100644 --- a/linden/indra/llui/llresizehandle.h +++ b/linden/indra/llui/llresizehandle.h @@ -2,6 +2,8 @@ * @file llresizehandle.h * @brief LLResizeHandle base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_RESIZEHANDLE_H diff --git a/linden/indra/llui/llresmgr.cpp b/linden/indra/llui/llresmgr.cpp index 5ed2cb3..e77faa9 100644 --- a/linden/indra/llui/llresmgr.cpp +++ b/linden/indra/llui/llresmgr.cpp @@ -2,6 +2,8 @@ * @file llresmgr.cpp * @brief Localized resource manager * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // NOTE: this is a MINIMAL implementation. The interface will remain, but the implementation will diff --git a/linden/indra/llui/llresmgr.h b/linden/indra/llui/llresmgr.h index 836d352..d9e58bc 100644 --- a/linden/indra/llui/llresmgr.h +++ b/linden/indra/llui/llresmgr.h @@ -2,6 +2,8 @@ * @file llresmgr.h * @brief Localized resource manager * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // NOTE: this is a MINIMAL implementation. The interface will remain, but the implementation will diff --git a/linden/indra/llui/llrootview.cpp b/linden/indra/llui/llrootview.cpp index bf231f1..5973e4c 100644 --- a/linden/indra/llui/llrootview.cpp +++ b/linden/indra/llui/llrootview.cpp @@ -2,6 +2,8 @@ * @file llrootview.cpp * @brief Container for all other views in an application * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llrootview.h b/linden/indra/llui/llrootview.h index ce98006..aedf02c 100644 --- a/linden/indra/llui/llrootview.h +++ b/linden/indra/llui/llrootview.h @@ -2,6 +2,8 @@ * @file llrootview.h * @brief Container for all other views in an application * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LLROOTVIEW_H diff --git a/linden/indra/llui/llscrollbar.cpp b/linden/indra/llui/llscrollbar.cpp index 4edf81e..99908a6 100644 --- a/linden/indra/llui/llscrollbar.cpp +++ b/linden/indra/llui/llscrollbar.cpp @@ -2,6 +2,8 @@ * @file llscrollbar.cpp * @brief Scrollbar UI widget * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llscrollbar.h b/linden/indra/llui/llscrollbar.h index f6ac17d..353935c 100644 --- a/linden/indra/llui/llscrollbar.h +++ b/linden/indra/llui/llscrollbar.h @@ -2,6 +2,8 @@ * @file llscrollbar.h * @brief Scrollbar UI widget * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_SCROLLBAR_H diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index b910964..8b5d009 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp @@ -2,6 +2,8 @@ * @file llscrollcontainer.cpp * @brief LLScrollableContainerView base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ //***************************************************************************** diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index 34fff9c..9f1978b 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h @@ -2,6 +2,8 @@ * @file llscrollcontainer.h * @brief LLScrollableContainerView class header file. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLSCROLLCONTAINER_H diff --git a/linden/indra/llui/llscrollingpanellist.cpp b/linden/indra/llui/llscrollingpanellist.cpp index eb806e4..76389e1 100644 --- a/linden/indra/llui/llscrollingpanellist.cpp +++ b/linden/indra/llui/llscrollingpanellist.cpp @@ -2,6 +2,8 @@ * @file llscrollingpanellist.cpp * @brief * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llscrollingpanellist.h b/linden/indra/llui/llscrollingpanellist.h index 29e3d41..f697a99 100644 --- a/linden/indra/llui/llscrollingpanellist.h +++ b/linden/indra/llui/llscrollingpanellist.h @@ -1,6 +1,8 @@ /** * @file llscrollingpanellist.h * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -23,6 +25,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index 9e1a573..f5eef29 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -2,6 +2,8 @@ * @file llscrolllistctrl.cpp * @brief LLScrollListCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include @@ -229,7 +232,7 @@ void LLScrollListText::setColor(const LLColor4& color) *mColor = color; } -void LLScrollListText::setText(const LLString& text) +void LLScrollListText::setText(const LLStringExplicit& text) { mText = text; } @@ -620,6 +623,7 @@ std::vector LLScrollListCtrl::getAllData() const void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) { + S32 old_height = mRect.getHeight(); LLUICtrl::reshape( width, height, called_from_parent ); S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); @@ -631,9 +635,13 @@ void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) mRect.getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) - heading_size ); mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0; + if(old_height < height && getScrollPos() == mScrollbar->getDocPosMax()) + { + setScrollPos(mScrollbar->getDocPosMax()); + } mScrollbar->setVisible(mPageLines < getItemCount()); mScrollbar->setPageSize( mPageLines ); - + updateColumns(); } @@ -770,6 +778,7 @@ void LLScrollListCtrl::updateColumns() mColumnsIndexed.resize(mColumns.size()); std::map::iterator column_itor; + bool first_dynamic = true; for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor) { LLScrollListColumn *column = &column_itor->second; @@ -781,6 +790,11 @@ void LLScrollListCtrl::updateColumns() else if (column->mDynamicWidth) { new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns; + if(first_dynamic) + { + first_dynamic = false; + new_width += (mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE); + } } if (new_width != column->mWidth) @@ -810,9 +824,10 @@ void LLScrollListCtrl::updateColumns() LLColumnHeader* last_header = NULL; for (column_ordered_it = mColumnsIndexed.begin(); column_ordered_it != mColumnsIndexed.end(); ++column_ordered_it) { - if ((*column_ordered_it)->mWidth <= 0) + if ((*column_ordered_it)->mWidth < 0) { - // skip hidden columns + // skip hidden columns + continue; } LLScrollListColumn* column = *column_ordered_it; @@ -827,9 +842,8 @@ void LLScrollListCtrl::updateColumns() right += mColumnPadding; } right = llmax(left, llmin(mItemListRect.getWidth(), right)); - S32 header_width = right - left; - + last_header->reshape(header_width, mHeadingHeight); last_header->translate(left - last_header->getRect().mLeft, top - last_header->getRect().mBottom); last_header->setVisible(mDisplayColumnHeaders && header_width > 0); @@ -838,12 +852,15 @@ void LLScrollListCtrl::updateColumns() } // expand last column header we encountered to full list width + if (last_header) { S32 header_strip_width = mItemListRect.getWidth() + (mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE); S32 new_width = llmax(0, mItemListRect.mLeft + header_strip_width - last_header->getRect().mLeft); last_header->reshape(new_width, last_header->getRect().getHeight()); + last_header->setVisible(mDisplayColumnHeaders && new_width > 0); } + } void LLScrollListCtrl::setDisplayHeading(BOOL display) @@ -1453,7 +1470,9 @@ void LLScrollListCtrl::drawItems() LLGLSUIDefault gls_ui; { - LLLocalClipRect clip(mItemListRect); + LLRect clip_rect = mItemListRect; + if(!mScrollbar->getVisible()) clip_rect.mRight += SCROLLBAR_SIZE; + LLLocalClipRect clip(clip_rect); S32 cur_x = x; S32 cur_y = y; @@ -1472,10 +1491,10 @@ void LLScrollListCtrl::drawItems() item_rect.setOriginAndSize( cur_x, cur_y, - mScrollbar->getVisible() ? mItemListRect.getWidth() : mItemListRect.getWidth() + mScrollbar->getRect().getWidth(), + mScrollbar->getVisible() ? mItemListRect.getWidth() : mItemListRect.getWidth() + SCROLLBAR_SIZE, mLineHeight ); - lldebugs << mItemListRect.getWidth() << llendl; + //llinfos << item_rect.getWidth() << llendl; if (item->getSelected()) { @@ -1523,22 +1542,31 @@ void LLScrollListCtrl::drawItems() S32 cur_col = 0; S32 dynamic_width = 0; S32 dynamic_remainder = 0; + bool first_dynamic = true; if(mNumDynamicWidthColumns > 0) { dynamic_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns; dynamic_remainder = (mItemListRect.getWidth() - mTotalStaticColumnWidth) % mNumDynamicWidthColumns; } + for (LLScrollListCell* cell = item->getColumn(0); cur_col < num_cols; cell = item->getColumn(++cur_col)) { S32 cell_width = cell->getWidth(); + if(mColumnsIndexed.size() > (U32)cur_col && mColumnsIndexed[cur_col] && mColumnsIndexed[cur_col]->mDynamicWidth) { cell_width = dynamic_width + (--dynamic_remainder ? 1 : 0); + if(first_dynamic) + { + cell_width += mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE; + first_dynamic = false; + } cell->setWidth(cell_width); } // Two ways a cell could be hidden if (cell_width < 0 || !cell->getVisible()) continue; + LLUI::pushMatrix(); LLUI::translate((F32) cur_x, (F32) cur_y, 0.0f); S32 space_left = mItemListRect.mRight - cur_x; diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index 2e4dad5..5ceee2e 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -2,6 +2,8 @@ * @file llscrolllistctrl.h * @brief LLScrollListCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_SCROLLLISTCTRL_H @@ -98,7 +101,7 @@ public: virtual const LLString& getText() const { return mText.getString(); } virtual BOOL getVisible() const { return mVisible; } virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} - void setText(const LLString& text); + void setText(const LLStringExplicit& text); virtual void setColor(const LLColor4&); virtual BOOL isText() { return TRUE; } @@ -166,10 +169,10 @@ class LLScrollListColumn public: // Default constructor LLScrollListColumn() : - mName(""), - mSortingColumn(""), - mSortAscending(TRUE), - mLabel(""), + mName(), + mSortingColumn(), + mSortAscending(TRUE), + mLabel(), mWidth(-1), mRelWidth(-1.0), mDynamicWidth(FALSE), diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index e3a3153..29626c2 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp @@ -2,6 +2,8 @@ * @file llslider.cpp * @brief LLSlider base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llslider.h b/linden/indra/llui/llslider.h index 8fcd672..2641eaa 100644 --- a/linden/indra/llui/llslider.h +++ b/linden/indra/llui/llslider.h @@ -2,6 +2,8 @@ * @file llslider.h * @brief A simple slider with no label. * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLSLIDER_H diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp index dff27cc..dd4a994 100644 --- a/linden/indra/llui/llsliderctrl.cpp +++ b/linden/indra/llui/llsliderctrl.cpp @@ -2,6 +2,8 @@ * @file llsliderctrl.cpp * @brief LLSliderCtrl base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -167,7 +170,7 @@ void LLSliderCtrl::setValue(F32 v, BOOL from_event) updateText(); } -BOOL LLSliderCtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLSliderCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { BOOL res = FALSE; if (mLabelBox) @@ -197,11 +200,11 @@ void LLSliderCtrl::clear() setValue(0.0f); if( mEditor ) { - mEditor->setText( "" ); + mEditor->setText( LLString::null ); } if( mTextBox ) { - mTextBox->setText( "" ); + mTextBox->setText( LLString::null ); } } diff --git a/linden/indra/llui/llsliderctrl.h b/linden/indra/llui/llsliderctrl.h index 6896360..fa6c0bc 100644 --- a/linden/indra/llui/llsliderctrl.h +++ b/linden/indra/llui/llsliderctrl.h @@ -2,6 +2,8 @@ * @file llsliderctrl.h * @brief LLSliderCtrl base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLSLIDERCTRL_H @@ -77,7 +80,7 @@ public: virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } virtual LLSD getValue() const { return LLSD(getValueF32()); } - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void setMinValue(LLSD min_value) { setMinValue((F32)min_value.asReal()); } virtual void setMaxValue(LLSD max_value) { setMaxValue((F32)max_value.asReal()); } @@ -94,7 +97,7 @@ public: F32 getMinValue() { return mSlider->getMinValue(); } F32 getMaxValue() { return mSlider->getMaxValue(); } - void setLabel(const LLString& label) { if (mLabelBox) mLabelBox->setText(label); } + void setLabel(const LLStringExplicit& label) { if (mLabelBox) mLabelBox->setText(label); } void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; } diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp index f587c80..2be2814 100644 --- a/linden/indra/llui/llspinctrl.cpp +++ b/linden/indra/llui/llspinctrl.cpp @@ -2,6 +2,8 @@ * @file llspinctrl.cpp * @brief LLSpinCtrl base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -382,7 +385,7 @@ void LLSpinCtrl::setPrecision(S32 precision) updateEditor(); } -void LLSpinCtrl::setLabel(const LLString& label) +void LLSpinCtrl::setLabel(const LLStringExplicit& label) { if (mLabelBox) { diff --git a/linden/indra/llui/llspinctrl.h b/linden/indra/llui/llspinctrl.h index c854ff0..f2c7b40 100644 --- a/linden/indra/llui/llspinctrl.h +++ b/linden/indra/llui/llspinctrl.h @@ -2,6 +2,8 @@ * @file llspinctrl.h * @brief LLSpinCtrl base class * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * * Copyright (c) 2002-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLSPINCTRL_H @@ -93,7 +96,7 @@ public: virtual void setMaxValue(F32 max) { mMaxValue = max; } virtual void setIncrement(F32 inc) { mIncrement = inc; } - void setLabel(const LLString& label); + void setLabel(const LLStringExplicit& label); void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; } diff --git a/linden/indra/llui/llstyle.cpp b/linden/indra/llui/llstyle.cpp index 1efb4cc..1f932f7 100644 --- a/linden/indra/llui/llstyle.cpp +++ b/linden/indra/llui/llstyle.cpp @@ -2,6 +2,8 @@ * @file llstyle.cpp * @brief Text style class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llstyle.h b/linden/indra/llui/llstyle.h index e6e88e7..809253f 100644 --- a/linden/indra/llui/llstyle.h +++ b/linden/indra/llui/llstyle.h @@ -2,6 +2,8 @@ * @file llstyle.h * @brief Text style class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLSTYLE_H diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index 135931d..1ab11f3 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp @@ -2,6 +2,8 @@ * @file lltabcontainer.cpp * @brief LLTabContainerCommon base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 3056c0a..c77547a 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h @@ -2,6 +2,8 @@ * @file lltabcontainer.h * @brief LLTabContainerCommon base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Fear my script-fu! diff --git a/linden/indra/llui/lltabcontainervertical.cpp b/linden/indra/llui/lltabcontainervertical.cpp index e2d84a5..adbca47 100644 --- a/linden/indra/llui/lltabcontainervertical.cpp +++ b/linden/indra/llui/lltabcontainervertical.cpp @@ -2,6 +2,8 @@ * @file lltabcontainervertical.cpp * @brief LLTabContainerVertical base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Fear my script-fu! diff --git a/linden/indra/llui/lltabcontainervertical.h b/linden/indra/llui/lltabcontainervertical.h index 77817c2..a5d3c53 100644 --- a/linden/indra/llui/lltabcontainervertical.h +++ b/linden/indra/llui/lltabcontainervertical.h @@ -2,6 +2,8 @@ * @file lltabcontainervertical.h * @brief LLTabContainerVertical base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Fear my script-fu! diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index ba0747f..c0b0788 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp @@ -2,6 +2,8 @@ * @file lltextbox.cpp * @brief A text display widget * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -158,7 +161,7 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask) return handled; } -void LLTextBox::setText(const LLString& text) +void LLTextBox::setText(const LLStringExplicit& text) { mText.assign(text); setLineLengths(); @@ -191,7 +194,7 @@ void LLTextBox::setLineLengths() } } -void LLTextBox::setWrappedText(const LLString& in_text, F32 max_width) +void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width) { if (max_width < 0.0) { @@ -283,7 +286,7 @@ LLSD LLTextBox::getValue() const return LLSD(getText()); } -BOOL LLTextBox::setTextArg( const LLString& key, const LLString& text ) +BOOL LLTextBox::setTextArg( const LLString& key, const LLStringExplicit& text ) { mText.setArg(key, text); setLineLengths(); diff --git a/linden/indra/llui/lltextbox.h b/linden/indra/llui/lltextbox.h index e8d4690..7e7018a 100644 --- a/linden/indra/llui/lltextbox.h +++ b/linden/indra/llui/lltextbox.h @@ -2,6 +2,8 @@ * @file lltextbox.h * @brief A single text item display * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLTEXTBOX_H @@ -68,8 +71,8 @@ public: void setDisabledColor( const LLColor4& c) { mDisabledColor = c; } void setBackgroundColor( const LLColor4& c) { mBackgroundColor = c; } void setBorderColor( const LLColor4& c) { mBorderColor = c; } - void setText( const LLString& text ); - void setWrappedText(const LLString& text, F32 max_width = -1.0); + void setText( const LLStringExplicit& text ); + void setWrappedText(const LLStringExplicit& text, F32 max_width = -1.0); // default width means use existing control width void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; } @@ -94,7 +97,7 @@ public: virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); protected: void setLineLengths(); diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 552a9c9..12ad339 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -2,6 +2,8 @@ * @file lltexteditor.cpp * @brief LLTextEditor base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Text editor widget to let users enter a a multi-line ASCII document. @@ -78,7 +81,8 @@ const S32 SPACES_PER_TAB = 4; LLColor4 LLTextEditor::mLinkColor = LLColor4::blue; void (* LLTextEditor::mURLcallback)(const char*) = NULL; -BOOL (* LLTextEditor::mSecondlifeURLcallback)(LLString) = NULL; +bool (* LLTextEditor::mSecondlifeURLcallback)(const std::string&) = NULL; +bool (* LLTextEditor::mSecondlifeURLcallbackRightClick)(const std::string&) = NULL; /////////////////////////////////////////////////////////////////// //virtuals @@ -306,7 +310,8 @@ LLTextEditor::LLTextEditor( mMouseDownX(0), mMouseDownY(0), mLastSelectionX(-1), - mLastSelectionY(-1) + mLastSelectionY(-1), + mLastIMEPosition(-1,-1) { mSourceID.generate(); @@ -515,7 +520,7 @@ void LLTextEditor::truncate() } } -void LLTextEditor::setText(const LLString &utf8str) +void LLTextEditor::setText(const LLStringExplicit &utf8str) { // LLString::removeCRLF(utf8str); mUTF8Text = utf8str_removeCRLF(utf8str); @@ -2819,7 +2824,15 @@ void LLTextEditor::drawCursor() 1); } - + // Make sure the IME is in the right place + LLRect screen_pos = getScreenRect(); + LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_left), screen_pos.mBottom + llfloor(cursor_top) ); + if ( ime_pos.mX != mLastIMEPosition.mX || ime_pos.mY != mLastIMEPosition.mY ) + { + mLastIMEPosition.mX = ime_pos.mX; + mLastIMEPosition.mY = ime_pos.mY; + getWindow()->setLanguageTextInput( ime_pos ); + } } } } @@ -3055,7 +3068,7 @@ void LLTextEditor::onTabInto() void LLTextEditor::clear() { - setText(""); + setText(LLString::null); } // Start or stop the editor from accepting text-editing keystrokes @@ -3936,7 +3949,7 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer ) if( success ) { // Actually set the text - setText( text ); + setText( LLStringExplicit(text) ); } delete[] text; diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 4bcfcfc..55aba57 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -2,6 +2,8 @@ * @file lltexteditor.h * @brief LLTextEditor base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Text editor widget to let users enter a a multi-line ASCII document// @@ -214,9 +217,10 @@ public: // Callbacks static void setLinkColor(LLColor4 color) { mLinkColor = color; } - static void setURLCallbacks( void (*callback1) (const char* url), - BOOL (*callback2) (LLString url) ) - { mURLcallback = callback1; mSecondlifeURLcallback = callback2;} + static void setURLCallbacks(void (*callback1) (const char* url), + bool (*callback2) (const std::string& url), + bool (*callback3) (const std::string& url) ) + { mURLcallback = callback1; mSecondlifeURLcallback = callback2; mSecondlifeURLcallbackRightClick = callback3;} void setOnScrollEndCallback(void (*callback)(void*), void* userdata); @@ -227,7 +231,7 @@ public: const LLString& getText() const; // Non-undoable - void setText(const LLString &utf8str); + void setText(const LLStringExplicit &utf8str); void setWText(const LLWString &wtext); S32 getMaxLength() const { return mMaxTextLength; } @@ -338,7 +342,8 @@ public: LLKeywords mKeywords; static LLColor4 mLinkColor; static void (*mURLcallback) (const char* url); - static BOOL (*mSecondlifeURLcallback) (LLString url); + static bool (*mSecondlifeURLcallback) (const std::string& url); + static bool (*mSecondlifeURLcallbackRightClick) (const std::string& url); protected: LLWString mWText; mutable LLString mUTF8Text; @@ -434,6 +439,8 @@ protected: BOOL mParseHTML; LLString mHTML; + + LLCoordGL mLastIMEPosition; // Last position of the IME editor }; class LLTextSegment diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index d0815a7..1d2d8a7 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -2,6 +2,8 @@ * @file llui.cpp * @brief UI implementation * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Utilities functions the user interface needs diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index 201d88f..4d831ca 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h @@ -2,6 +2,8 @@ * @file llui.h * @brief UI implementation * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // All immediate-mode gl drawing should happen here. diff --git a/linden/indra/llui/lluiconstants.h b/linden/indra/llui/lluiconstants.h index a51267a..9e50696 100644 --- a/linden/indra/llui/lluiconstants.h +++ b/linden/indra/llui/lluiconstants.h @@ -2,6 +2,8 @@ * @file lluiconstants.h * @brief Compile-time configuration for UI * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLUICONSTANTS_H diff --git a/linden/indra/llui/lluictrl.cpp b/linden/indra/llui/lluictrl.cpp index 0ac3916..7d35475 100644 --- a/linden/indra/llui/lluictrl.cpp +++ b/linden/indra/llui/lluictrl.cpp @@ -3,6 +3,8 @@ * @author James Cook, Richard Nelson, Tom Yedwab * @brief Abstract base class for UI controls * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -25,6 +27,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ //#include "llviewerprecompiledheaders.h" @@ -96,13 +99,13 @@ void LLUICtrl::onCommit() } // virtual -BOOL LLUICtrl::setTextArg( const LLString& key, const LLString& text ) +BOOL LLUICtrl::setTextArg( const LLString& key, const LLStringExplicit& text ) { return FALSE; } // virtual -BOOL LLUICtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLUICtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { return FALSE; } diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h index 455a8c0..00f7874 100644 --- a/linden/indra/llui/lluictrl.h +++ b/linden/indra/llui/lluictrl.h @@ -3,6 +3,8 @@ * @author James Cook, Richard Nelson, Tom Yedwab * @brief Abstract base class for UI controls * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -25,6 +27,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLUICTRL_H @@ -69,10 +72,10 @@ public: virtual LLSD getValue() const { return LLSD(); } // Defaults to no-op - virtual BOOL setTextArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); // Defaults to no-op - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); // Defaults to return NULL virtual LLCtrlSelectionInterface* getSelectionInterface(); diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp index 70f1e3e..4b4c463 100644 --- a/linden/indra/llui/lluictrlfactory.cpp +++ b/linden/indra/llui/lluictrlfactory.cpp @@ -2,6 +2,8 @@ * @file lluictrlfactory.cpp * @brief Factory class for creating UI controls * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * * Copyright (c) 2003-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" @@ -470,7 +473,7 @@ LLPieMenu *LLUICtrlFactory::buildPieMenu(const LLString &filename, LLView* paren // root must be called panel if( !root->hasName( LL_PIE_MENU_TAG )) { - llwarns << "Root node should be named " LL_PIE_MENU_TAG " in : " << filename << llendl; + llwarns << "Root node should be named " << LL_PIE_MENU_TAG << " in : " << filename << llendl; return NULL; } @@ -805,3 +808,4 @@ void LLUICtrlFactory::registerCreator(LLString ctrlname, creator_function_t func mCreatorFunctions[ctrlname] = function; } + diff --git a/linden/indra/llui/lluictrlfactory.h b/linden/indra/llui/lluictrlfactory.h index e12017d..486ed12 100644 --- a/linden/indra/llui/lluictrlfactory.h +++ b/linden/indra/llui/lluictrlfactory.h @@ -2,6 +2,8 @@ * @file lluictrlfactory.h * @brief Factory class for creating UI controls * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * * Copyright (c) 2003-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LLUICTRLFACTORY_H diff --git a/linden/indra/llui/lluistring.cpp b/linden/indra/llui/lluistring.cpp index cf1b0e0..b0da5dd 100644 --- a/linden/indra/llui/lluistring.cpp +++ b/linden/indra/llui/lluistring.cpp @@ -2,6 +2,8 @@ * @file lluistring.cpp * @brief LLUIString base class * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/lluistring.h b/linden/indra/llui/lluistring.h index c5d9152..ede8aef 100644 --- a/linden/indra/llui/lluistring.h +++ b/linden/indra/llui/lluistring.h @@ -3,6 +3,8 @@ * @author: Steve Bennetts * @brief LLUIString base class * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -25,6 +27,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLUISTRING_H diff --git a/linden/indra/llui/lluixmltags.h b/linden/indra/llui/lluixmltags.h index 7728d73..305223d 100644 --- a/linden/indra/llui/lluixmltags.h +++ b/linden/indra/llui/lluixmltags.h @@ -1,6 +1,8 @@ /** * @file lluixmltags.h * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -23,98 +25,99 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_UI_XML_TAGS_H #define LL_UI_XML_TAGS_H -#define LL_BUTTON_TAG "button" -#define LL_UI_CTRL_LOCATE_TAG "locate" -#define LL_PAD_TAG "pad" -#define LL_CHECK_BOX_CTRL_TAG "check_box" -#define LL_COMBO_BOX_TAG "combo_box" -#define LL_DRAG_HANDLE_TOP_TAG "drag_handle_top" -#define LL_DRAG_HANDLE_LEFT_TAG "drag_handle_left" -#define LL_FLOATER_TAG "floater" -#define LL_FLOATER_VIEW_TAG "floater_view" -#define LL_MULTI_FLOATER_TAG "multi_floater" -#define LL_ICON_CTRL_TAG "icon" -#define LL_LINE_EDITOR_TAG "line_editor" -#define LL_SEARCH_EDITOR_TAG "search_editor" -#define LL_MENU_ITEM_TAG "menu_item" -#define LL_MENU_GL_TAG "menu" -#define LL_MENU_BAR_GL_TAG "menu_bar" -#define LL_MENU_HOLDER_GL_TAG "menu_holder" -#define LL_PANEL_TAG "panel" -#define LL_RADIO_GROUP_TAG "radio_group" -#define LL_RESIZE_BAR_TAG "resize_bar" -#define LL_RESIZE_HANDLE_TAG "resize_handle" -#define LL_SCROLLBAR_TAG "scrollbar" -#define LL_SCROLLABLE_CONTAINER_VIEW_TAG "scroll_container" -#define LL_SCROLL_LIST_CTRL_TAG "scroll_list" -#define LL_SLIDER_CTRL_TAG "slider" -#define LL_SLIDER_TAG "slider_bar" -#define LL_SPIN_CTRL_TAG "spinner" -#define LL_TAB_CONTAINER_COMMON_TAG "tab_container" -#define LL_TEXT_BOX_TAG "text" -#define LL_TEXT_EDITOR_TAG "text_editor" -#define LL_VIEW_BORDER_TAG "view_border" -#define LL_COLOR_SWATCH_TAG "color_swatch" -#define LL_INVENTORY_PANEL_TAG "inventory_panel" -#define LL_NAME_EDITOR_TAG "name_editor" -#define LL_NAME_LIST_TAG "name_list" -#define LL_TEXTURE_PICKER_TAG "texture_picker" -#define LL_VOLUME_SLIDER_CTRL_TAG "volume_slider" -#define LL_WEB_BROWSER_CTRL_TAG "web_browser" -#define LL_STAT_VIEW_TAG "stat_view" -#define LL_INVENTORY_PANEL_TAG "inventory_panel" -#define LL_PROGRESS_VIEW_TAG "progress_view" -#define LL_STAT_BAR_TAG "stat_bar" -#define LL_STATUS_BAR_TAG "status_bar" -#define LL_VIEWER_TEXT_EDITOR_TAG "viewer_text_editor" -#define LL_TALK_VIEW_TAG "talk_view" -#define LL_COLOR_SWATCH_CTRL_TAG "color_swatch" -#define LL_GL_TEX_MEM_BAR_TAG "tex_mem_bar" -#define LL_TEXTURE_CTRL_TAG "texture_picker" -#define LL_TEXTURE_VIEW_TAG "texture_view" -#define LL_NAME_LIST_CTRL_TAG "name_list" -#define LL_STAT_GRAPH_TAG "stat_graph" -#define LL_NAME_EDITOR_TAG "name_editor" -#define LL_DROP_TARGET_TAG "drop_target" -#define LL_OVERLAY_BAR_TAG "overlay_bar" -#define LL_NET_MAP_TAG "net_map" -#define LL_HUD_VIEW_TAG "hud_view" -#define LL_MEMORY_VIEW_TAG "memory_view" -#define LL_MEDIA_REMOTE_CTRL_TAG "media_remote" -#define LL_MORPH_VIEW_TAG "morph_view" -#define LL_FRAME_STAT_VIEW_TAG "frame_stat_view" -#define LL_FOLDER_VIEW_TAG "folder_view"; -#define LL_SNAPSHOT_LIVE_PREVIEW_TAG "snapshot_preview" -#define LL_HOVER_VIEW_TAG "hover_view" -#define LL_VELOCITY_BAR_TAG "velocity_bar" -#define LL_PERMISSIONS_VIEW_TAG "permissions_view" -#define LL_SCROLLING_PANEL_LIST_TAG "scrolling_panel_list" -#define LL_CONTAINER_VIEW_TAG "container_view" -#define LL_CONSOLE_TAG "console" -#define LL_DEBUG_VIEW_TAG "debug_view" -#define LL_AUDIOSTATUS_TAG "audio_status" -#define LL_FAST_TIMER_VIEW_TAG "fast_timer_view" -#define LL_MENU_ITEM_TEAR_OFF_GL_TAG "tearoff_menu" -#define LL_MENU_ITEM_BLANK_GL_TAG "menu_item_blank" -#define LL_MENU_ITEM_CALL_GL_TAG "menu_item_call" -#define LL_MENU_ITEM_CHECK_GL_TAG "menu_item_check" -#define LL_MENU_ITEM_BRANCH_GL_TAG "menu_item_branch" -#define LL_MENU_ITEM_BRANCH_DOWN_GL_TAG "menu_item_branch_down" -#define LL_PIE_MENU_BRANCH_TAG "pie_menu_branch" -#define LL_PIE_MENU_TAG "pie_menu" -#define LL_MENU_ITEM_SEPARATOR_GL_TAG "menu_item_separator" -#define LL_MENU_ITEM_VERTICAL_SEPARATOR_GL_TAG "menu_item_vertical_separator" -#define LL_ROOT_VIEW_TAG "root_view" -#define LL_FOLDER_VIEW_ITEM_TAG "folder_item" -#define LL_FOLDER_VIEW_FOLDER_TAG "folder" -#define LL_TEXTURE_BAR_TAG "texture_bar" +#define LL_BUTTON_TAG LLString("button") +#define LL_UI_CTRL_LOCATE_TAG LLString("locate") +#define LL_PAD_TAG LLString("pad") +#define LL_CHECK_BOX_CTRL_TAG LLString("check_box") +#define LL_COMBO_BOX_TAG LLString("combo_box") +#define LL_DRAG_HANDLE_TOP_TAG LLString("drag_handle_top") +#define LL_DRAG_HANDLE_LEFT_TAG LLString("drag_handle_left") +#define LL_FLOATER_TAG LLString("floater") +#define LL_FLOATER_VIEW_TAG LLString("floater_view") +#define LL_MULTI_FLOATER_TAG LLString("multi_floater") +#define LL_ICON_CTRL_TAG LLString("icon") +#define LL_LINE_EDITOR_TAG LLString("line_editor") +#define LL_SEARCH_EDITOR_TAG LLString("search_editor") +#define LL_MENU_ITEM_TAG LLString("menu_item") +#define LL_MENU_GL_TAG LLString("menu") +#define LL_MENU_BAR_GL_TAG LLString("menu_bar") +#define LL_MENU_HOLDER_GL_TAG LLString("menu_holder") +#define LL_PANEL_TAG LLString("panel") +#define LL_RADIO_GROUP_TAG LLString("radio_group") +#define LL_RESIZE_BAR_TAG LLString("resize_bar") +#define LL_RESIZE_HANDLE_TAG LLString("resize_handle") +#define LL_SCROLLBAR_TAG LLString("scrollbar") +#define LL_SCROLLABLE_CONTAINER_VIEW_TAG LLString("scroll_container") +#define LL_SCROLL_LIST_CTRL_TAG LLString("scroll_list") +#define LL_SLIDER_CTRL_TAG LLString("slider") +#define LL_SLIDER_TAG LLString("slider_bar") +#define LL_SPIN_CTRL_TAG LLString("spinner") +#define LL_TAB_CONTAINER_COMMON_TAG LLString("tab_container") +#define LL_TEXT_BOX_TAG LLString("text") +#define LL_TEXT_EDITOR_TAG LLString("text_editor") +#define LL_VIEW_BORDER_TAG LLString("view_border") +#define LL_COLOR_SWATCH_TAG LLString("color_swatch") +#define LL_INVENTORY_PANEL_TAG LLString("inventory_panel") +#define LL_NAME_EDITOR_TAG LLString("name_editor") +#define LL_NAME_LIST_TAG LLString("name_list") +#define LL_TEXTURE_PICKER_TAG LLString("texture_picker") +#define LL_VOLUME_SLIDER_CTRL_TAG LLString("volume_slider") +#define LL_WEB_BROWSER_CTRL_TAG LLString("web_browser") +#define LL_STAT_VIEW_TAG LLString("stat_view") +#define LL_INVENTORY_PANEL_TAG LLString("inventory_panel") +#define LL_PROGRESS_VIEW_TAG LLString("progress_view") +#define LL_STAT_BAR_TAG LLString("stat_bar") +#define LL_STATUS_BAR_TAG LLString("status_bar") +#define LL_VIEWER_TEXT_EDITOR_TAG LLString("viewer_text_editor") +#define LL_TALK_VIEW_TAG LLString("talk_view") +#define LL_COLOR_SWATCH_CTRL_TAG LLString("color_swatch") +#define LL_GL_TEX_MEM_BAR_TAG LLString("tex_mem_bar") +#define LL_TEXTURE_CTRL_TAG LLString("texture_picker") +#define LL_TEXTURE_VIEW_TAG LLString("texture_view") +#define LL_NAME_LIST_CTRL_TAG LLString("name_list") +#define LL_STAT_GRAPH_TAG LLString("stat_graph") +#define LL_NAME_EDITOR_TAG LLString("name_editor") +#define LL_DROP_TARGET_TAG LLString("drop_target") +#define LL_OVERLAY_BAR_TAG LLString("overlay_bar") +#define LL_NET_MAP_TAG LLString("net_map") +#define LL_HUD_VIEW_TAG LLString("hud_view") +#define LL_MEMORY_VIEW_TAG LLString("memory_view") +#define LL_MEDIA_REMOTE_CTRL_TAG LLString("media_remote") +#define LL_MORPH_VIEW_TAG LLString("morph_view") +#define LL_FRAME_STAT_VIEW_TAG LLString("frame_stat_view") +#define LL_FOLDER_VIEW_TAG LLString("folder_view") +#define LL_SNAPSHOT_LIVE_PREVIEW_TAG LLString("snapshot_preview") +#define LL_HOVER_VIEW_TAG LLString("hover_view") +#define LL_VELOCITY_BAR_TAG LLString("velocity_bar") +#define LL_PERMISSIONS_VIEW_TAG LLString("permissions_view") +#define LL_SCROLLING_PANEL_LIST_TAG LLString("scrolling_panel_list") +#define LL_CONTAINER_VIEW_TAG LLString("container_view") +#define LL_CONSOLE_TAG LLString("console") +#define LL_DEBUG_VIEW_TAG LLString("debug_view") +#define LL_AUDIOSTATUS_TAG LLString("audio_status") +#define LL_FAST_TIMER_VIEW_TAG LLString("fast_timer_view") +#define LL_MENU_ITEM_TEAR_OFF_GL_TAG LLString("tearoff_menu") +#define LL_MENU_ITEM_BLANK_GL_TAG LLString("menu_item_blank") +#define LL_MENU_ITEM_CALL_GL_TAG LLString("menu_item_call") +#define LL_MENU_ITEM_CHECK_GL_TAG LLString("menu_item_check") +#define LL_MENU_ITEM_BRANCH_GL_TAG LLString("menu_item_branch") +#define LL_MENU_ITEM_BRANCH_DOWN_GL_TAG LLString("menu_item_branch_down") +#define LL_PIE_MENU_BRANCH_TAG LLString("pie_menu_branch") +#define LL_PIE_MENU_TAG LLString("pie_menu") +#define LL_MENU_ITEM_SEPARATOR_GL_TAG LLString("menu_item_separator") +#define LL_MENU_ITEM_VERTICAL_SEPARATOR_GL_TAG LLString("menu_item_vertical_separator") +#define LL_ROOT_VIEW_TAG LLString("root_view") +#define LL_FOLDER_VIEW_ITEM_TAG LLString("folder_item") +#define LL_FOLDER_VIEW_FOLDER_TAG LLString("folder") +#define LL_TEXTURE_BAR_TAG LLString("texture_bar") #define LL_JOYSTICK_SLIDE "joystick_slide" #define LL_JOYSTICK_TURN "joystick_turn" -#define LL_GROUP_DROP_TARGET_TAG "group_drop_target" -#define LL_LAYOUT_STACK_TAG "layout_stack" +#define LL_GROUP_DROP_TARGET_TAG LLString("group_drop_target") +#define LL_LAYOUT_STACK_TAG LLString("layout_stack") #endif diff --git a/linden/indra/llui/llundo.cpp b/linden/indra/llui/llundo.cpp index 4e62bad..6fd5d08 100644 --- a/linden/indra/llui/llundo.cpp +++ b/linden/indra/llui/llundo.cpp @@ -2,6 +2,8 @@ * @file llundo.cpp * @brief LLUndo class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // Generic interface for undo/redo circular buffer diff --git a/linden/indra/llui/llundo.h b/linden/indra/llui/llundo.h index 9a4bece..8b98297 100644 --- a/linden/indra/llui/llundo.h +++ b/linden/indra/llui/llundo.h @@ -2,6 +2,8 @@ * @file llundo.h * @brief LLUndo class header file * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * * Copyright (c) 2000-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLUNDO_H diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index 2a62602..ef91d9c 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp @@ -3,6 +3,8 @@ * @author James Cook * @brief Container for other views, anything that draws. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -25,29 +27,28 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" #include "llview.h" -#include "llstring.h" -#include "llrect.h" -#include "llgl.h" +#include +#include + #include "llevent.h" #include "llfontgl.h" #include "llfocusmgr.h" +#include "llgl.h" #include "llglheaders.h" -#include "llwindow.h" +#include "llrect.h" #include "llstl.h" -#include "lluictrl.h" #include "llui.h" // colors saved settings +#include "lluictrl.h" +#include "llwindow.h" #include "v3color.h" -#include "llstl.h" -#include - -#include BOOL LLView::sDebugRects = FALSE; BOOL LLView::sDebugKeys = FALSE; @@ -785,7 +786,7 @@ void LLView::setHidden(BOOL hidden) } // virtual -BOOL LLView::setLabelArg(const LLString& key, const LLString& text) +BOOL LLView::setLabelArg(const LLString& key, const LLStringExplicit& text) { return FALSE; } @@ -1711,7 +1712,8 @@ BOOL LLView::hasChild(const LLString& childname, BOOL recurse) const //----------------------------------------------------------------------------- LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const { - if(name.empty()) return NULL; + if(name.empty()) + return NULL; child_list_const_iter_t child_it; // Look for direct children *first* for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) @@ -1724,7 +1726,7 @@ LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const } if (recurse) { - // Look inside the child as well. + // Look inside each child as well. for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { LLView* childp = *child_it; diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h index 053ef82..63c1efc 100644 --- a/linden/indra/llui/llview.h +++ b/linden/indra/llui/llview.h @@ -2,6 +2,8 @@ * @file llview.h * @brief Container for other views, anything that draws. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLVIEW_H @@ -33,23 +36,19 @@ // the HUD or a dialog box or a button. It can also contain sub-views // and child widgets -#include -#include - -#include "lluixmltags.h" -#include "llrect.h" +#include "llcoord.h" +#include "llfontgl.h" +#include "llmortician.h" #include "llmousehandler.h" -#include "stdenums.h" +#include "llnametable.h" #include "llsd.h" #include "llstring.h" -#include "llnametable.h" -#include "llcoord.h" -#include "llmortician.h" -#include "llxmlnode.h" -#include "llfontgl.h" -#include "llviewquery.h" - +#include "llrect.h" #include "llui.h" +#include "lluixmltags.h" +#include "llviewquery.h" +#include "llxmlnode.h" +#include "stdenums.h" class LLColor4; class LLWindow; @@ -291,7 +290,7 @@ public: virtual void setHidden(BOOL hidden); // Never show (replacement text) // by default, does nothing and returns false - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void onVisibilityChange ( BOOL curVisibilityIn ); diff --git a/linden/indra/llui/llviewborder.cpp b/linden/indra/llui/llviewborder.cpp index 84f396b..f6cbe3a 100644 --- a/linden/indra/llui/llviewborder.cpp +++ b/linden/indra/llui/llviewborder.cpp @@ -2,6 +2,8 @@ * @file llviewborder.cpp * @brief LLViewBorder base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A customizable decorative border. Does not interact with mouse events. diff --git a/linden/indra/llui/llviewborder.h b/linden/indra/llui/llviewborder.h index 38d6c9f..6a91c5e 100644 --- a/linden/indra/llui/llviewborder.h +++ b/linden/indra/llui/llviewborder.h @@ -2,6 +2,8 @@ * @file llviewborder.h * @brief LLViewBorder base class * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ // A customizable decorative border. Does not interact with mouse events. diff --git a/linden/indra/llui/llviewquery.cpp b/linden/indra/llui/llviewquery.cpp index 314a483..c07587f 100644 --- a/linden/indra/llui/llviewquery.cpp +++ b/linden/indra/llui/llviewquery.cpp @@ -2,6 +2,8 @@ * @file llviewquery.cpp * @brief Implementation of view query class. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #include "linden_common.h" diff --git a/linden/indra/llui/llviewquery.h b/linden/indra/llui/llviewquery.h index a35726a..3919ba4 100644 --- a/linden/indra/llui/llviewquery.h +++ b/linden/indra/llui/llviewquery.h @@ -2,6 +2,8 @@ * @file llviewquery.h * @brief Query algorithm for flattening and filtering the view hierarchy. * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * * Copyright (c) 2001-2007, Linden Research, Inc. * * Second Life Viewer Source Code @@ -24,6 +26,7 @@ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ */ #ifndef LL_LLVIEWQUERY_H -- cgit v1.1