diff options
Diffstat (limited to 'linden/indra/llui/lltabcontainer.cpp')
-rw-r--r-- | linden/indra/llui/lltabcontainer.cpp | 141 |
1 files changed, 126 insertions, 15 deletions
diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index 4687414..db09717 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -476,6 +477,24 @@ void LLTabContainerCommon::onPrevBtn( void* userdata ) | |||
476 | self->mScrolled = FALSE; | 477 | self->mScrolled = FALSE; |
477 | } | 478 | } |
478 | 479 | ||
480 | |||
481 | void LLTabContainerCommon::onJumpFirstBtn( void* userdata ) | ||
482 | { | ||
483 | LLTabContainer* self = (LLTabContainer*) userdata; | ||
484 | |||
485 | self->mScrollPos = 0; | ||
486 | |||
487 | } | ||
488 | |||
489 | |||
490 | void LLTabContainerCommon::onJumpLastBtn( void* userdata ) | ||
491 | { | ||
492 | LLTabContainer* self = (LLTabContainer*) userdata; | ||
493 | |||
494 | self->mScrollPos = self->mMaxScrollPos; | ||
495 | } | ||
496 | |||
497 | |||
479 | // static | 498 | // static |
480 | void LLTabContainerCommon::onPrevBtnHeld( void* userdata ) | 499 | void LLTabContainerCommon::onPrevBtnHeld( void* userdata ) |
481 | { | 500 | { |
@@ -692,6 +711,8 @@ LLTabContainer::LLTabContainer( | |||
692 | LLTabContainerCommon(name, rect, pos, close_callback, callback_userdata, bordered), | 711 | LLTabContainerCommon(name, rect, pos, close_callback, callback_userdata, bordered), |
693 | mLeftArrowBtn(NULL), | 712 | mLeftArrowBtn(NULL), |
694 | mRightArrowBtn(NULL), | 713 | mRightArrowBtn(NULL), |
714 | mJumpLeftArrowBtn(NULL), | ||
715 | mJumpRightArrowBtn(NULL), | ||
695 | mRightTabBtnOffset(0), | 716 | mRightTabBtnOffset(0), |
696 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), | 717 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), |
697 | mMaxTabWidth(TABCNTR_TAB_MAX_WIDTH), | 718 | mMaxTabWidth(TABCNTR_TAB_MAX_WIDTH), |
@@ -708,6 +729,8 @@ LLTabContainer::LLTabContainer( | |||
708 | LLTabContainerCommon(name, rect_control, pos, close_callback, callback_userdata, bordered), | 729 | LLTabContainerCommon(name, rect_control, pos, close_callback, callback_userdata, bordered), |
709 | mLeftArrowBtn(NULL), | 730 | mLeftArrowBtn(NULL), |
710 | mRightArrowBtn(NULL), | 731 | mRightArrowBtn(NULL), |
732 | mJumpLeftArrowBtn(NULL), | ||
733 | mJumpRightArrowBtn(NULL), | ||
711 | mRightTabBtnOffset(0), | 734 | mRightTabBtnOffset(0), |
712 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), | 735 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), |
713 | mMaxTabWidth(TABCNTR_TAB_MAX_WIDTH), | 736 | mMaxTabWidth(TABCNTR_TAB_MAX_WIDTH), |
@@ -739,14 +762,35 @@ void LLTabContainer::initButtons() | |||
739 | S32 btn_top = (mTabPosition == TOP ) ? mRect.getHeight() - mTopBorderHeight : TABCNTR_ARROW_BTN_SIZE + 1; | 762 | S32 btn_top = (mTabPosition == TOP ) ? mRect.getHeight() - mTopBorderHeight : TABCNTR_ARROW_BTN_SIZE + 1; |
740 | 763 | ||
741 | LLRect left_arrow_btn_rect; | 764 | LLRect left_arrow_btn_rect; |
742 | left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); | 765 | left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+TABCNTR_ARROW_BTN_SIZE, btn_top + arrow_fudge, TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); |
766 | |||
767 | LLRect jump_left_arrow_btn_rect; | ||
768 | jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); | ||
743 | 769 | ||
744 | S32 right_pad = TABCNTR_ARROW_BTN_SIZE + LLPANEL_BORDER_WIDTH + 1; | 770 | S32 right_pad = TABCNTR_ARROW_BTN_SIZE + LLPANEL_BORDER_WIDTH + 1; |
771 | |||
745 | LLRect right_arrow_btn_rect; | 772 | LLRect right_arrow_btn_rect; |
746 | right_arrow_btn_rect.setLeftTopAndSize( mRect.getWidth() - mRightTabBtnOffset - right_pad, | 773 | right_arrow_btn_rect.setLeftTopAndSize( mRect.getWidth() - mRightTabBtnOffset - right_pad - TABCNTR_ARROW_BTN_SIZE, |
747 | btn_top + arrow_fudge, | 774 | btn_top + arrow_fudge, |
748 | TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); | 775 | TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); |
749 | 776 | ||
777 | |||
778 | LLRect jump_right_arrow_btn_rect; | ||
779 | jump_right_arrow_btn_rect.setLeftTopAndSize( mRect.getWidth() - mRightTabBtnOffset - right_pad, | ||
780 | btn_top + arrow_fudge, | ||
781 | TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE ); | ||
782 | |||
783 | out_id = "UIImgBtnJumpLeftOutUUID"; | ||
784 | in_id = "UIImgBtnJumpLeftInUUID"; | ||
785 | mJumpLeftArrowBtn = new LLButton( | ||
786 | "Jump Left Arrow", jump_left_arrow_btn_rect, | ||
787 | out_id, in_id, "", | ||
788 | &LLTabContainer::onJumpFirstBtn, this, LLFontGL::sSansSerif ); | ||
789 | mJumpLeftArrowBtn->setFollowsLeft(); | ||
790 | mJumpLeftArrowBtn->setSaveToXML(false); | ||
791 | mJumpLeftArrowBtn->setTabStop(FALSE); | ||
792 | addChild(mJumpLeftArrowBtn); | ||
793 | |||
750 | out_id = "UIImgBtnScrollLeftOutUUID"; | 794 | out_id = "UIImgBtnScrollLeftOutUUID"; |
751 | in_id = "UIImgBtnScrollLeftInUUID"; | 795 | in_id = "UIImgBtnScrollLeftInUUID"; |
752 | mLeftArrowBtn = new LLButton( | 796 | mLeftArrowBtn = new LLButton( |
@@ -758,6 +802,18 @@ void LLTabContainer::initButtons() | |||
758 | mLeftArrowBtn->setSaveToXML(false); | 802 | mLeftArrowBtn->setSaveToXML(false); |
759 | mLeftArrowBtn->setTabStop(FALSE); | 803 | mLeftArrowBtn->setTabStop(FALSE); |
760 | addChild(mLeftArrowBtn); | 804 | addChild(mLeftArrowBtn); |
805 | |||
806 | out_id = "UIImgBtnJumpRightOutUUID"; | ||
807 | in_id = "UIImgBtnJumpRightInUUID"; | ||
808 | mJumpRightArrowBtn = new LLButton( | ||
809 | "Jump Right Arrow", jump_right_arrow_btn_rect, | ||
810 | out_id, in_id, "", | ||
811 | &LLTabContainer::onJumpLastBtn, this, | ||
812 | LLFontGL::sSansSerif); | ||
813 | mJumpRightArrowBtn->setFollowsRight(); | ||
814 | mJumpRightArrowBtn->setSaveToXML(false); | ||
815 | mJumpRightArrowBtn->setTabStop(FALSE); | ||
816 | addChild(mJumpRightArrowBtn); | ||
761 | 817 | ||
762 | out_id = "UIImgBtnScrollRightOutUUID"; | 818 | out_id = "UIImgBtnScrollRightOutUUID"; |
763 | in_id = "UIImgBtnScrollRightInUUID"; | 819 | in_id = "UIImgBtnScrollRightInUUID"; |
@@ -772,15 +828,20 @@ void LLTabContainer::initButtons() | |||
772 | mRightArrowBtn->setTabStop(FALSE); | 828 | mRightArrowBtn->setTabStop(FALSE); |
773 | addChild(mRightArrowBtn); | 829 | addChild(mRightArrowBtn); |
774 | 830 | ||
831 | |||
775 | if( mTabPosition == TOP ) | 832 | if( mTabPosition == TOP ) |
776 | { | 833 | { |
777 | mRightArrowBtn->setFollowsTop(); | 834 | mRightArrowBtn->setFollowsTop(); |
778 | mLeftArrowBtn->setFollowsTop(); | 835 | mLeftArrowBtn->setFollowsTop(); |
836 | mJumpLeftArrowBtn->setFollowsTop(); | ||
837 | mJumpRightArrowBtn->setFollowsTop(); | ||
779 | } | 838 | } |
780 | else | 839 | else |
781 | { | 840 | { |
782 | mRightArrowBtn->setFollowsBottom(); | 841 | mRightArrowBtn->setFollowsBottom(); |
783 | mLeftArrowBtn->setFollowsBottom(); | 842 | mLeftArrowBtn->setFollowsBottom(); |
843 | mJumpLeftArrowBtn->setFollowsBottom(); | ||
844 | mJumpRightArrowBtn->setFollowsBottom(); | ||
784 | } | 845 | } |
785 | 846 | ||
786 | // set default tab group to be panel contents | 847 | // set default tab group to be panel contents |
@@ -971,7 +1032,7 @@ void LLTabContainer::updateMaxScrollPos() | |||
971 | 1032 | ||
972 | if( tab_space > available_space ) | 1033 | if( tab_space > available_space ) |
973 | { | 1034 | { |
974 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + 1); | 1035 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + TABCNTR_ARROW_BTN_SIZE + 1); |
975 | // subtract off reserved portion on left | 1036 | // subtract off reserved portion on left |
976 | available_width_with_arrows -= TABCNTR_TAB_PARTIAL_WIDTH; | 1037 | available_width_with_arrows -= TABCNTR_TAB_PARTIAL_WIDTH; |
977 | 1038 | ||
@@ -1002,7 +1063,7 @@ void LLTabContainer::updateMaxScrollPos() | |||
1002 | 1063 | ||
1003 | void LLTabContainer::commitHoveredButton(S32 x, S32 y) | 1064 | void LLTabContainer::commitHoveredButton(S32 x, S32 y) |
1004 | { | 1065 | { |
1005 | if (gFocusMgr.getMouseCapture() == this) | 1066 | if (hasMouseCapture()) |
1006 | { | 1067 | { |
1007 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) | 1068 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) |
1008 | { | 1069 | { |
@@ -1078,7 +1139,7 @@ BOOL LLTabContainer::selectTab(S32 which) | |||
1078 | } | 1139 | } |
1079 | else | 1140 | else |
1080 | { | 1141 | { |
1081 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + 1); | 1142 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + TABCNTR_ARROW_BTN_SIZE + 1); |
1082 | S32 running_tab_width = tuple->mButton->getRect().getWidth(); | 1143 | S32 running_tab_width = tuple->mButton->getRect().getWidth(); |
1083 | S32 j = i - 1; | 1144 | S32 j = i - 1; |
1084 | S32 min_scroll_pos = i; | 1145 | S32 min_scroll_pos = i; |
@@ -1120,7 +1181,7 @@ void LLTabContainer::draw() | |||
1120 | S32 cur_scroll_pos = mScrollPos; | 1181 | S32 cur_scroll_pos = mScrollPos; |
1121 | if (cur_scroll_pos > 0) | 1182 | if (cur_scroll_pos > 0) |
1122 | { | 1183 | { |
1123 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + 1); | 1184 | S32 available_width_with_arrows = mRect.getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + TABCNTR_ARROW_BTN_SIZE + 1); |
1124 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) | 1185 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) |
1125 | { | 1186 | { |
1126 | if (cur_scroll_pos == 0) | 1187 | if (cur_scroll_pos == 0) |
@@ -1141,11 +1202,13 @@ void LLTabContainer::draw() | |||
1141 | if( getVisible() ) | 1202 | if( getVisible() ) |
1142 | { | 1203 | { |
1143 | BOOL has_scroll_arrows = (mMaxScrollPos > 0) || (mScrollPosPixels > 0); | 1204 | BOOL has_scroll_arrows = (mMaxScrollPos > 0) || (mScrollPosPixels > 0); |
1205 | mJumpLeftArrowBtn->setVisible( has_scroll_arrows ); | ||
1206 | mJumpRightArrowBtn->setVisible( has_scroll_arrows ); | ||
1144 | mLeftArrowBtn->setVisible( has_scroll_arrows ); | 1207 | mLeftArrowBtn->setVisible( has_scroll_arrows ); |
1145 | mRightArrowBtn->setVisible( has_scroll_arrows ); | 1208 | mRightArrowBtn->setVisible( has_scroll_arrows ); |
1146 | 1209 | ||
1147 | // Set the leftmost position of the tab buttons. | 1210 | // Set the leftmost position of the tab buttons. |
1148 | S32 left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? TABCNTR_ARROW_BTN_SIZE : TABCNTR_TAB_H_PAD); | 1211 | S32 left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? (TABCNTR_ARROW_BTN_SIZE * 2) : TABCNTR_TAB_H_PAD); |
1149 | left -= mScrollPosPixels; | 1212 | left -= mScrollPosPixels; |
1150 | 1213 | ||
1151 | // Hide all the buttons | 1214 | // Hide all the buttons |
@@ -1234,7 +1297,19 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) | |||
1234 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); | 1297 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); |
1235 | 1298 | ||
1236 | if (has_scroll_arrows) | 1299 | if (has_scroll_arrows) |
1237 | { | 1300 | { |
1301 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1302 | { | ||
1303 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; | ||
1304 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1305 | handled = mJumpLeftArrowBtn->handleMouseDown(local_x, local_y, mask); | ||
1306 | } | ||
1307 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1308 | { | ||
1309 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1310 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1311 | handled = mJumpRightArrowBtn->handleMouseDown(local_x, local_y, mask); | ||
1312 | } | ||
1238 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | 1313 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) |
1239 | { | 1314 | { |
1240 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | 1315 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; |
@@ -1256,14 +1331,14 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) | |||
1256 | if (mTabList.size() > 0) | 1331 | if (mTabList.size() > 0) |
1257 | { | 1332 | { |
1258 | LLTabTuple* firsttuple = mTabList[0]; | 1333 | LLTabTuple* firsttuple = mTabList[0]; |
1259 | LLRect tab_rect(has_scroll_arrows ? mLeftArrowBtn->getRect().mRight : mLeftArrowBtn->getRect().mLeft, | 1334 | LLRect tab_rect(has_scroll_arrows ? mLeftArrowBtn->getRect().mRight : mJumpLeftArrowBtn->getRect().mLeft, |
1260 | firsttuple->mButton->getRect().mTop, | 1335 | firsttuple->mButton->getRect().mTop, |
1261 | has_scroll_arrows ? mRightArrowBtn->getRect().mLeft : mRightArrowBtn->getRect().mRight, | 1336 | has_scroll_arrows ? mRightArrowBtn->getRect().mLeft : mJumpRightArrowBtn->getRect().mRight, |
1262 | firsttuple->mButton->getRect().mBottom ); | 1337 | firsttuple->mButton->getRect().mBottom ); |
1263 | if( tab_rect.pointInRect( x, y ) ) | 1338 | if( tab_rect.pointInRect( x, y ) ) |
1264 | { | 1339 | { |
1265 | LLButton* tab_button = mTabList[getCurrentPanelIndex()]->mButton; | 1340 | LLButton* tab_button = mTabList[getCurrentPanelIndex()]->mButton; |
1266 | gFocusMgr.setMouseCapture(this, NULL); | 1341 | gFocusMgr.setMouseCapture(this); |
1267 | gFocusMgr.setKeyboardFocus(tab_button, NULL); | 1342 | gFocusMgr.setKeyboardFocus(tab_button, NULL); |
1268 | } | 1343 | } |
1269 | } | 1344 | } |
@@ -1276,7 +1351,19 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) | |||
1276 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); | 1351 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); |
1277 | 1352 | ||
1278 | if (has_scroll_arrows) | 1353 | if (has_scroll_arrows) |
1279 | { | 1354 | { |
1355 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1356 | { | ||
1357 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; | ||
1358 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1359 | handled = mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1360 | } | ||
1361 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1362 | { | ||
1363 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1364 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1365 | handled = mJumpRightArrowBtn->handleHover(local_x, local_y, mask); | ||
1366 | } | ||
1280 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | 1367 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) |
1281 | { | 1368 | { |
1282 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | 1369 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; |
@@ -1306,6 +1393,18 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) | |||
1306 | 1393 | ||
1307 | if (has_scroll_arrows) | 1394 | if (has_scroll_arrows) |
1308 | { | 1395 | { |
1396 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1397 | { | ||
1398 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; | ||
1399 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1400 | handled = mJumpLeftArrowBtn->handleMouseUp(local_x, local_y, mask); | ||
1401 | } | ||
1402 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1403 | { | ||
1404 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1405 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1406 | handled = mJumpRightArrowBtn->handleMouseUp(local_x, local_y, mask); | ||
1407 | } | ||
1309 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | 1408 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) |
1310 | { | 1409 | { |
1311 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | 1410 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; |
@@ -1326,7 +1425,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) | |||
1326 | 1425 | ||
1327 | commitHoveredButton(x, y); | 1426 | commitHoveredButton(x, y); |
1328 | LLPanel* cur_panel = getCurrentPanel(); | 1427 | LLPanel* cur_panel = getCurrentPanel(); |
1329 | if (gFocusMgr.getMouseCapture() == this) | 1428 | if (hasMouseCapture()) |
1330 | { | 1429 | { |
1331 | if (cur_panel) | 1430 | if (cur_panel) |
1332 | { | 1431 | { |
@@ -1337,7 +1436,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) | |||
1337 | mTabList[getCurrentPanelIndex()]->mButton->setFocus(TRUE); | 1436 | mTabList[getCurrentPanelIndex()]->mButton->setFocus(TRUE); |
1338 | } | 1437 | } |
1339 | } | 1438 | } |
1340 | gFocusMgr.setMouseCapture(NULL, NULL); | 1439 | gFocusMgr.setMouseCapture(NULL); |
1341 | } | 1440 | } |
1342 | return handled; | 1441 | return handled; |
1343 | } | 1442 | } |
@@ -1351,7 +1450,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, LLString& msg, LLRect* sticky_ | |||
1351 | 1450 | ||
1352 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); | 1451 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); |
1353 | LLRect clip( | 1452 | LLRect clip( |
1354 | has_scroll_arrows ? mLeftArrowBtn->getRect().mRight : mLeftArrowBtn->getRect().mLeft, | 1453 | has_scroll_arrows ? mJumpLeftArrowBtn->getRect().mRight : mJumpLeftArrowBtn->getRect().mLeft, |
1355 | firsttuple->mButton->getRect().mTop, | 1454 | firsttuple->mButton->getRect().mTop, |
1356 | has_scroll_arrows ? mRightArrowBtn->getRect().mLeft : mRightArrowBtn->getRect().mRight, | 1455 | has_scroll_arrows ? mRightArrowBtn->getRect().mLeft : mRightArrowBtn->getRect().mRight, |
1357 | 0 ); | 1456 | 0 ); |
@@ -1457,6 +1556,18 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag | |||
1457 | 1556 | ||
1458 | if (has_scroll_arrows) | 1557 | if (has_scroll_arrows) |
1459 | { | 1558 | { |
1559 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1560 | { | ||
1561 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; | ||
1562 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1563 | mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1564 | } | ||
1565 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1566 | { | ||
1567 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1568 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1569 | mJumpRightArrowBtn->handleHover(local_x, local_y, mask); | ||
1570 | } | ||
1460 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | 1571 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) |
1461 | { | 1572 | { |
1462 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | 1573 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; |