diff options
author | Oz Linden <oz@lindenlab.com> | 2012-08-14 09:01:56 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-08-14 09:01:56 -0400 |
commit | 24c1b62e27e066dc62e7681593ce7c93ee84d5a8 (patch) | |
tree | 76d5b8a1c4eb43073e85156d74e8f3eac11dfe74 /indra/newview/llnamelistctrl.h | |
parent | 2c2167229eac3efd7e7b1c5eafde8ee2e66184cd (diff) | |
parent | 337976096530729a7d671df68907cd59a7986972 (diff) |
merge back beta fixes
Diffstat (limited to 'indra/newview/llnamelistctrl.h')
-rw-r--r-- | indra/newview/llnamelistctrl.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index ca9956dc53..ba85e77c65 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -33,6 +33,26 @@ class LLAvatarName; +/** + * LLNameListCtrl item + * + * We don't use LLScrollListItem to be able to override getUUID(), which is needed + * because the name list item value is not simply an UUID but a map (uuid, is_group). + */ +class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem> +{ +public: + LLUUID getUUID() const { return getValue()["uuid"].asUUID(); } +protected: + friend class LLNameListCtrl; + + LLNameListItem( const LLScrollListItem::Params& p ) + : LLScrollListItem(p) + { + } +}; + + class LLNameListCtrl : public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl> { @@ -110,12 +130,14 @@ public: void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } + void sortByName(BOOL ascending); + /*virtual*/ void updateColumns(); /*virtual*/ void mouseOverHighlightNthItem( S32 index ); private: void showInspector(const LLUUID& avatar_id, bool is_group); - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, LLHandle<LLNameListItem> item); private: S32 mNameColumnIndex; @@ -124,24 +146,5 @@ private: bool mShortNames; // display name only, no SLID }; -/** - * LLNameListCtrl item - * - * We don't use LLScrollListItem to be able to override getUUID(), which is needed - * because the name list item value is not simply an UUID but a map (uuid, is_group). - */ -class LLNameListItem : public LLScrollListItem -{ -public: - LLUUID getUUID() const { return getValue()["uuid"].asUUID(); } - -protected: - friend class LLNameListCtrl; - - LLNameListItem( const LLScrollListItem::Params& p ) - : LLScrollListItem(p) - { - } -}; #endif |