summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index a3db076b17..699c76a09d 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -987,6 +987,30 @@ BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask)
}
return handled;
}
+
+BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
+{
+ LLView* handled_view = childrenHandleMiddleMouseDown( x, y, mask );
+ BOOL handled = (handled_view != NULL);
+ if( !handled && blockMouseEvent(x, y) )
+ {
+ handled = TRUE;
+ handled_view = this;
+ }
+
+ return handled;
+}
+
+BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = childrenHandleMiddleMouseUp( x, y, mask ) != NULL;
+ if( !handled && blockMouseEvent(x, y) )
+ {
+ handled = TRUE;
+ }
+ return handled;
+}
+
LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
{
@@ -1148,6 +1172,34 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
return handled_view;
}
+LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask)
+{
+ LLView* handled_view = NULL;
+
+ if (getVisible() && getEnabled() )
+ {
+ for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ {
+ LLView* viewp = *child_it;
+ S32 local_x = x - viewp->getRect().mLeft;
+ S32 local_y = y - viewp->getRect().mBottom;
+ if (viewp->pointInView(local_x, local_y) &&
+ viewp->getVisible() &&
+ viewp->getEnabled() &&
+ viewp->handleMiddleMouseDown( local_x, local_y, mask ))
+ {
+ if (sDebugMouseHandling)
+ {
+ sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
+ }
+ handled_view = viewp;
+ break;
+ }
+ }
+ }
+ return handled_view;
+}
+
LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask)
{
LLView* handled_view = NULL;
@@ -1233,6 +1285,32 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask)
return handled_view;
}
+LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask)
+{
+ LLView* handled_view = NULL;
+ if( getVisible() && getEnabled() )
+ {
+ for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ {
+ LLView* viewp = *child_it;
+ S32 local_x = x - viewp->getRect().mLeft;
+ S32 local_y = y - viewp->getRect().mBottom;
+ if (viewp->pointInView(local_x, local_y) &&
+ viewp->getVisible() &&
+ viewp->getEnabled() &&
+ viewp->handleMiddleMouseUp( local_x, local_y, mask ))
+ {
+ if (sDebugMouseHandling)
+ {
+ sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
+ }
+ handled_view = viewp;
+ break;
+ }
+ }
+ }
+ return handled_view;
+}
void LLView::draw()
{