aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llscrolllistctrl.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llscrolllistctrl.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llscrolllistctrl.cpp')
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp123
1 files changed, 54 insertions, 69 deletions
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 043caa9..eee2bcf 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -1,4 +1,4 @@
1/** 1 /**
2 * @file llscrolllistctrl.cpp 2 * @file llscrolllistctrl.cpp
3 * @brief LLScrollListCtrl base class 3 * @brief LLScrollListCtrl base class
4 * 4 *
@@ -43,6 +43,7 @@
43#include "llclipboard.h" 43#include "llclipboard.h"
44#include "llfocusmgr.h" 44#include "llfocusmgr.h"
45#include "llgl.h" 45#include "llgl.h"
46#include "llglimmediate.h"
46#include "llglheaders.h" 47#include "llglheaders.h"
47#include "llresmgr.h" 48#include "llresmgr.h"
48#include "llscrollbar.h" 49#include "llscrollbar.h"
@@ -126,7 +127,7 @@ LLScrollListIcon::~LLScrollListIcon()
126{ 127{
127} 128}
128 129
129void LLScrollListIcon::setValue(LLSD value) 130void LLScrollListIcon::setValue(const LLSD& value)
130{ 131{
131 mImageUUID = value.asUUID(); 132 mImageUUID = value.asUUID();
132 // don't use default image specified by LLUUID::null, use no image in that case 133 // don't use default image specified by LLUUID::null, use no image in that case
@@ -142,11 +143,11 @@ void LLScrollListIcon::setColor(const LLColor4& color)
142S32 LLScrollListIcon::getWidth() const 143S32 LLScrollListIcon::getWidth() const
143{ 144{
144 // if no specified fix width, use width of icon 145 // if no specified fix width, use width of icon
145 if (mWidth == 0) 146 if (LLScrollListCell::getWidth() == 0)
146 { 147 {
147 return mIcon->getWidth(); 148 return mIcon->getWidth();
148 } 149 }
149 return mWidth; 150 return LLScrollListCell::getWidth();
150} 151}
151 152
152 153
@@ -170,11 +171,11 @@ LLScrollListCheck::LLScrollListCheck(LLCheckBoxCtrl* check_box, S32 width)
170 171
171 rect.mRight = rect.mLeft + width; 172 rect.mRight = rect.mLeft + width;
172 mCheckBox->setRect(rect); 173 mCheckBox->setRect(rect);
173 mWidth = width; 174 setWidth(width);
174 } 175 }
175 else 176 else
176 { 177 {
177 mWidth = rect.getWidth(); //check_box->getWidth(); 178 setWidth(rect.getWidth()); //check_box->getWidth();
178 } 179 }
179} 180}
180 181
@@ -259,6 +260,12 @@ void LLScrollListText::setText(const LLStringExplicit& text)
259 mText = text; 260 mText = text;
260} 261}
261 262
263//virtual
264void LLScrollListText::setValue(const LLSD& text)
265{
266 setText(text.asString());
267}
268
262void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const 269void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const
263{ 270{
264 LLColor4 display_color; 271 LLColor4 display_color;
@@ -274,7 +281,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
274 if (mHighlightCount > 0) 281 if (mHighlightCount > 0)
275 { 282 {
276 mRoundedRectImage->bind(); 283 mRoundedRectImage->bind();
277 glColor4fv(highlight_color.mV); 284 gGL.color4fv(highlight_color.mV);
278 S32 left = 0; 285 S32 left = 0;
279 switch(mFontAlignment) 286 switch(mFontAlignment)
280 { 287 {
@@ -361,7 +368,7 @@ void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell )
361 } 368 }
362} 369}
363 370
364LLString LLScrollListItem::getContentsCSV() 371LLString LLScrollListItem::getContentsCSV() const
365{ 372{
366 LLString ret; 373 LLString ret;
367 374
@@ -386,7 +393,7 @@ void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const
386 bg_rect.stretch(LIST_BORDER_PAD, 0); 393 bg_rect.stretch(LIST_BORDER_PAD, 0);
387 { 394 {
388 LLGLSNoTexture no_texture; 395 LLGLSNoTexture no_texture;
389 glColor4fv(bg_color.mV); 396 gGL.color4fv(bg_color.mV);
390 gl_rect_2d( bg_rect ); 397 gl_rect_2d( bg_rect );
391 } 398 }
392 399
@@ -536,8 +543,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
536 mItemListRect.setOriginAndSize( 543 mItemListRect.setOriginAndSize(
537 mBorderThickness + LIST_BORDER_PAD, 544 mBorderThickness + LIST_BORDER_PAD,
538 mBorderThickness + LIST_BORDER_PAD, 545 mBorderThickness + LIST_BORDER_PAD,
539 mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), 546 getRect().getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ),
540 mRect.getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) ); 547 getRect().getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) );
541 548
542 updateLineHeight(); 549 updateLineHeight();
543 550
@@ -546,7 +553,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
546 // Init the scrollbar 553 // Init the scrollbar
547 LLRect scroll_rect; 554 LLRect scroll_rect;
548 scroll_rect.setOriginAndSize( 555 scroll_rect.setOriginAndSize(
549 mRect.getWidth() - mBorderThickness - SCROLLBAR_SIZE, 556 getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE,
550 mItemListRect.mBottom, 557 mItemListRect.mBottom,
551 SCROLLBAR_SIZE, 558 SCROLLBAR_SIZE,
552 mItemListRect.getHeight()); 559 mItemListRect.getHeight());
@@ -567,7 +574,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
567 // Border 574 // Border
568 if (show_border) 575 if (show_border)
569 { 576 {
570 LLRect border_rect( 0, mRect.getHeight(), mRect.getWidth(), 0 ); 577 LLRect border_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
571 mBorder = new LLViewBorder( "dlg border", border_rect, LLViewBorder::BEVEL_IN, LLViewBorder::STYLE_LINE, 1 ); 578 mBorder = new LLViewBorder( "dlg border", border_rect, LLViewBorder::BEVEL_IN, LLViewBorder::STYLE_LINE, 1 );
572 addChild(mBorder); 579 addChild(mBorder);
573 } 580 }
@@ -733,8 +740,8 @@ void LLScrollListCtrl::updateLayout()
733 mItemListRect.setOriginAndSize( 740 mItemListRect.setOriginAndSize(
734 mBorderThickness + LIST_BORDER_PAD, 741 mBorderThickness + LIST_BORDER_PAD,
735 mBorderThickness + LIST_BORDER_PAD, 742 mBorderThickness + LIST_BORDER_PAD,
736 mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), 743 getRect().getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ),
737 mRect.getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) - heading_size ); 744 getRect().getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) - heading_size );
738 745
739 // how many lines of content in a single "page" 746 // how many lines of content in a single "page"
740 mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0; 747 mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0;
@@ -742,7 +749,7 @@ void LLScrollListCtrl::updateLayout()
742 if (scrollbar_visible) 749 if (scrollbar_visible)
743 { 750 {
744 // provide space on the right for scrollbar 751 // provide space on the right for scrollbar
745 mItemListRect.mRight = mRect.getWidth() - ( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE; 752 mItemListRect.mRight = getRect().getWidth() - ( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE;
746 } 753 }
747 754
748 mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0)); 755 mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
@@ -758,7 +765,7 @@ void LLScrollListCtrl::updateLayout()
758void LLScrollListCtrl::fitContents(S32 max_width, S32 max_height) 765void LLScrollListCtrl::fitContents(S32 max_width, S32 max_height)
759{ 766{
760 S32 height = llmin( getRequiredRect().getHeight(), max_height ); 767 S32 height = llmin( getRequiredRect().getHeight(), max_height );
761 S32 width = mRect.getWidth(); 768 S32 width = getRect().getWidth();
762 769
763 reshape( width, height ); 770 reshape( width, height );
764} 771}
@@ -770,7 +777,7 @@ LLRect LLScrollListCtrl::getRequiredRect()
770 S32 height = (mLineHeight * getItemCount()) 777 S32 height = (mLineHeight * getItemCount())
771 + (2 * ( mBorderThickness + LIST_BORDER_PAD )) 778 + (2 * ( mBorderThickness + LIST_BORDER_PAD ))
772 + heading_size; 779 + heading_size;
773 S32 width = mRect.getWidth(); 780 S32 width = getRect().getWidth();
774 781
775 return LLRect(0, height, width, 0); 782 return LLRect(0, height, width, 0);
776} 783}
@@ -1206,10 +1213,10 @@ S32 LLScrollListCtrl::selectMultiple( LLDynamicArray<LLUUID> ids )
1206 return count; 1213 return count;
1207} 1214}
1208 1215
1209S32 LLScrollListCtrl::getItemIndex( LLScrollListItem* target_item ) 1216S32 LLScrollListCtrl::getItemIndex( LLScrollListItem* target_item ) const
1210{ 1217{
1211 S32 index = 0; 1218 S32 index = 0;
1212 item_list::iterator iter; 1219 item_list::const_iterator iter;
1213 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 1220 for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
1214 { 1221 {
1215 LLScrollListItem *itemp = *iter; 1222 LLScrollListItem *itemp = *iter;
@@ -1222,10 +1229,10 @@ S32 LLScrollListCtrl::getItemIndex( LLScrollListItem* target_item )
1222 return -1; 1229 return -1;
1223} 1230}
1224 1231
1225S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id ) 1232S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id ) const
1226{ 1233{
1227 S32 index = 0; 1234 S32 index = 0;
1228 item_list::iterator iter; 1235 item_list::const_iterator iter;
1229 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 1236 for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
1230 { 1237 {
1231 LLScrollListItem *itemp = *iter; 1238 LLScrollListItem *itemp = *iter;
@@ -1366,6 +1373,8 @@ LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
1366// Returns false if item not found. 1373// Returns false if item not found.
1367BOOL LLScrollListCtrl::selectItemByLabel(const LLString& label, BOOL case_sensitive) 1374BOOL LLScrollListCtrl::selectItemByLabel(const LLString& label, BOOL case_sensitive)
1368{ 1375{
1376 // ensure that no stale items are selected, even if we don't find a match
1377 deselectAllItems(TRUE);
1369 //RN: assume no empty items 1378 //RN: assume no empty items
1370 if (label.empty()) 1379 if (label.empty())
1371 { 1380 {
@@ -1525,7 +1534,7 @@ BOOL LLScrollListCtrl::selectByID( const LLUUID& id )
1525 return selectByValue( LLSD(id) ); 1534 return selectByValue( LLSD(id) );
1526} 1535}
1527 1536
1528BOOL LLScrollListCtrl::setSelectedByValue(LLSD value, BOOL selected) 1537BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
1529{ 1538{
1530 BOOL found = FALSE; 1539 BOOL found = FALSE;
1531 1540
@@ -1558,9 +1567,9 @@ BOOL LLScrollListCtrl::setSelectedByValue(LLSD value, BOOL selected)
1558 return found; 1567 return found;
1559} 1568}
1560 1569
1561BOOL LLScrollListCtrl::isSelected(LLSD value) 1570BOOL LLScrollListCtrl::isSelected(const LLSD& value) const
1562{ 1571{
1563 item_list::iterator iter; 1572 item_list::const_iterator iter;
1564 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 1573 for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
1565 { 1574 {
1566 LLScrollListItem* item = *iter; 1575 LLScrollListItem* item = *iter;
@@ -1572,7 +1581,7 @@ BOOL LLScrollListCtrl::isSelected(LLSD value)
1572 return FALSE; 1581 return FALSE;
1573} 1582}
1574 1583
1575LLUUID LLScrollListCtrl::getStringUUIDSelectedItem() 1584LLUUID LLScrollListCtrl::getStringUUIDSelectedItem() const
1576{ 1585{
1577 LLScrollListItem* item = getFirstSelected(); 1586 LLScrollListItem* item = getFirstSelected();
1578 1587
@@ -1698,12 +1707,12 @@ void LLScrollListCtrl::draw()
1698 scrollToShowSelected(); 1707 scrollToShowSelected();
1699 mNeedsScroll = FALSE; 1708 mNeedsScroll = FALSE;
1700 } 1709 }
1701 LLRect background(0, mRect.getHeight(), mRect.getWidth(), 0); 1710 LLRect background(0, getRect().getHeight(), getRect().getWidth(), 0);
1702 // Draw background 1711 // Draw background
1703 if (mBackgroundVisible) 1712 if (mBackgroundVisible)
1704 { 1713 {
1705 LLGLSNoTexture no_texture; 1714 LLGLSNoTexture no_texture;
1706 glColor4fv( getEnabled() ? mBgWriteableColor.mV : mBgReadOnlyColor.mV ); 1715 gGL.color4fv( getEnabled() ? mBgWriteableColor.mV : mBgReadOnlyColor.mV );
1707 gl_rect_2d(background); 1716 gl_rect_2d(background);
1708 } 1717 }
1709 1718
@@ -1753,10 +1762,9 @@ BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky
1753 { 1762 {
1754 LLScrollListCell* hit_cell = hit_item->getColumn(column_index); 1763 LLScrollListCell* hit_cell = hit_item->getColumn(column_index);
1755 if (!hit_cell) return FALSE; 1764 if (!hit_cell) return FALSE;
1756 S32 cell_required_width = hit_cell->getContentWidth(); 1765 //S32 cell_required_width = hit_cell->getContentWidth();
1757 if (hit_cell 1766 if (hit_cell
1758 && hit_cell->isText() 1767 && hit_cell->isText())
1759 && cell_required_width > columnp->mWidth)
1760 { 1768 {
1761 1769
1762 S32 rect_left = getColumnOffsetFromIndex(column_index) + mItemListRect.mLeft; 1770 S32 rect_left = getColumnOffsetFromIndex(column_index) + mItemListRect.mLeft;
@@ -1772,8 +1780,8 @@ BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky
1772 &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); 1780 &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) );
1773 1781
1774 msg = hit_cell->getValue().asString(); 1782 msg = hit_cell->getValue().asString();
1775 handled = TRUE;
1776 } 1783 }
1784 handled = TRUE;
1777 } 1785 }
1778 1786
1779 // otherwise, look for a tooltip associated with this column 1787 // otherwise, look for a tooltip associated with this column
@@ -2441,16 +2449,6 @@ void LLScrollListCtrl::commitIfChanged()
2441 } 2449 }
2442} 2450}
2443 2451
2444void LLScrollListCtrl::setSorted(BOOL sorted)
2445{
2446 mSorted = sorted;
2447}
2448
2449BOOL LLScrollListCtrl::isSorted()
2450{
2451 return mSorted;
2452}
2453
2454struct SameSortColumn 2452struct SameSortColumn
2455{ 2453{
2456 SameSortColumn(S32 column) : mColumn(column) {} 2454 SameSortColumn(S32 column) : mColumn(column) {}
@@ -2544,7 +2542,7 @@ void LLScrollListCtrl::dirtyColumns()
2544} 2542}
2545 2543
2546 2544
2547S32 LLScrollListCtrl::getScrollPos() 2545S32 LLScrollListCtrl::getScrollPos() const
2548{ 2546{
2549 return mScrollbar->getDocPos(); 2547 return mScrollbar->getDocPos();
2550} 2548}
@@ -2901,7 +2899,7 @@ void LLScrollListCtrl::copy()
2901} 2899}
2902 2900
2903// virtual 2901// virtual
2904BOOL LLScrollListCtrl::canCopy() 2902BOOL LLScrollListCtrl::canCopy() const
2905{ 2903{
2906 return (getFirstSelected() != NULL); 2904 return (getFirstSelected() != NULL);
2907} 2905}
@@ -2914,25 +2912,12 @@ void LLScrollListCtrl::cut()
2914} 2912}
2915 2913
2916// virtual 2914// virtual
2917BOOL LLScrollListCtrl::canCut() 2915BOOL LLScrollListCtrl::canCut() const
2918{ 2916{
2919 return canCopy() && canDoDelete(); 2917 return canCopy() && canDoDelete();
2920} 2918}
2921 2919
2922// virtual 2920// virtual
2923void LLScrollListCtrl::doDelete()
2924{
2925 // Not yet implemented
2926}
2927
2928// virtual
2929BOOL LLScrollListCtrl::canDoDelete()
2930{
2931 // Not yet implemented
2932 return FALSE;
2933}
2934
2935// virtual
2936void LLScrollListCtrl::selectAll() 2921void LLScrollListCtrl::selectAll()
2937{ 2922{
2938 // Deselects all other items 2923 // Deselects all other items
@@ -2953,7 +2938,7 @@ void LLScrollListCtrl::selectAll()
2953} 2938}
2954 2939
2955// virtual 2940// virtual
2956BOOL LLScrollListCtrl::canSelectAll() 2941BOOL LLScrollListCtrl::canSelectAll() const
2957{ 2942{
2958 return getCanSelect() && mAllowMultipleSelection && !(mMaxSelectable > 0 && mItemList.size() > mMaxSelectable); 2943 return getCanSelect() && mAllowMultipleSelection && !(mMaxSelectable > 0 && mItemList.size() > mMaxSelectable);
2959} 2944}
@@ -2965,7 +2950,7 @@ void LLScrollListCtrl::deselect()
2965} 2950}
2966 2951
2967// virtual 2952// virtual
2968BOOL LLScrollListCtrl::canDeselect() 2953BOOL LLScrollListCtrl::canDeselect() const
2969{ 2954{
2970 return getCanSelect(); 2955 return getCanSelect();
2971} 2956}
@@ -3056,7 +3041,7 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
3056 LLScrollListCtrl *parent = info->mParentCtrl; 3041 LLScrollListCtrl *parent = info->mParentCtrl;
3057 if (!parent) return; 3042 if (!parent) return;
3058 3043
3059 U32 column_index = info->mIndex; 3044 S32 column_index = info->mIndex;
3060 3045
3061 LLScrollListColumn* column = parent->mColumnsIndexed[info->mIndex]; 3046 LLScrollListColumn* column = parent->mColumnsIndexed[info->mIndex];
3062 bool ascending = column->mSortAscending; 3047 bool ascending = column->mSortAscending;
@@ -3430,14 +3415,14 @@ LLColumnHeader::LLColumnHeader(const LLString& label, const LLRect &rect, LLScro
3430 mAscendingText = "[LOW]...[HIGH](Ascending)"; 3415 mAscendingText = "[LOW]...[HIGH](Ascending)";
3431 mDescendingText = "[HIGH]...[LOW](Descending)"; 3416 mDescendingText = "[HIGH]...[LOW](Descending)";
3432 3417
3433 mList->reshape(llmax(mList->getRect().getWidth(), 110, mRect.getWidth()), mList->getRect().getHeight()); 3418 mList->reshape(llmax(mList->getRect().getWidth(), 110, getRect().getWidth()), mList->getRect().getHeight());
3434 3419
3435 // resize handles on left and right 3420 // resize handles on left and right
3436 const S32 RESIZE_BAR_THICKNESS = 3; 3421 const S32 RESIZE_BAR_THICKNESS = 3;
3437 mResizeBar = new LLResizeBar( 3422 mResizeBar = new LLResizeBar(
3438 "resizebar", 3423 "resizebar",
3439 this, 3424 this,
3440 LLRect( mRect.getWidth() - RESIZE_BAR_THICKNESS, mRect.getHeight(), mRect.getWidth(), 0), 3425 LLRect( getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0),
3441 MIN_COLUMN_WIDTH, S32_MAX, LLResizeBar::RIGHT ); 3426 MIN_COLUMN_WIDTH, S32_MAX, LLResizeBar::RIGHT );
3442 addChild(mResizeBar); 3427 addChild(mResizeBar);
3443 3428
@@ -3458,10 +3443,10 @@ void LLColumnHeader::draw()
3458 mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent); 3443 mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent);
3459 mArrowImage = mButton->getImageOverlay()->getImage(); 3444 mArrowImage = mButton->getImageOverlay()->getImage();
3460 3445
3461 //BOOL clip = mRect.mRight > mColumn->mParentCtrl->getItemListRect().getWidth(); 3446 //BOOL clip = getRect().mRight > mColumn->mParentCtrl->getItemListRect().getWidth();
3462 //LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE); 3447 //LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE);
3463 3448
3464 //LLRect column_header_local_rect(-mRect.mLeft, mRect.getHeight(), mColumn->mParentCtrl->getItemListRect().getWidth() - mRect.mLeft, 0); 3449 //LLRect column_header_local_rect(-getRect().mLeft, getRect().getHeight(), mColumn->mParentCtrl->getItemListRect().getWidth() - getRect().mLeft, 0);
3465 //LLUI::setScissorRegionLocal(column_header_local_rect); 3450 //LLUI::setScissorRegionLocal(column_header_local_rect);
3466 3451
3467 // Draw children 3452 // Draw children
@@ -3605,13 +3590,13 @@ void LLColumnHeader::showList()
3605 3590
3606 S32 text_width = LLFontGL::sSansSerifSmall->getWidth(ascending_string); 3591 S32 text_width = LLFontGL::sSansSerifSmall->getWidth(ascending_string);
3607 text_width = llmax(text_width, LLFontGL::sSansSerifSmall->getWidth(descending_string)) + 10; 3592 text_width = llmax(text_width, LLFontGL::sSansSerifSmall->getWidth(descending_string)) + 10;
3608 text_width = llmax(text_width, mRect.getWidth() - 30); 3593 text_width = llmax(text_width, getRect().getWidth() - 30);
3609 3594
3610 mList->getColumn(0)->mWidth = text_width; 3595 mList->getColumn(0)->mWidth = text_width;
3611 ((LLScrollListText*)mList->getFirstData()->getColumn(0))->setText(ascending_string); 3596 ((LLScrollListText*)mList->getFirstData()->getColumn(0))->setText(ascending_string);
3612 ((LLScrollListText*)mList->getLastData()->getColumn(0))->setText(descending_string); 3597 ((LLScrollListText*)mList->getLastData()->getColumn(0))->setText(descending_string);
3613 3598
3614 mList->reshape(llmax(text_width + 30, 110, mRect.getWidth()), mList->getRect().getHeight()); 3599 mList->reshape(llmax(text_width + 30, 110, getRect().getWidth()), mList->getRect().getHeight());
3615 3600
3616 LLComboBox::showList(); 3601 LLComboBox::showList();
3617 } 3602 }
@@ -3684,7 +3669,7 @@ LLView* LLColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_d
3684void LLColumnHeader::userSetShape(const LLRect& new_rect) 3669void LLColumnHeader::userSetShape(const LLRect& new_rect)
3685{ 3670{
3686 S32 new_width = new_rect.getWidth(); 3671 S32 new_width = new_rect.getWidth();
3687 S32 delta_width = new_width - (mRect.getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/); 3672 S32 delta_width = new_width - (getRect().getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/);
3688 3673
3689 if (delta_width != 0) 3674 if (delta_width != 0)
3690 { 3675 {
@@ -3744,7 +3729,7 @@ void LLColumnHeader::userSetShape(const LLRect& new_rect)
3744 } 3729 }
3745 3730
3746 // propagate constrained delta_width to new width for this column 3731 // propagate constrained delta_width to new width for this column
3747 new_width = mRect.getWidth() + delta_width - mColumn->mParentCtrl->getColumnPadding(); 3732 new_width = getRect().getWidth() + delta_width - mColumn->mParentCtrl->getColumnPadding();
3748 3733
3749 // use requested width 3734 // use requested width
3750 mColumn->mWidth = new_width; 3735 mColumn->mWidth = new_width;