summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/CMakeLists.txt5
-rwxr-xr-xindra/llui/llbutton.cpp2
-rwxr-xr-xindra/llui/llchat.h109
-rwxr-xr-xindra/llui/llclipboard.cpp1
-rwxr-xr-xindra/llui/llclipboard.h1
-rwxr-xr-xindra/llui/llctrlselectioninterface.h2
-rwxr-xr-xindra/llui/lldraghandle.cpp4
-rwxr-xr-xindra/llui/llflatlistview.cpp2
-rwxr-xr-xindra/llui/llfloater.cpp4
-rwxr-xr-xindra/llui/llfolderview.cpp23
-rwxr-xr-xindra/llui/llfolderview.h1
-rw-r--r--indra/llui/llfolderviewitem.cpp4
-rwxr-xr-xindra/llui/lliconctrl.h1
-rwxr-xr-xindra/llui/llkeywords.cpp22
-rwxr-xr-xindra/llui/lllineeditor.cpp4
-rwxr-xr-xindra/llui/llmodaldialog.cpp2
-rwxr-xr-xindra/llui/llmultislider.cpp4
-rwxr-xr-xindra/llui/llresmgr.cpp27
-rwxr-xr-xindra/llui/llscrollbar.cpp4
-rwxr-xr-xindra/llui/llscrollcontainer.cpp2
-rwxr-xr-xindra/llui/llscrollcontainer.h1
-rwxr-xr-xindra/llui/llscrolllistctrl.cpp2
-rwxr-xr-xindra/llui/llscrolllistctrl.h1
-rwxr-xr-xindra/llui/llslider.cpp4
-rwxr-xr-xindra/llui/llstatbar.cpp58
-rwxr-xr-xindra/llui/llstatbar.h12
-rwxr-xr-xindra/llui/lltexteditor.cpp2
-rwxr-xr-xindra/llui/lltexteditor.h2
-rwxr-xr-xindra/llui/llui.h46
-rwxr-xr-xindra/llui/lluistring.h6
-rwxr-xr-xindra/llui/llurlentry.h1
-rwxr-xr-xindra/llui/llview.h2
-rwxr-xr-xindra/llui/llviewmodel.h2
33 files changed, 237 insertions, 126 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index c4270a62bd..b3864b3711 100755
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -142,6 +142,7 @@ set(llui_HEADER_FILES
llbutton.h
llcallbackmap.h
llchatentry.h
+ llchat.h
llcheckboxctrl.h
llclipboard.h
llcombobox.h
@@ -281,7 +282,9 @@ if(LL_TESTS)
include(LLAddBuildTest)
SET(llui_TEST_SOURCE_FILES
llurlmatch.cpp
- llurlentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
+ # INTEGRATION TESTS
+ set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
endif(LL_TESTS)
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index ce4d137478..ed12f686a1 100755
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -591,7 +591,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
// We only handle the click if the click both started and ended within us
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llchat.h b/indra/llui/llchat.h
new file mode 100755
index 0000000000..f5b242fdfc
--- /dev/null
+++ b/indra/llui/llchat.h
@@ -0,0 +1,109 @@
+/**
+ * @file llchat.h
+ * @author James Cook
+ * @brief Chat constants and data structures.
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLCHAT_H
+#define LL_LLCHAT_H
+
+#include "lluuid.h"
+#include "v3math.h"
+
+// enumerations used by the chat system
+typedef enum e_chat_source_type
+{
+ CHAT_SOURCE_SYSTEM = 0,
+ CHAT_SOURCE_AGENT = 1,
+ CHAT_SOURCE_OBJECT = 2,
+ CHAT_SOURCE_UNKNOWN = 3
+} EChatSourceType;
+
+typedef enum e_chat_type
+{
+ CHAT_TYPE_WHISPER = 0,
+ CHAT_TYPE_NORMAL = 1,
+ CHAT_TYPE_SHOUT = 2,
+ CHAT_TYPE_START = 4,
+ CHAT_TYPE_STOP = 5,
+ CHAT_TYPE_DEBUG_MSG = 6,
+ CHAT_TYPE_REGION = 7,
+ CHAT_TYPE_OWNER = 8,
+ CHAT_TYPE_DIRECT = 9 // From llRegionSayTo()
+} EChatType;
+
+typedef enum e_chat_audible_level
+{
+ CHAT_AUDIBLE_NOT = -1,
+ CHAT_AUDIBLE_BARELY = 0,
+ CHAT_AUDIBLE_FULLY = 1
+} EChatAudible;
+
+typedef enum e_chat_style
+{
+ CHAT_STYLE_NORMAL,
+ CHAT_STYLE_IRC,
+ CHAT_STYLE_HISTORY
+}EChatStyle;
+
+// A piece of chat
+class LLChat
+{
+public:
+ LLChat(const std::string& text = std::string())
+ : mText(text),
+ mFromName(),
+ mFromID(),
+ mNotifId(),
+ mOwnerID(),
+ mSourceType(CHAT_SOURCE_AGENT),
+ mChatType(CHAT_TYPE_NORMAL),
+ mAudible(CHAT_AUDIBLE_FULLY),
+ mMuted(FALSE),
+ mTime(0.0),
+ mTimeStr(),
+ mPosAgent(),
+ mURL(),
+ mChatStyle(CHAT_STYLE_NORMAL),
+ mSessionID()
+ { }
+
+ std::string mText; // UTF-8 line of text
+ std::string mFromName; // agent or object name
+ LLUUID mFromID; // agent id or object id
+ LLUUID mNotifId;
+ LLUUID mOwnerID;
+ EChatSourceType mSourceType;
+ EChatType mChatType;
+ EChatAudible mAudible;
+ BOOL mMuted; // pass muted chat to maintain list of chatters
+ F64 mTime; // viewer only, seconds from viewer start
+ std::string mTimeStr;
+ LLVector3 mPosAgent;
+ std::string mURL;
+ EChatStyle mChatStyle;
+ LLUUID mSessionID;
+};
+
+#endif
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 14173fdbb0..1d18cb2bb0 100755
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -88,6 +88,7 @@ bool LLClipboard::pasteFromClipboard(std::vector<LLUUID>& inv_objects) const
{
bool res = false;
S32 count = mObjects.size();
+ inv_objects.reserve(inv_objects.size() + count);
if (count > 0)
{
res = true;
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index fd2e7610df..58d80e2687 100755
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -31,7 +31,6 @@
#include "llstring.h"
#include "lluuid.h"
-#include "stdenums.h"
#include "llsingleton.h"
#include "llassettype.h"
#include "llinventory.h"
diff --git a/indra/llui/llctrlselectioninterface.h b/indra/llui/llctrlselectioninterface.h
index 2cdcbd88fe..a7b089c8f9 100755
--- a/indra/llui/llctrlselectioninterface.h
+++ b/indra/llui/llctrlselectioninterface.h
@@ -28,8 +28,8 @@
#define LLCTRLSELECTIONINTERFACE_H
#include "stdtypes.h"
-#include "stdenums.h"
#include "llstring.h"
+#include "llui.h"
class LLSD;
class LLUUID;
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 5f69c6af31..a36bc4743e 100755
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -365,13 +365,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
mDragLastScreenY += delta_y;
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" <<llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<llendl;
handled = TRUE;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 97a52fada4..43c22f8bf3 100755
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -520,7 +520,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask)
if (!item_pair->first)
{
- llwarning("Attempt to selet an item pair containing null panel item", 0);
+ LL_WARNS() << "Attempt to selet an item pair containing null panel item" << LL_ENDL;
return;
}
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d06e2c9334..11802904e4 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -653,7 +653,7 @@ void LLFloater::onVisibilityChange ( BOOL new_visibility )
void LLFloater::openFloater(const LLSD& key)
{
- llinfos << "Opening floater " << getName() << llendl;
+ LL_INFOS() << "Opening floater " << getName() << LL_ENDL;
mKey = key; // in case we need to open ourselves again
if (getSoundFlags() != SILENT
@@ -706,7 +706,7 @@ void LLFloater::openFloater(const LLSD& key)
void LLFloater::closeFloater(bool app_quitting)
{
- llinfos << "Closing floater " << getName() << llendl;
+ LL_INFOS() << "Closing floater " << getName() << LL_ENDL;
if (app_quitting)
{
LLFloater::sQuitting = true;
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 8aa1eb7cd5..5628baa4a1 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -255,8 +255,6 @@ LLFolderView::~LLFolderView( void )
mRenamer = NULL;
mStatusTextBox = NULL;
- mAutoOpenItems.removeAllNodes();
-
if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die();
mAutoOpenItems.removeAllNodes();
@@ -736,7 +734,7 @@ void LLFolderView::removeSelectedItems()
}
else
{
- llinfos << "Cannot delete " << item->getName() << llendl;
+ LL_INFOS() << "Cannot delete " << item->getName() << LL_ENDL;
return;
}
}
@@ -762,20 +760,21 @@ void LLFolderView::removeSelectedItems()
}
else if (count > 1)
{
- LLDynamicArray<LLFolderViewModelItem*> listeners;
+ std::vector<LLFolderViewModelItem*> listeners;
LLFolderViewModelItem* listener;
setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus());
+ listeners.reserve(count);
for(S32 i = 0; i < count; ++i)
{
listener = items[i]->getViewModelItem();
- if(listener && (listeners.find(listener) == LLDynamicArray<LLFolderViewModelItem*>::FAIL))
+ if(listener && (std::find(listeners.begin(), listeners.end(), listener) == listeners.end()))
{
- listeners.put(listener);
+ listeners.push_back(listener);
}
}
- listener = static_cast<LLFolderViewModelItem*>(listeners.get(0));
+ listener = static_cast<LLFolderViewModelItem*>(listeners.at(0));
if(listener)
{
listener->removeBatch(listeners);
@@ -1282,7 +1281,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)
if (uni_char > 0x7f)
{
- llwarns << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << llendl;
+ LL_WARNS() << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << LL_ENDL;
return FALSE;
}
@@ -1744,14 +1743,14 @@ void LLFolderView::update()
void LLFolderView::dumpSelectionInformation()
{
- llinfos << "LLFolderView::dumpSelectionInformation()" << llendl;
- llinfos << "****************************************" << llendl;
+ LL_INFOS() << "LLFolderView::dumpSelectionInformation()" << LL_NEWLINE
+ << "****************************************" << LL_ENDL;
selected_items_t::iterator item_it;
for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
{
- llinfos << " " << (*item_it)->getName() << llendl;
+ LL_INFOS() << " " << (*item_it)->getName() << LL_ENDL;
}
- llinfos << "****************************************" << llendl;
+ LL_INFOS() << "****************************************" << LL_ENDL;
}
void LLFolderView::updateRenamerPosition()
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 11fccdace4..652e22c7bc 100755
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -39,7 +39,6 @@
#include "lluictrl.h"
#include "v4color.h"
-#include "stdenums.h"
#include "lldepthstack.h"
#include "lleditmenuhandler.h"
#include "llfontgl.h"
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index c7910cb883..b5ac7db4e7 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -636,7 +636,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
if (handled)
{
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << llendl;
}
return handled;
@@ -1753,7 +1753,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << llendl;
}
return TRUE;
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index efa0925a4a..a19bb99d9d 100755
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -31,7 +31,6 @@
#include "v4color.h"
#include "lluictrl.h"
#include "lluiimage.h"
-#include "stdenums.h"
class LLTextBox;
class LLUICtrlFactory;
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 795dacdbb0..0d232cc2cf 100755
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -94,7 +94,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file.open(filename); /* Flawfinder: ignore */
if( file.fail() )
{
- llinfos << "LLKeywords::loadFromFile() Unable to open file: " << filename << llendl;
+ LL_INFOS() << "LLKeywords::loadFromFile() Unable to open file: " << filename << LL_ENDL;
return mLoaded;
}
@@ -102,7 +102,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file >> buffer;
if( strcmp( buffer, "llkeywords" ) )
{
- llinfos << filename << " does not appear to be a keyword file" << llendl;
+ LL_INFOS() << filename << " does not appear to be a keyword file" << LL_ENDL;
return mLoaded;
}
@@ -112,7 +112,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file >> version_num;
if( strcmp(buffer, "version") || version_num != (U32)KEYWORD_FILE_CURRENT_VERSION )
{
- llinfos << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << llendl;
+ LL_INFOS() << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << LL_ENDL;
return mLoaded;
}
@@ -342,7 +342,7 @@ LLColor3 LLKeywords::readColor( const std::string& s )
S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b );
if( values_read != 3 )
{
- llinfos << " poorly formed color in keyword file" << llendl;
+ LL_INFOS() << " poorly formed color in keyword file" << LL_ENDL;
}
return LLColor3( r, g, b );
}
@@ -553,7 +553,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
S32 seg_start = cur - base;
S32 seg_end = seg_start + seg_len;
- // llinfos << "Seg: [" << word.c_str() << "]" << llendl;
+ // LL_INFOS() << "Seg: [" << word.c_str() << "]" << LL_ENDL;
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
}
@@ -620,10 +620,10 @@ void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSe
#ifdef _DEBUG
void LLKeywords::dump()
{
- llinfos << "LLKeywords" << llendl;
+ LL_INFOS() << "LLKeywords" << LL_ENDL;
- llinfos << "LLKeywords::sWordTokenMap" << llendl;
+ LL_INFOS() << "LLKeywords::sWordTokenMap" << LL_ENDL;
word_token_map_t::iterator word_token_iter = mWordTokenMap.begin();
while( word_token_iter != mWordTokenMap.end() )
{
@@ -632,7 +632,7 @@ void LLKeywords::dump()
++word_token_iter;
}
- llinfos << "LLKeywords::sLineTokenList" << llendl;
+ LL_INFOS() << "LLKeywords::sLineTokenList" << LL_ENDL;
for (token_list_t::iterator iter = mLineTokenList.begin();
iter != mLineTokenList.end(); ++iter)
{
@@ -641,7 +641,7 @@ void LLKeywords::dump()
}
- llinfos << "LLKeywords::sDelimiterTokenList" << llendl;
+ LL_INFOS() << "LLKeywords::sDelimiterTokenList" << LL_ENDL;
for (token_list_t::iterator iter = mDelimiterTokenList.begin();
iter != mDelimiterTokenList.end(); ++iter)
{
@@ -652,12 +652,12 @@ void LLKeywords::dump()
void LLKeywordToken::dump()
{
- llinfos << "[" <<
+ LL_INFOS() << "[" <<
mColor.mV[VX] << ", " <<
mColor.mV[VY] << ", " <<
mColor.mV[VZ] << "] [" <<
wstring_to_utf8str(mToken) << "]" <<
- llendl;
+ LL_ENDL;
}
#endif // DEBUG
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 5478e85e13..f2e9843bf3 100755
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -855,14 +855,14 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
mKeystrokeTimer.reset();
getWindow()->setCursor(UI_CURSOR_IBEAM);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
handled = TRUE;
}
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_IBEAM);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 8c2be44904..8aefef07e2 100755
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -181,7 +181,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
if( childrenHandleHover(x, y, mask) == NULL )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index 70bcfb5b4f..17d07f4dae 100755
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -356,12 +356,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
onCommit();
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index 820e7cb26a..7488af2e05 100755
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -45,33 +45,6 @@ LLResMgr::LLResMgr()
void LLResMgr::setLocale( LLLOCALE_ID locale_id )
{
mLocale = locale_id;
-
- //RN: for now, use normal 'C' locale for everything but specific UI input/output routines
-// switch( locale_id )
-// {
-// case LLLOCALE_USA:
-//#if LL_WINDOWS
-// // Windows doesn't use ISO country codes.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-usa" ) << llendl;
-//#else
-// // posix version should work everywhere else.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_US" ) << llendl;
-//#endif
-// break;
-// case LLLOCALE_UK:
-//#if LL_WINDOWS
-// // Windows doesn't use ISO country codes.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-uk" ) << llendl;
-//#else
-// // posix version should work everywhere else.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_GB" ) << llendl;
-//#endif
-// break;
-// default:
-// llassert(0);
-// setLocale(LLLOCALE_USA);
-// break;
-// }
}
char LLResMgr::getDecimalPoint() const
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index bef1854748..f92e8f41ea 100755
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
}
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
handled = TRUE;
}
else
@@ -393,7 +393,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 3b5fb2adfb..93eea75952 100755
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -155,7 +155,6 @@ LLScrollContainer::~LLScrollContainer( void )
// virtual
void LLScrollContainer::scrollHorizontal( S32 new_pos )
{
- //llinfos << "LLScrollContainer::scrollHorizontal()" << llendl;
if( mScrolledView )
{
LLRect doc_rect = mScrolledView->getRect();
@@ -167,7 +166,6 @@ void LLScrollContainer::scrollHorizontal( S32 new_pos )
// virtual
void LLScrollContainer::scrollVertical( S32 new_pos )
{
- // llinfos << "LLScrollContainer::scrollVertical() " << new_pos << llendl;
if( mScrolledView )
{
LLRect doc_rect = mScrolledView->getRect();
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index b67236c939..f64cf43a8e 100755
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -31,7 +31,6 @@
#ifndef LL_V4COLOR_H
#include "v4color.h"
#endif
-#include "stdenums.h"
#include "llcoord.h"
#include "llscrollbar.h"
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 7f04c92b27..f335b5dec3 100755
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1464,8 +1464,6 @@ void LLScrollListCtrl::drawItems()
mLineHeight );
item->setRect(item_rect);
- //llinfos << item_rect.getWidth() << llendl;
-
max_columns = llmax(max_columns, item->getNumColumns());
LLColor4 fg_color;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8fa06cc499..40a49074c1 100755
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -34,7 +34,6 @@
#include "lluictrl.h"
#include "llctrlselectioninterface.h"
-//#include "lldarray.h"
#include "llfontgl.h"
#include "llui.h"
#include "llstring.h" // LLWString
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index db72234f94..ddddbe6f30 100755
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -188,12 +188,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
}
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 2543bd8f0a..1af36c6fdb 100755
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -152,9 +152,9 @@ LLStatBar::LLStatBar(const Params& p)
mCurMaxBar(p.bar_max),
mCurMinBar(0),
mDecimalDigits(p.decimal_digits),
- mNumFrames(p.num_frames),
+ mNumHistoryFrames(p.num_frames),
+ mNumShortHistoryFrames(p.num_frames_short),
mMaxHeight(p.max_height),
- mPerSec(p.show_per_sec),
mDisplayBar(p.show_bar),
mDisplayHistory(p.show_history),
mOrientation(p.orientation),
@@ -221,36 +221,28 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask)
void LLStatBar::draw()
{
- F32 current = 0,
- min = 0,
- max = 0,
- mean = 0;
+ F32 current = 0,
+ min = 0,
+ max = 0,
+ mean = 0;
bool show_data = false;
LLLocalClipRect _(getLocalRect());
LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
+ S32 num_frames = mDisplayHistory ? mNumHistoryFrames : mNumShortHistoryFrames;
+
std::string unit_label;
if (mCountFloatp)
{
LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording();
unit_label = mUnitLabel.empty() ? mCountFloatp->getUnitLabel() : mUnitLabel;
- if (mPerSec)
- {
- unit_label += "/s";
- current = last_frame_recording.getPerSec(*mCountFloatp);
- min = frame_recording.getPeriodMinPerSec(*mCountFloatp, mNumFrames);
- max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, mNumFrames);
- mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, mNumFrames);
- }
- else
- {
- current = last_frame_recording.getSum(*mCountFloatp);
- min = frame_recording.getPeriodMin(*mCountFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mCountFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mCountFloatp, mNumFrames);
- }
+ unit_label += "/s";
+ current = last_frame_recording.getPerSec(*mCountFloatp);
+ min = frame_recording.getPeriodMinPerSec(*mCountFloatp, num_frames);
+ max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, num_frames);
+ mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, num_frames);
// always show count-style data
show_data = true;
@@ -262,11 +254,11 @@ void LLStatBar::draw()
// only show data if there is an event in the relevant time period
current = last_frame_recording.getMean(*mEventFloatp);
- min = frame_recording.getPeriodMin(*mEventFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mEventFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mEventFloatp, mNumFrames);
-
- show_data = frame_recording.getSampleCount(*mEventFloatp, mNumFrames) != 0;
+ min = frame_recording.getPeriodMin(*mEventFloatp, num_frames);
+ max = frame_recording.getPeriodMax(*mEventFloatp, num_frames);
+ mean = frame_recording.getPeriodMean(*mEventFloatp, num_frames);
+
+ show_data = frame_recording.getSampleCount(*mEventFloatp, num_frames) != 0;
}
else if (mSampleFloatp)
{
@@ -275,9 +267,9 @@ void LLStatBar::draw()
unit_label = mUnitLabel.empty() ? mSampleFloatp->getUnitLabel() : mUnitLabel;
current = last_frame_recording.getMean(*mSampleFloatp);
- min = frame_recording.getPeriodMin(*mSampleFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mSampleFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mSampleFloatp, mNumFrames);
+ min = frame_recording.getPeriodMin(*mSampleFloatp, num_frames);
+ max = frame_recording.getPeriodMax(*mSampleFloatp, num_frames);
+ mean = frame_recording.getPeriodMean(*mSampleFloatp, num_frames);
// always show sample data if we've ever grabbed any samples
show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue();
@@ -472,18 +464,16 @@ void LLStatBar::draw()
S32 i;
gGL.color4f( 1.f, 0.f, 0.f, 1.f );
gGL.begin( LLRender::QUADS );
- const S32 max_frame = llmin(mNumFrames, num_values);
+ const S32 max_frame = llmin(num_frames, num_values);
U32 num_samples = 0;
for (i = 1; i <= max_frame; i++)
{
- F32 offset = ((F32)i / (F32)mNumFrames) * span;
+ F32 offset = ((F32)i / (F32)num_frames) * span;
LLTrace::Recording& recording = frame_recording.getPrevRecording(i);
if (mCountFloatp)
{
- value = mPerSec
- ? recording.getPerSec(*mCountFloatp)
- : recording.getSum(*mCountFloatp);
+ value = recording.getPerSec(*mCountFloatp);
num_samples = recording.getSampleCount(*mCountFloatp);
}
else if (mEventFloatp)
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index fc925b1a74..5aed98fecf 100755
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -46,12 +46,12 @@ public:
Optional<U32> decimal_digits;
- Optional<bool> show_per_sec,
- show_bar,
+ Optional<bool> show_bar,
show_history,
scale_range;
Optional<S32> num_frames,
+ num_frames_short,
max_height;
Optional<std::string> stat;
Optional<EOrientation> orientation;
@@ -63,11 +63,11 @@ public:
bar_max("bar_max", 0.f),
tick_spacing("tick_spacing", 0.f),
decimal_digits("decimal_digits", 3),
- show_per_sec("show_per_sec", true),
show_bar("show_bar", false),
show_history("show_history", false),
scale_range("scale_range", true),
num_frames("num_frames", 200),
+ num_frames_short("num_frames_short", 20),
max_height("max_height", 100),
stat("stat"),
orientation("orientation", VERTICAL)
@@ -96,10 +96,10 @@ private:
mLabelSpacing;
F32 mTickValue;
U32 mDecimalDigits;
- S32 mNumFrames;
+ S32 mNumHistoryFrames,
+ mNumShortHistoryFrames;
S32 mMaxHeight;
- bool mPerSec, // Use the per sec stats.
- mDisplayBar, // Display the bar graph.
+ bool mDisplayBar, // Display the bar graph.
mDisplayHistory,
mAutoScaleMax,
mAutoScaleMin;
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 834f213097..eb5a04d8e5 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -781,7 +781,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( clamped_x, clamped_y, true );
mSelectionEnd = mCursorPos;
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
getWindow()->setCursor(UI_CURSOR_IBEAM);
handled = TRUE;
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 969e072704..49b6980c81 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -32,10 +32,8 @@
#include "llrect.h"
#include "llkeywords.h"
#include "llframetimer.h"
-#include "lldarray.h"
#include "llstyle.h"
#include "lleditmenuhandler.h"
-#include "lldarray.h"
#include "llviewborder.h" // for params
#include "lltextbase.h"
#include "lltextvalidate.h"
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 4ebfd0fd6e..f3ed3fcb49 100755
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -55,6 +55,52 @@ class LLWindow;
class LLView;
class LLHelp;
+
+// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim)
+enum EDragAndDropType
+{
+ DAD_NONE = 0,
+ DAD_TEXTURE = 1,
+ DAD_SOUND = 2,
+ DAD_CALLINGCARD = 3,
+ DAD_LANDMARK = 4,
+ DAD_SCRIPT = 5,
+ DAD_CLOTHING = 6,
+ DAD_OBJECT = 7,
+ DAD_NOTECARD = 8,
+ DAD_CATEGORY = 9,
+ DAD_ROOT_CATEGORY = 10,
+ DAD_BODYPART = 11,
+ DAD_ANIMATION = 12,
+ DAD_GESTURE = 13,
+ DAD_LINK = 14,
+ DAD_MESH = 15,
+ DAD_WIDGET = 16,
+ DAD_PERSON = 17,
+ DAD_COUNT = 18, // number of types in this enum
+};
+
+// Reasons for drags to be denied.
+// ordered by priority for multi-drag
+enum EAcceptance
+{
+ ACCEPT_POSTPONED, // we are asynchronously determining acceptance
+ ACCEPT_NO, // Uninformative, general purpose denial.
+ ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it.
+ ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item
+ ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here.
+ ACCEPT_YES_COPY_MULTI, // We'll take a copy of multiple items
+ ACCEPT_YES_MULTI // Accepted. OK to drag and drop multiple items here.
+};
+
+enum EAddPosition
+{
+ ADD_TOP,
+ ADD_BOTTOM,
+ ADD_DEFAULT
+};
+
+
void make_ui_sound(const char* name);
void make_ui_sound_deferred(const char * name);
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index cb40c85582..07e02de6d8 100755
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -42,12 +42,12 @@
// LLUIString mMessage("Welcome [USERNAME] to [SECONDLIFE]!");
// mMessage.setArg("[USERNAME]", "Steve");
// mMessage.setArg("[SECONDLIFE]", "Second Life");
-// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Steve to Second Life"
// mMessage.setArg("[USERNAME]", "Joe");
-// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Joe to Second Life"
// mMessage = "Bienvenido a la [SECONDLIFE] [USERNAME]"
// mMessage.setArg("[SECONDLIFE]", "Segunda Vida");
-// llinfos << mMessage.getString() << llendl; // outputs "Bienvenido a la Segunda Vida Joe"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Bienvenido a la Segunda Vida Joe"
// Implementation Notes:
// Attempting to have operator[](const std::string& s) return mArgs[s] fails because we have
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 8c6c32178a..d4684e2e1e 100755
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -32,6 +32,7 @@
#include "lluicolor.h"
#include "llstyle.h"
+#include "llavatarname.h"
#include "llhost.h" // for resolving parcel name by parcel id
#include <boost/signals2.hpp>
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 0568fa889a..cd23ce7df1 100755
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -42,7 +42,6 @@
#include "llui.h"
#include "lluistring.h"
#include "llviewquery.h"
-#include "stdenums.h"
#include "lluistring.h"
#include "llcursortypes.h"
#include "lluictrlfactory.h"
@@ -67,6 +66,7 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE;
const U32 GL_NAME_UI_RESERVED = 2;
+
// maintains render state during traversal of UI tree
class LLViewDrawContext
{
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
index 2c016d2560..a0a13267ac 100755
--- a/indra/llui/llviewmodel.h
+++ b/indra/llui/llviewmodel.h
@@ -37,9 +37,9 @@
#include "llpointer.h"
#include "llsd.h"
#include "llrefcount.h"
-#include "stdenums.h"
#include "llstring.h"
#include "lltrace.h"
+#include "llui.h"
#include <string>
class LLScrollListItem;