aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llview.cpp80
1 files changed, 79 insertions, 1 deletions
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 7047afc..36bc850 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -984,6 +984,30 @@ BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask)
984 } 984 }
985 return handled; 985 return handled;
986} 986}
987
988BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
989{
990 LLView* handled_view = childrenHandleMiddleMouseDown( x, y, mask );
991 BOOL handled = (handled_view != NULL);
992 if( !handled && blockMouseEvent(x, y) )
993 {
994 handled = TRUE;
995 handled_view = this;
996 }
997
998 return handled;
999}
1000
1001BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
1002{
1003 BOOL handled = childrenHandleMiddleMouseUp( x, y, mask ) != NULL;
1004 if( !handled && blockMouseEvent(x, y) )
1005 {
1006 handled = TRUE;
1007 }
1008 return handled;
1009}
1010
987 1011
988LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) 1012LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
989{ 1013{
@@ -1145,6 +1169,34 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
1145 return handled_view; 1169 return handled_view;
1146} 1170}
1147 1171
1172LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask)
1173{
1174 LLView* handled_view = NULL;
1175
1176 if (getVisible() && getEnabled() )
1177 {
1178 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
1179 {
1180 LLView* viewp = *child_it;
1181 S32 local_x = x - viewp->getRect().mLeft;
1182 S32 local_y = y - viewp->getRect().mBottom;
1183 if (viewp->pointInView(local_x, local_y) &&
1184 viewp->getVisible() &&
1185 viewp->getEnabled() &&
1186 viewp->handleMiddleMouseDown( local_x, local_y, mask ))
1187 {
1188 if (sDebugMouseHandling)
1189 {
1190 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1191 }
1192 handled_view = viewp;
1193 break;
1194 }
1195 }
1196 }
1197 return handled_view;
1198}
1199
1148LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) 1200LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask)
1149{ 1201{
1150 LLView* handled_view = NULL; 1202 LLView* handled_view = NULL;
@@ -1230,6 +1282,32 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask)
1230 return handled_view; 1282 return handled_view;
1231} 1283}
1232 1284
1285LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask)
1286{
1287 LLView* handled_view = NULL;
1288 if( getVisible() && getEnabled() )
1289 {
1290 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
1291 {
1292 LLView* viewp = *child_it;
1293 S32 local_x = x - viewp->getRect().mLeft;
1294 S32 local_y = y - viewp->getRect().mBottom;
1295 if (viewp->pointInView(local_x, local_y) &&
1296 viewp->getVisible() &&
1297 viewp->getEnabled() &&
1298 viewp->handleMiddleMouseUp( local_x, local_y, mask ))
1299 {
1300 if (sDebugMouseHandling)
1301 {
1302 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1303 }
1304 handled_view = viewp;
1305 break;
1306 }
1307 }
1308 }
1309 return handled_view;
1310}
1233 1311
1234void LLView::draw() 1312void LLView::draw()
1235{ 1313{
@@ -2555,7 +2633,7 @@ void LLView::initFromXML(LLXMLNodePtr node, LLView* parent)
2555 node->getAttributeString("hover_cursor", cursor_string); 2633 node->getAttributeString("hover_cursor", cursor_string);
2556 mHoverCursor = getCursorFromString(cursor_string); 2634 mHoverCursor = getCursorFromString(cursor_string);
2557 } 2635 }
2558 2636
2559 node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect); 2637 node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect);
2560 node->getAttributeBOOL("mouse_opaque", mMouseOpaque); 2638 node->getAttributeBOOL("mouse_opaque", mMouseOpaque);
2561 2639