diff options
author | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
commit | a408bac29378072fbf36864164149458c978cfcc (patch) | |
tree | 67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/llui | |
parent | Second Life viewer sources 1.17.0.12 (diff) | |
download | meta-impy-a408bac29378072fbf36864164149458c978cfcc.zip meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2 meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz |
Second Life viewer sources 1.17.1.0
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/llalertdialog.h | 9 | ||||
-rw-r--r-- | linden/indra/llui/llcombobox.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llctrlselectioninterface.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/lleditmenuhandler.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/lllineeditor.cpp | 23 | ||||
-rw-r--r-- | linden/indra/llui/llrootview.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/llscrollcontainer.cpp | 19 | ||||
-rw-r--r-- | linden/indra/llui/llscrollcontainer.h | 12 | ||||
-rw-r--r-- | linden/indra/llui/llscrolllistctrl.cpp | 15 | ||||
-rw-r--r-- | linden/indra/llui/llscrolllistctrl.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/lltabcontainer.cpp | 81 | ||||
-rw-r--r-- | linden/indra/llui/lltabcontainer.h | 6 | ||||
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 21 | ||||
-rw-r--r-- | linden/indra/llui/llviewquery.cpp | 2 |
14 files changed, 140 insertions, 56 deletions
diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h index d389236..1add4a4 100644 --- a/linden/indra/llui/llalertdialog.h +++ b/linden/indra/llui/llalertdialog.h | |||
@@ -162,6 +162,15 @@ public: | |||
162 | return FALSE; | 162 | return FALSE; |
163 | } | 163 | } |
164 | } | 164 | } |
165 | |||
166 | void setIgnore(bool state) | ||
167 | { | ||
168 | if (mIgnorable) | ||
169 | { | ||
170 | LLAlertDialog::sSettings->setWarning(mIgnoreLabel, !state); | ||
171 | } | ||
172 | } | ||
173 | |||
165 | 174 | ||
166 | public: | 175 | public: |
167 | LLString mLabel; // Handle for access from code, etc | 176 | LLString mLabel; // Handle for access from code, etc |
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index e00454a..27df619 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -66,8 +66,8 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString | |||
66 | mAllowTextEntry(FALSE), | 66 | mAllowTextEntry(FALSE), |
67 | mMaxChars(20), | 67 | mMaxChars(20), |
68 | mTextEntryTentative(TRUE), | 68 | mTextEntryTentative(TRUE), |
69 | mPrearrangeCallback( NULL ), | ||
70 | mListPosition(BELOW), | 69 | mListPosition(BELOW), |
70 | mPrearrangeCallback( NULL ), | ||
71 | mTextEntryCallback( NULL ) | 71 | mTextEntryCallback( NULL ) |
72 | { | 72 | { |
73 | // For now, all comboboxes don't take keyboard focus when clicked. | 73 | // For now, all comboboxes don't take keyboard focus when clicked. |
diff --git a/linden/indra/llui/llctrlselectioninterface.cpp b/linden/indra/llui/llctrlselectioninterface.cpp index 3b71942..d3b83a2 100644 --- a/linden/indra/llui/llctrlselectioninterface.cpp +++ b/linden/indra/llui/llctrlselectioninterface.cpp | |||
@@ -25,6 +25,7 @@ | |||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | #include "linden_common.h" | ||
28 | 29 | ||
29 | #include "llctrlselectioninterface.h" | 30 | #include "llctrlselectioninterface.h" |
30 | 31 | ||
diff --git a/linden/indra/llui/lleditmenuhandler.cpp b/linden/indra/llui/lleditmenuhandler.cpp index 85b4464..559cef4 100644 --- a/linden/indra/llui/lleditmenuhandler.cpp +++ b/linden/indra/llui/lleditmenuhandler.cpp | |||
@@ -26,7 +26,7 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "stdtypes.h" | 29 | #include "linden_common.h" |
30 | 30 | ||
31 | #include "lleditmenuhandler.h" | 31 | #include "lleditmenuhandler.h" |
32 | 32 | ||
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 44616b9..98286fa 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -220,6 +220,9 @@ LLString LLLineEditor::getWidgetTag() const | |||
220 | 220 | ||
221 | void LLLineEditor::onFocusLost() | 221 | void LLLineEditor::onFocusLost() |
222 | { | 222 | { |
223 | // Need to notify early when loosing focus. | ||
224 | getWindow()->allowLanguageTextInput(FALSE); | ||
225 | |||
223 | LLUICtrl::onFocusLost(); | 226 | LLUICtrl::onFocusLost(); |
224 | 227 | ||
225 | if( mCommitOnFocusLost && mText.getString() != mPrevText) | 228 | if( mCommitOnFocusLost && mText.getString() != mPrevText) |
@@ -1130,7 +1133,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) | |||
1130 | 1133 | ||
1131 | // handle ctrl-uparrow if we have a history enabled line editor. | 1134 | // handle ctrl-uparrow if we have a history enabled line editor. |
1132 | case KEY_UP: | 1135 | case KEY_UP: |
1133 | if( mHaveHistory && ( MASK_CONTROL & mask ) ) | 1136 | if( mHaveHistory && ( MASK_CONTROL == mask ) ) |
1134 | { | 1137 | { |
1135 | if( mCurrentHistoryLine > 0 ) | 1138 | if( mCurrentHistoryLine > 0 ) |
1136 | { | 1139 | { |
@@ -1147,7 +1150,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) | |||
1147 | 1150 | ||
1148 | // handle ctrl-downarrow if we have a history enabled line editor | 1151 | // handle ctrl-downarrow if we have a history enabled line editor |
1149 | case KEY_DOWN: | 1152 | case KEY_DOWN: |
1150 | if( mHaveHistory && ( MASK_CONTROL & mask ) ) | 1153 | if( mHaveHistory && ( MASK_CONTROL == mask ) ) |
1151 | { | 1154 | { |
1152 | if( !mLineHistory.empty() && mCurrentHistoryLine < mLineHistory.size() - 1 ) | 1155 | if( !mLineHistory.empty() && mCurrentHistoryLine < mLineHistory.size() - 1 ) |
1153 | { | 1156 | { |
@@ -1646,6 +1649,12 @@ void LLLineEditor::setFocus( BOOL new_state ) | |||
1646 | { | 1649 | { |
1647 | BOOL old_state = hasFocus(); | 1650 | BOOL old_state = hasFocus(); |
1648 | 1651 | ||
1652 | if (!new_state) | ||
1653 | { | ||
1654 | getWindow()->allowLanguageTextInput(FALSE); | ||
1655 | } | ||
1656 | |||
1657 | |||
1649 | // getting focus when we didn't have it before, and we want to select all | 1658 | // getting focus when we didn't have it before, and we want to select all |
1650 | if (!old_state && new_state && mSelectAllonFocusReceived) | 1659 | if (!old_state && new_state && mSelectAllonFocusReceived) |
1651 | { | 1660 | { |
@@ -1676,6 +1685,16 @@ void LLLineEditor::setFocus( BOOL new_state ) | |||
1676 | } | 1685 | } |
1677 | 1686 | ||
1678 | LLUICtrl::setFocus( new_state ); | 1687 | LLUICtrl::setFocus( new_state ); |
1688 | |||
1689 | if (new_state) | ||
1690 | { | ||
1691 | // Allow Language Text Input only when this LineEditor has | ||
1692 | // no prevalidate function attached. This criterion works | ||
1693 | // fine on 1.15.0.2, since all prevalidate func reject any | ||
1694 | // non-ASCII characters. I'm not sure on future versions, | ||
1695 | // however. | ||
1696 | getWindow()->allowLanguageTextInput(mPrevalidateFunc == NULL); | ||
1697 | } | ||
1679 | } | 1698 | } |
1680 | 1699 | ||
1681 | //virtual | 1700 | //virtual |
diff --git a/linden/indra/llui/llrootview.cpp b/linden/indra/llui/llrootview.cpp index d78244d..bf231f1 100644 --- a/linden/indra/llui/llrootview.cpp +++ b/linden/indra/llui/llrootview.cpp | |||
@@ -25,6 +25,7 @@ | |||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | #include "linden_common.h" | ||
28 | 29 | ||
29 | #include "llrootview.h" | 30 | #include "llrootview.h" |
30 | 31 | ||
diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index cf43ee1..be41aa8 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp | |||
@@ -292,7 +292,26 @@ BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) | |||
292 | // Opaque | 292 | // Opaque |
293 | return TRUE; | 293 | return TRUE; |
294 | } | 294 | } |
295 | BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContainerView::SCROLL_ORIENTATION axis) | ||
296 | { | ||
297 | if(mScrollbar[axis]->getVisible()) | ||
298 | { | ||
299 | LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 ); | ||
300 | const S32 AUTOSCROLL_SIZE = 10; | ||
301 | if(mScrollbar[axis]->getVisible()) | ||
302 | { | ||
303 | inner_rect_local.mRight -= SCROLLBAR_SIZE; | ||
304 | inner_rect_local.mTop += AUTOSCROLL_SIZE; | ||
305 | inner_rect_local.mBottom = inner_rect_local.mTop - AUTOSCROLL_SIZE; | ||
306 | } | ||
307 | if( inner_rect_local.pointInRect( x, y ) && (mScrollbar[axis]->getDocPos() > 0) ) | ||
308 | { | ||
309 | return TRUE; | ||
310 | } | ||
295 | 311 | ||
312 | } | ||
313 | return FALSE; | ||
314 | } | ||
296 | BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, | 315 | BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, |
297 | BOOL drop, | 316 | BOOL drop, |
298 | EDragAndDropType cargo_type, | 317 | EDragAndDropType cargo_type, |
diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index 3b3bbef..34fff9c 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #endif | 35 | #endif |
36 | #include "stdenums.h" | 36 | #include "stdenums.h" |
37 | #include "llcoord.h" | 37 | #include "llcoord.h" |
38 | #include "llscrollbar.h" | ||
38 | 39 | ||
39 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 40 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
40 | // Class LLScrollableContainerView | 41 | // Class LLScrollableContainerView |
@@ -47,7 +48,6 @@ | |||
47 | // This class is a decorator class. | 48 | // This class is a decorator class. |
48 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 49 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
49 | 50 | ||
50 | class LLScrollbar; | ||
51 | class LLViewBorder; | 51 | class LLViewBorder; |
52 | class LLUICtrlFactory; | 52 | class LLUICtrlFactory; |
53 | 53 | ||
@@ -55,6 +55,10 @@ class LLUICtrlFactory; | |||
55 | class LLScrollableContainerView : public LLUICtrl | 55 | class LLScrollableContainerView : public LLUICtrl |
56 | { | 56 | { |
57 | public: | 57 | public: |
58 | // Note: vertical comes before horizontal because vertical | ||
59 | // scrollbars have priority for mouse and keyboard events. | ||
60 | enum SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; | ||
61 | |||
58 | LLScrollableContainerView( const LLString& name, const LLRect& rect, | 62 | LLScrollableContainerView( const LLString& name, const LLRect& rect, |
59 | LLView* scrolled_view, BOOL is_opaque = FALSE, | 63 | LLView* scrolled_view, BOOL is_opaque = FALSE, |
60 | const LLColor4& bg_color = LLColor4(0,0,0,0) ); | 64 | const LLColor4& bg_color = LLColor4(0,0,0,0) ); |
@@ -88,6 +92,8 @@ public: | |||
88 | void goToBottom(); | 92 | void goToBottom(); |
89 | S32 getBorderWidth(); | 93 | S32 getBorderWidth(); |
90 | 94 | ||
95 | BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis); | ||
96 | |||
91 | // LLView functionality | 97 | // LLView functionality |
92 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent); | 98 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent); |
93 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | 99 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); |
@@ -110,10 +116,6 @@ protected: | |||
110 | virtual void scrollVertical( S32 new_pos ); | 116 | virtual void scrollVertical( S32 new_pos ); |
111 | void updateScroll(); | 117 | void updateScroll(); |
112 | 118 | ||
113 | // Note: vertical comes before horizontal because vertical | ||
114 | // scrollbars have priority for mouse and keyboard events. | ||
115 | enum { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; | ||
116 | |||
117 | LLScrollbar* mScrollbar[SCROLLBAR_COUNT]; | 119 | LLScrollbar* mScrollbar[SCROLLBAR_COUNT]; |
118 | LLView* mScrolledView; | 120 | LLView* mScrolledView; |
119 | S32 mSize; | 121 | S32 mSize; |
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index fd98bd5..5571d39 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp | |||
@@ -98,8 +98,10 @@ protected: | |||
98 | // | 98 | // |
99 | // LLScrollListIcon | 99 | // LLScrollListIcon |
100 | // | 100 | // |
101 | LLScrollListIcon::LLScrollListIcon(LLImageGL* icon, S32 width, LLUUID image_id) : | 101 | LLScrollListIcon::LLScrollListIcon(LLImageGL* icon, S32 width, LLUUID image_id) |
102 | mIcon(icon), mColor(LLColor4::white), mImageUUID(image_id.asString()) | 102 | : mIcon(icon), |
103 | mImageUUID(image_id.asString()), | ||
104 | mColor(LLColor4::white) | ||
103 | { | 105 | { |
104 | if (width) | 106 | if (width) |
105 | { | 107 | { |
@@ -431,21 +433,20 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, | |||
431 | mFgUnselectedColor( LLUI::sColorsGroup->getColor("ScrollUnselectedColor") ), | 433 | mFgUnselectedColor( LLUI::sColorsGroup->getColor("ScrollUnselectedColor") ), |
432 | mFgDisabledColor( LLUI::sColorsGroup->getColor("ScrollDisabledColor") ), | 434 | mFgDisabledColor( LLUI::sColorsGroup->getColor("ScrollDisabledColor") ), |
433 | mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ), | 435 | mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ), |
434 | mHighlightedItem(-1), | ||
435 | mBorderThickness( 2 ), | 436 | mBorderThickness( 2 ), |
436 | mOnDoubleClickCallback( NULL ), | 437 | mOnDoubleClickCallback( NULL ), |
437 | mOnMaximumSelectCallback( NULL ), | 438 | mOnMaximumSelectCallback( NULL ), |
438 | mOnSortChangedCallback( NULL ), | 439 | mOnSortChangedCallback( NULL ), |
439 | mDrewSelected(FALSE), | 440 | mHighlightedItem(-1), |
440 | mBorder(NULL), | 441 | mBorder(NULL), |
441 | mSearchColumn(0), | ||
442 | mDefaultColumn("SIMPLE"), | 442 | mDefaultColumn("SIMPLE"), |
443 | 443 | mSearchColumn(0), | |
444 | mNumDynamicWidthColumns(0), | 444 | mNumDynamicWidthColumns(0), |
445 | mTotalStaticColumnWidth(0), | 445 | mTotalStaticColumnWidth(0), |
446 | mSortColumn(-1), | 446 | mSortColumn(-1), |
447 | mSortAscending(TRUE), | ||
447 | mSorted(TRUE), | 448 | mSorted(TRUE), |
448 | mSortAscending(TRUE) | 449 | mDrewSelected(FALSE) |
449 | { | 450 | { |
450 | mItemListRect.setOriginAndSize( | 451 | mItemListRect.setOriginAndSize( |
451 | mBorderThickness + LIST_BORDER_PAD, | 452 | mBorderThickness + LIST_BORDER_PAD, |
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index 429985b..9829832 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h | |||
@@ -328,7 +328,7 @@ public: | |||
328 | 328 | ||
329 | S32 getNumColumns() const { return mColumns.size(); } | 329 | S32 getNumColumns() const { return mColumns.size(); } |
330 | 330 | ||
331 | LLScrollListCell *getColumn(const S32 i) const { if (i < (S32)mColumns.size()) { return mColumns[i]; } return NULL; } | 331 | LLScrollListCell *getColumn(const S32 i) const { if (0 <= i && i < (S32)mColumns.size()) { return mColumns[i]; } return NULL; } |
332 | 332 | ||
333 | virtual BOOL handleClick(S32 x, S32 y, MASK mask); | 333 | virtual BOOL handleClick(S32 x, S32 y, MASK mask); |
334 | 334 | ||
diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index 44940ae..01c06c3 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp | |||
@@ -51,6 +51,7 @@ | |||
51 | #include "llglheaders.h" | 51 | #include "llglheaders.h" |
52 | 52 | ||
53 | const F32 SCROLL_STEP_TIME = 0.4f; | 53 | const F32 SCROLL_STEP_TIME = 0.4f; |
54 | const F32 SCROLL_DELAY_TIME = 0.5f; | ||
54 | const S32 TAB_PADDING = 15; | 55 | const S32 TAB_PADDING = 15; |
55 | const S32 TABCNTR_TAB_MIN_WIDTH = 60; | 56 | const S32 TABCNTR_TAB_MIN_WIDTH = 60; |
56 | const S32 TABCNTR_TAB_MAX_WIDTH = 150; | 57 | const S32 TABCNTR_TAB_MAX_WIDTH = 150; |
@@ -81,6 +82,7 @@ LLTabContainerCommon::LLTabContainerCommon( | |||
81 | mLockedTabCount(0) | 82 | mLockedTabCount(0) |
82 | { | 83 | { |
83 | setMouseOpaque(FALSE); | 84 | setMouseOpaque(FALSE); |
85 | mDragAndDropDelayTimer.stop(); | ||
84 | } | 86 | } |
85 | 87 | ||
86 | 88 | ||
@@ -101,9 +103,11 @@ LLTabContainerCommon::LLTabContainerCommon( | |||
101 | mCallbackUserdata( callback_userdata ), | 103 | mCallbackUserdata( callback_userdata ), |
102 | mTitleBox(NULL), | 104 | mTitleBox(NULL), |
103 | mTopBorderHeight(LLPANEL_BORDER_WIDTH), | 105 | mTopBorderHeight(LLPANEL_BORDER_WIDTH), |
104 | mTabPosition(pos) | 106 | mTabPosition(pos), |
107 | mLockedTabCount(0) | ||
105 | { | 108 | { |
106 | setMouseOpaque(FALSE); | 109 | setMouseOpaque(FALSE); |
110 | mDragAndDropDelayTimer.stop(); | ||
107 | } | 111 | } |
108 | 112 | ||
109 | 113 | ||
@@ -731,8 +735,8 @@ LLTabContainer::LLTabContainer( | |||
731 | : | 735 | : |
732 | LLTabContainerCommon(name, rect, pos, close_callback, callback_userdata, bordered), | 736 | LLTabContainerCommon(name, rect, pos, close_callback, callback_userdata, bordered), |
733 | mLeftArrowBtn(NULL), | 737 | mLeftArrowBtn(NULL), |
734 | mRightArrowBtn(NULL), | ||
735 | mJumpLeftArrowBtn(NULL), | 738 | mJumpLeftArrowBtn(NULL), |
739 | mRightArrowBtn(NULL), | ||
736 | mJumpRightArrowBtn(NULL), | 740 | mJumpRightArrowBtn(NULL), |
737 | mRightTabBtnOffset(0), | 741 | mRightTabBtnOffset(0), |
738 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), | 742 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), |
@@ -749,8 +753,8 @@ LLTabContainer::LLTabContainer( | |||
749 | : | 753 | : |
750 | LLTabContainerCommon(name, rect_control, pos, close_callback, callback_userdata, bordered), | 754 | LLTabContainerCommon(name, rect_control, pos, close_callback, callback_userdata, bordered), |
751 | mLeftArrowBtn(NULL), | 755 | mLeftArrowBtn(NULL), |
752 | mRightArrowBtn(NULL), | ||
753 | mJumpLeftArrowBtn(NULL), | 756 | mJumpLeftArrowBtn(NULL), |
757 | mRightArrowBtn(NULL), | ||
754 | mJumpRightArrowBtn(NULL), | 758 | mJumpRightArrowBtn(NULL), |
755 | mRightTabBtnOffset(0), | 759 | mRightTabBtnOffset(0), |
756 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), | 760 | mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), |
@@ -1576,43 +1580,48 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag | |||
1576 | { | 1580 | { |
1577 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); | 1581 | BOOL has_scroll_arrows = (mMaxScrollPos > 0); |
1578 | 1582 | ||
1579 | if (has_scroll_arrows) | 1583 | if( mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME ) |
1580 | { | 1584 | { |
1581 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) | 1585 | |
1582 | { | 1586 | if (has_scroll_arrows) |
1583 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; | ||
1584 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1585 | mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1586 | } | ||
1587 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1588 | { | ||
1589 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1590 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1591 | mJumpRightArrowBtn->handleHover(local_x, local_y, mask); | ||
1592 | } | ||
1593 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1594 | { | ||
1595 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | ||
1596 | S32 local_y = y - mLeftArrowBtn->getRect().mBottom; | ||
1597 | mLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1598 | } | ||
1599 | else if (mRightArrowBtn->getRect().pointInRect(x, y)) | ||
1600 | { | 1587 | { |
1601 | S32 local_x = x - mRightArrowBtn->getRect().mLeft; | 1588 | if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) |
1602 | S32 local_y = y - mRightArrowBtn->getRect().mBottom; | 1589 | { |
1603 | mRightArrowBtn->handleHover(local_x, local_y, mask); | 1590 | S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; |
1591 | S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; | ||
1592 | mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1593 | } | ||
1594 | if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) | ||
1595 | { | ||
1596 | S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; | ||
1597 | S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; | ||
1598 | mJumpRightArrowBtn->handleHover(local_x, local_y, mask); | ||
1599 | } | ||
1600 | if (mLeftArrowBtn->getRect().pointInRect(x, y)) | ||
1601 | { | ||
1602 | S32 local_x = x - mLeftArrowBtn->getRect().mLeft; | ||
1603 | S32 local_y = y - mLeftArrowBtn->getRect().mBottom; | ||
1604 | mLeftArrowBtn->handleHover(local_x, local_y, mask); | ||
1605 | } | ||
1606 | else if (mRightArrowBtn->getRect().pointInRect(x, y)) | ||
1607 | { | ||
1608 | S32 local_x = x - mRightArrowBtn->getRect().mLeft; | ||
1609 | S32 local_y = y - mRightArrowBtn->getRect().mBottom; | ||
1610 | mRightArrowBtn->handleHover(local_x, local_y, mask); | ||
1611 | } | ||
1604 | } | 1612 | } |
1605 | } | ||
1606 | 1613 | ||
1607 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) | 1614 | for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) |
1608 | { | ||
1609 | LLTabTuple* tuple = *iter; | ||
1610 | tuple->mButton->setVisible( TRUE ); | ||
1611 | S32 local_x = x - tuple->mButton->getRect().mLeft; | ||
1612 | S32 local_y = y - tuple->mButton->getRect().mBottom; | ||
1613 | if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible()) | ||
1614 | { | 1615 | { |
1615 | tuple->mButton->onCommit(); | 1616 | LLTabTuple* tuple = *iter; |
1617 | tuple->mButton->setVisible( TRUE ); | ||
1618 | S32 local_x = x - tuple->mButton->getRect().mLeft; | ||
1619 | S32 local_y = y - tuple->mButton->getRect().mBottom; | ||
1620 | if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible()) | ||
1621 | { | ||
1622 | tuple->mButton->onCommit(); | ||
1623 | mDragAndDropDelayTimer.stop(); | ||
1624 | } | ||
1616 | } | 1625 | } |
1617 | } | 1626 | } |
1618 | 1627 | ||
@@ -1641,4 +1650,4 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name) | |||
1641 | // tabs have changed size, might need to scroll to see current tab | 1650 | // tabs have changed size, might need to scroll to see current tab |
1642 | updateMaxScrollPos(); | 1651 | updateMaxScrollPos(); |
1643 | } | 1652 | } |
1644 | } \ No newline at end of file | 1653 | } |
diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 7d501d2..f3365c3 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h | |||
@@ -117,7 +117,9 @@ public: | |||
117 | virtual void setTabImage(LLPanel* child, std::string img_name); | 117 | virtual void setTabImage(LLPanel* child, std::string img_name); |
118 | void setTitle( const LLString& title ); | 118 | void setTitle( const LLString& title ); |
119 | const LLString getPanelTitle(S32 index); | 119 | const LLString getPanelTitle(S32 index); |
120 | 120 | ||
121 | void setDragAndDropDelayTimer() { mDragAndDropDelayTimer.start(); } | ||
122 | |||
121 | virtual void setTopBorderHeight(S32 height); | 123 | virtual void setTopBorderHeight(S32 height); |
122 | 124 | ||
123 | virtual void setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*,bool)); | 125 | virtual void setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*,bool)); |
@@ -175,6 +177,8 @@ protected: | |||
175 | S32 mScrollPosPixels; | 177 | S32 mScrollPosPixels; |
176 | S32 mMaxScrollPos; | 178 | S32 mMaxScrollPos; |
177 | 179 | ||
180 | LLFrameTimer mDragAndDropDelayTimer; | ||
181 | |||
178 | void (*mCloseCallback)(void*); | 182 | void (*mCloseCallback)(void*); |
179 | void* mCallbackUserdata; | 183 | void* mCallbackUserdata; |
180 | 184 | ||
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 80205d3..513670b 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "llclipboard.h" | 46 | #include "llclipboard.h" |
47 | #include "llscrollbar.h" | 47 | #include "llscrollbar.h" |
48 | #include "llstl.h" | 48 | #include "llstl.h" |
49 | #include "llstring.h" | ||
49 | #include "llkeyboard.h" | 50 | #include "llkeyboard.h" |
50 | #include "llkeywords.h" | 51 | #include "llkeywords.h" |
51 | #include "llundo.h" | 52 | #include "llundo.h" |
@@ -514,8 +515,10 @@ void LLTextEditor::truncate() | |||
514 | 515 | ||
515 | void LLTextEditor::setText(const LLString &utf8str) | 516 | void LLTextEditor::setText(const LLString &utf8str) |
516 | { | 517 | { |
517 | mUTF8Text = utf8str; | 518 | // LLString::removeCRLF(utf8str); |
518 | mWText = utf8str_to_wstring(utf8str); | 519 | mUTF8Text = utf8str_removeCRLF(utf8str); |
520 | // mUTF8Text = utf8str; | ||
521 | mWText = utf8str_to_wstring(mUTF8Text); | ||
519 | mTextIsUpToDate = TRUE; | 522 | mTextIsUpToDate = TRUE; |
520 | 523 | ||
521 | truncate(); | 524 | truncate(); |
@@ -2491,6 +2494,8 @@ void LLTextEditor::redo() | |||
2491 | // virtual, from LLView | 2494 | // virtual, from LLView |
2492 | void LLTextEditor::onFocusLost() | 2495 | void LLTextEditor::onFocusLost() |
2493 | { | 2496 | { |
2497 | getWindow()->allowLanguageTextInput(FALSE); | ||
2498 | |||
2494 | // Route menu back to the default | 2499 | // Route menu back to the default |
2495 | if( gEditMenuHandler == this ) | 2500 | if( gEditMenuHandler == this ) |
2496 | { | 2501 | { |
@@ -3057,6 +3062,12 @@ void LLTextEditor::setFocus( BOOL new_state ) | |||
3057 | // Don't change anything if the focus state didn't change | 3062 | // Don't change anything if the focus state didn't change |
3058 | if (new_state == old_state) return; | 3063 | if (new_state == old_state) return; |
3059 | 3064 | ||
3065 | // Notify early if we are loosing focus. | ||
3066 | if (!new_state) | ||
3067 | { | ||
3068 | getWindow()->allowLanguageTextInput(FALSE); | ||
3069 | } | ||
3070 | |||
3060 | LLUICtrl::setFocus( new_state ); | 3071 | LLUICtrl::setFocus( new_state ); |
3061 | 3072 | ||
3062 | if( new_state ) | 3073 | if( new_state ) |
@@ -3077,6 +3088,12 @@ void LLTextEditor::setFocus( BOOL new_state ) | |||
3077 | 3088 | ||
3078 | endSelection(); | 3089 | endSelection(); |
3079 | } | 3090 | } |
3091 | |||
3092 | // Notify late if we are gaining focus. | ||
3093 | if (new_state && !mReadOnly) | ||
3094 | { | ||
3095 | getWindow()->allowLanguageTextInput(TRUE); | ||
3096 | } | ||
3080 | } | 3097 | } |
3081 | 3098 | ||
3082 | BOOL LLTextEditor::acceptsTextInput() const | 3099 | BOOL LLTextEditor::acceptsTextInput() const |
diff --git a/linden/indra/llui/llviewquery.cpp b/linden/indra/llui/llviewquery.cpp index 3f9ccf4..65f191b 100644 --- a/linden/indra/llui/llviewquery.cpp +++ b/linden/indra/llui/llviewquery.cpp | |||
@@ -26,6 +26,8 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "linden_common.h" | ||
30 | |||
29 | #include "llview.h" | 31 | #include "llview.h" |
30 | #include "lluictrl.h" | 32 | #include "lluictrl.h" |
31 | #include "llviewquery.h" | 33 | #include "llviewquery.h" |