summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-01 14:28:39 -0700
committerRichard Linden <none@none>2013-10-01 14:28:39 -0700
commit59628d6f85deed89cb35d9343183069cfccd13c0 (patch)
tree6b4c35053c2291fd5ff1cccedf86bbd76ce78e1d /indra/llui/llview.cpp
parentad777b46d0fe5d790e43efb1771e9f64f3ad3dfb (diff)
parent9e486f6c6abbee6cb41ba9a6271d8a025ad924ef (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llui/llview.cpp')
-rwxr-xr-xindra/llui/llview.cpp52
1 files changed, 31 insertions, 21 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 3613a40e2c..e3b3444a00 100755
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -30,7 +30,6 @@
#define LLVIEW_CPP
#include "llview.h"
-#include <cassert>
#include <sstream>
#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>
@@ -85,6 +84,16 @@ template class LLView* LLView::getChild<class LLView>(
static LLDefaultChildRegistry::Register<LLView> r("view");
+namespace LLInitParam
+{
+ void TypeValues<LLView::EOrientation>::declareValues()
+ {
+ declare("horizontal", LLView::HORIZONTAL);
+ declare("vertical", LLView::VERTICAL);
+ }
+}
+
+
LLView::Follows::Follows()
: string(""),
flags("flags", FOLLOWS_LEFT | FOLLOWS_TOP)
@@ -122,7 +131,8 @@ LLView::Params::Params()
}
LLView::LLView(const LLView::Params& p)
-: mVisible(p.visible),
+: LLTrace::MemTrackable<LLView>("LLView"),
+ mVisible(p.visible),
mInDraw(false),
mName(p.name),
mParentView(NULL),
@@ -149,10 +159,10 @@ LLView::LLView(const LLView::Params& p)
LLView::~LLView()
{
dirtyRect();
- //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl;
+ //LL_INFOS() << "Deleting view " << mName << ":" << (void*) this << LL_ENDL;
if (LLView::sIsDrawing)
{
- lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl;
+ LL_DEBUGS() << "Deleting view " << mName << " during UI draw() phase" << LL_ENDL;
}
// llassert(LLView::sIsDrawing == FALSE);
@@ -160,7 +170,7 @@ LLView::~LLView()
if( hasMouseCapture() )
{
- //llwarns << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << llendl;
+ //LL_WARNS() << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << LL_ENDL;
gFocusMgr.removeMouseCaptureWithoutCallback( this );
}
@@ -290,7 +300,7 @@ bool LLView::addChild(LLView* child, S32 tab_group)
}
if (mParentView == child)
{
- llerrs << "Adding view " << child->getName() << " as child of itself" << llendl;
+ LL_ERRS() << "Adding view " << child->getName() << " as child of itself" << LL_ENDL;
}
// remove from current parent
@@ -351,7 +361,7 @@ void LLView::removeChild(LLView* child)
}
else
{
- llwarns << "\"" << child->getName() << "\" is not a child of " << getName() << llendl;
+ LL_WARNS() << "\"" << child->getName() << "\" is not a child of " << getName() << LL_ENDL;
}
updateBoundingRect();
}
@@ -633,21 +643,21 @@ void LLView::setVisible(BOOL visible)
{
// tell all children of this view that the visibility may have changed
dirtyRect();
- handleVisibilityChange( visible );
+ onVisibilityChange( visible );
}
updateBoundingRect();
}
}
// virtual
-void LLView::handleVisibilityChange ( BOOL new_visibility )
+void LLView::onVisibilityChange ( BOOL new_visibility )
{
BOOST_FOREACH(LLView* viewp, mChildList)
{
// only views that are themselves visible will have their overall visibility affected by their ancestors
if (viewp->getVisible())
{
- viewp->handleVisibilityChange ( new_visibility );
+ viewp->onVisibilityChange ( new_visibility );
}
}
}
@@ -677,12 +687,12 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
void LLView::onMouseEnter(S32 x, S32 y, MASK mask)
{
- //llinfos << "Mouse entered " << getName() << llendl;
+ //LL_INFOS() << "Mouse entered " << getName() << LL_ENDL;
}
void LLView::onMouseLeave(S32 x, S32 y, MASK mask)
{
- //llinfos << "Mouse left " << getName() << llendl;
+ //LL_INFOS() << "Mouse left " << getName() << LL_ENDL;
}
bool LLView::visibleAndContains(S32 local_x, S32 local_y)
@@ -717,7 +727,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
{
if (LLView::sDebugKeys)
{
- llinfos << desc << " handled by " << viewp->getName() << llendl;
+ LL_INFOS() << desc << " handled by " << viewp->getName() << LL_ENDL;
}
return viewp;
}
@@ -910,7 +920,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
handled = handleKeyHere( key, mask );
if (handled && LLView::sDebugKeys)
{
- llinfos << "Key handled by " << getName() << llendl;
+ LL_INFOS() << "Key handled by " << getName() << LL_ENDL;
}
}
}
@@ -947,7 +957,7 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
handled = handleUnicodeCharHere(uni_char);
if (handled && LLView::sDebugKeys)
{
- llinfos << "Unicode key handled by " << getName() << llendl;
+ LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL;
}
}
}
@@ -1120,7 +1130,7 @@ void LLView::drawChildren()
// Check for bogus rectangle
if (!getRect().isValid())
{
- llwarns << "Bogus rectangle for " << getName() << " with " << mRect << llendl;
+ LL_WARNS() << "Bogus rectangle for " << getName() << " with " << mRect << LL_ENDL;
}
}
}
@@ -1494,11 +1504,11 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
return getChild<LLView>(name, recurse);
}
-static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
+static LLTrace::TimeBlock FTM_FIND_VIEWS("Find Widgets");
LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
{
- LLFastTimer ft(FTM_FIND_VIEWS);
+ LL_RECORD_BLOCK_TIME(FTM_FIND_VIEWS);
//richard: should we allow empty names?
//if(name.empty())
// return NULL;
@@ -1990,7 +2000,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
}
break;
default:
- llerrs << "Invalid snap edge" << llendl;
+ LL_ERRS() << "Invalid snap edge" << LL_ENDL;
}
}
@@ -2092,7 +2102,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
}
break;
default:
- llerrs << "Invalid snap edge" << llendl;
+ LL_ERRS() << "Invalid snap edge" << LL_ENDL;
}
}
}
@@ -2419,7 +2429,7 @@ static S32 invert_vertical(S32 y, LLView* parent)
}
else
{
- llwarns << "Attempting to convert layout to top-left with no parent" << llendl;
+ LL_WARNS() << "Attempting to convert layout to top-left with no parent" << LL_ENDL;
return y;
}
}