aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llscrolllistctrl.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:29 -0500
committerJacek Antonelli2008-08-15 23:45:29 -0500
commit7bdb4845afdd157f95281293803567090e3f992a (patch)
treefbcada1c227d7407f9f37ccba360bfe6326d9c5e /linden/indra/llui/llscrolllistctrl.h
parentSecond Life viewer sources 1.19.0.0 (diff)
downloadmeta-impy-7bdb4845afdd157f95281293803567090e3f992a.zip
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.gz
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.bz2
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.xz
Second Life viewer sources 1.19.0.2
Diffstat (limited to 'linden/indra/llui/llscrolllistctrl.h')
-rw-r--r--linden/indra/llui/llscrolllistctrl.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index ada4f9b..71ba63d 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -97,6 +97,7 @@ public:
97 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; 97 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const;
98 virtual S32 getContentWidth() const; 98 virtual S32 getContentWidth() const;
99 virtual S32 getHeight() const { return llround(mFont->getLineHeight()); } 99 virtual S32 getHeight() const { return llround(mFont->getLineHeight()); }
100 virtual void setValue(LLSD value) { setText(value.asString()); }
100 virtual const LLSD getValue() const { return LLSD(mText.getString()); } 101 virtual const LLSD getValue() const { return LLSD(mText.getString()); }
101 virtual BOOL getVisible() const { return mVisible; } 102 virtual BOOL getVisible() const { return mVisible; }
102 virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} 103 virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;}
@@ -440,6 +441,7 @@ public:
440 BOOL handleClick(S32 x, S32 y, MASK mask); 441 BOOL handleClick(S32 x, S32 y, MASK mask);
441 BOOL selectFirstItem(); 442 BOOL selectFirstItem();
442 BOOL selectNthItem( S32 index ); 443 BOOL selectNthItem( S32 index );
444 BOOL selectItemRange( S32 first, S32 last );
443 BOOL selectItemAt(S32 x, S32 y, MASK mask); 445 BOOL selectItemAt(S32 x, S32 y, MASK mask);
444 446
445 void deleteSingleItem( S32 index ); 447 void deleteSingleItem( S32 index );
@@ -459,7 +461,7 @@ public:
459 virtual BOOL getCanSelect() const { return mCanSelect; } 461 virtual BOOL getCanSelect() const { return mCanSelect; }
460 462
461 S32 getItemIndex( LLScrollListItem* item ); 463 S32 getItemIndex( LLScrollListItem* item );
462 S32 getItemIndex( LLUUID& item_id ); 464 S32 getItemIndex( const LLUUID& item_id );
463 465
464 LLScrollListItem* addCommentText( const LLString& comment_text, EAddPosition pos = ADD_BOTTOM); 466 LLScrollListItem* addCommentText( const LLString& comment_text, EAddPosition pos = ADD_BOTTOM);
465 LLScrollListItem* addSeparator(EAddPosition pos); 467 LLScrollListItem* addSeparator(EAddPosition pos);
@@ -561,7 +563,7 @@ public:
561 static void onClickColumn(void *userdata); 563 static void onClickColumn(void *userdata);
562 564
563 void updateColumns(); 565 void updateColumns();
564 void calcMaxContentWidth(LLScrollListItem* changed_item); 566 void calcColumnWidths();
565 S32 getMaxContentWidth() { return mMaxContentWidth; } 567 S32 getMaxContentWidth() { return mMaxContentWidth; }
566 568
567 void setDisplayHeading(BOOL display); 569 void setDisplayHeading(BOOL display);
@@ -596,6 +598,9 @@ public:
596 598
597 S32 selectMultiple( LLDynamicArray<LLUUID> ids ); 599 S32 selectMultiple( LLDynamicArray<LLUUID> ids );
598 void sortItems(); 600 void sortItems();
601 // manually call this whenever editing list items in place to flag need for resorting
602 void setSorted(BOOL sorted);
603 void dirtyColumns(); // some operation has potentially affected column layout or ordering
599 604
600protected: 605protected:
601 // "Full" interface: use this when you're creating a list that has one or more of the following: 606 // "Full" interface: use this when you're creating a list that has one or more of the following:
@@ -624,7 +629,6 @@ protected:
624 void selectItem(LLScrollListItem* itemp, BOOL single_select = TRUE); 629 void selectItem(LLScrollListItem* itemp, BOOL single_select = TRUE);
625 void deselectItem(LLScrollListItem* itemp); 630 void deselectItem(LLScrollListItem* itemp);
626 void commitIfChanged(); 631 void commitIfChanged();
627 void setSorted(BOOL sorted);
628 BOOL setSort(S32 column, BOOL ascending); 632 BOOL setSort(S32 column, BOOL ascending);
629 633
630protected: 634protected:
@@ -645,6 +649,7 @@ protected:
645 BOOL mNeedsScroll; 649 BOOL mNeedsScroll;
646 BOOL mCanSelect; 650 BOOL mCanSelect;
647 BOOL mDisplayColumnHeaders; 651 BOOL mDisplayColumnHeaders;
652 BOOL mColumnsDirty;
648 653
649 typedef std::deque<LLScrollListItem *> item_list; 654 typedef std::deque<LLScrollListItem *> item_list;
650 item_list mItemList; 655 item_list mItemList;
@@ -686,7 +691,8 @@ protected:
686 691
687 BOOL mSorted; 692 BOOL mSorted;
688 693
689 std::map<LLString, LLScrollListColumn> mColumns; 694 typedef std::map<LLString, LLScrollListColumn> column_map_t;
695 column_map_t mColumns;
690 696
691 BOOL mDirty; 697 BOOL mDirty;
692 S32 mOriginalSelection; 698 S32 mOriginalSelection;