diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llview.cpp | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index 9cdf481..78bf168 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp | |||
@@ -981,6 +981,30 @@ BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask) | |||
981 | } | 981 | } |
982 | return handled; | 982 | return handled; |
983 | } | 983 | } |
984 | |||
985 | BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
986 | { | ||
987 | LLView* handled_view = childrenHandleMiddleMouseDown( x, y, mask ); | ||
988 | BOOL handled = (handled_view != NULL); | ||
989 | if( !handled && blockMouseEvent(x, y) ) | ||
990 | { | ||
991 | handled = TRUE; | ||
992 | handled_view = this; | ||
993 | } | ||
994 | |||
995 | return handled; | ||
996 | } | ||
997 | |||
998 | BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
999 | { | ||
1000 | BOOL handled = childrenHandleMiddleMouseUp( x, y, mask ) != NULL; | ||
1001 | if( !handled && blockMouseEvent(x, y) ) | ||
1002 | { | ||
1003 | handled = TRUE; | ||
1004 | } | ||
1005 | return handled; | ||
1006 | } | ||
1007 | |||
984 | 1008 | ||
985 | LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) | 1009 | LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) |
986 | { | 1010 | { |
@@ -1142,6 +1166,34 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask) | |||
1142 | return handled_view; | 1166 | return handled_view; |
1143 | } | 1167 | } |
1144 | 1168 | ||
1169 | LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
1170 | { | ||
1171 | LLView* handled_view = NULL; | ||
1172 | |||
1173 | if (getVisible() && getEnabled() ) | ||
1174 | { | ||
1175 | for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) | ||
1176 | { | ||
1177 | LLView* viewp = *child_it; | ||
1178 | S32 local_x = x - viewp->getRect().mLeft; | ||
1179 | S32 local_y = y - viewp->getRect().mBottom; | ||
1180 | if (viewp->pointInView(local_x, local_y) && | ||
1181 | viewp->getVisible() && | ||
1182 | viewp->getEnabled() && | ||
1183 | viewp->handleMiddleMouseDown( local_x, local_y, mask )) | ||
1184 | { | ||
1185 | if (sDebugMouseHandling) | ||
1186 | { | ||
1187 | sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage; | ||
1188 | } | ||
1189 | handled_view = viewp; | ||
1190 | break; | ||
1191 | } | ||
1192 | } | ||
1193 | } | ||
1194 | return handled_view; | ||
1195 | } | ||
1196 | |||
1145 | LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) | 1197 | LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) |
1146 | { | 1198 | { |
1147 | LLView* handled_view = NULL; | 1199 | LLView* handled_view = NULL; |
@@ -1227,6 +1279,32 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask) | |||
1227 | return handled_view; | 1279 | return handled_view; |
1228 | } | 1280 | } |
1229 | 1281 | ||
1282 | LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
1283 | { | ||
1284 | LLView* handled_view = NULL; | ||
1285 | if( getVisible() && getEnabled() ) | ||
1286 | { | ||
1287 | for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) | ||
1288 | { | ||
1289 | LLView* viewp = *child_it; | ||
1290 | S32 local_x = x - viewp->getRect().mLeft; | ||
1291 | S32 local_y = y - viewp->getRect().mBottom; | ||
1292 | if (viewp->pointInView(local_x, local_y) && | ||
1293 | viewp->getVisible() && | ||
1294 | viewp->getEnabled() && | ||
1295 | viewp->handleMiddleMouseUp( local_x, local_y, mask )) | ||
1296 | { | ||
1297 | if (sDebugMouseHandling) | ||
1298 | { | ||
1299 | sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage; | ||
1300 | } | ||
1301 | handled_view = viewp; | ||
1302 | break; | ||
1303 | } | ||
1304 | } | ||
1305 | } | ||
1306 | return handled_view; | ||
1307 | } | ||
1230 | 1308 | ||
1231 | void LLView::draw() | 1309 | void LLView::draw() |
1232 | { | 1310 | { |