aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llscrolllistctrl.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llui/llscrolllistctrl.h
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llui/llscrolllistctrl.h')
-rw-r--r--linden/indra/llui/llscrolllistctrl.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index 716d18a..8a31154 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -90,7 +90,7 @@ public:
90 LLScrollListSeparator(S32 width); 90 LLScrollListSeparator(S32 width);
91 virtual ~LLScrollListSeparator() {}; 91 virtual ~LLScrollListSeparator() {};
92 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; // truncate to given width, if possible 92 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; // truncate to given width, if possible
93 virtual S32 getHeight() const { return 5; }; 93 virtual S32 getHeight() const;
94 virtual BOOL isText() const { return FALSE; } 94 virtual BOOL isText() const { return FALSE; }
95}; 95};
96 96
@@ -105,14 +105,14 @@ public:
105 105
106 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; 106 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const;
107 virtual S32 getContentWidth() const; 107 virtual S32 getContentWidth() const;
108 virtual S32 getHeight() const { return llround(mFont->getLineHeight()); } 108 virtual S32 getHeight() const;
109 virtual void setValue(const LLSD& value); 109 virtual void setValue(const LLSD& value);
110 virtual const LLSD getValue() const { return LLSD(mText.getString()); } 110 virtual const LLSD getValue() const;
111 virtual BOOL getVisible() const { return mVisible; } 111 virtual BOOL getVisible() const;
112 virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} 112 virtual void highlightText(S32 offset, S32 num_chars);
113 113
114 virtual void setColor(const LLColor4&); 114 virtual void setColor(const LLColor4&);
115 virtual BOOL isText() const { return TRUE; } 115 virtual BOOL isText() const;
116 116
117 void setText(const LLStringExplicit& text); 117 void setText(const LLStringExplicit& text);
118 void setFontStyle(const U8 font_style) { mFontStyle = font_style; } 118 void setFontStyle(const U8 font_style) { mFontStyle = font_style; }
@@ -128,7 +128,7 @@ private:
128 S32 mHighlightCount; 128 S32 mHighlightCount;
129 S32 mHighlightOffset; 129 S32 mHighlightOffset;
130 130
131 LLPointer<LLImageGL> mRoundedRectImage; 131 LLPointer<LLUIImage> mRoundedRectImage;
132 132
133 static U32 sCount; 133 static U32 sCount;
134}; 134};
@@ -139,20 +139,19 @@ private:
139class LLScrollListIcon : public LLScrollListCell 139class LLScrollListIcon : public LLScrollListCell
140{ 140{
141public: 141public:
142 LLScrollListIcon( const LLUUID& icon_id, S32 width = 0); 142 LLScrollListIcon( LLUIImagePtr icon, S32 width = 0);
143 LLScrollListIcon(const LLSD& value, S32 width = 0);
143 /*virtual*/ ~LLScrollListIcon(); 144 /*virtual*/ ~LLScrollListIcon();
144 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; 145 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const;
145 virtual S32 getWidth() const; 146 virtual S32 getWidth() const;
146 virtual S32 getHeight() const { return mIcon ? mIcon->getHeight() : 0; } 147 virtual S32 getHeight() const { return mIcon ? mIcon->getHeight() : 0; }
147 // used as sort criterion 148 virtual const LLSD getValue() const { return mIcon.isNull() ? LLString::null : mIcon->getName(); }
148 virtual const LLSD getValue() const { return LLSD(mImageUUID); }
149 virtual void setColor(const LLColor4&); 149 virtual void setColor(const LLColor4&);
150 virtual BOOL isText()const { return FALSE; } 150 virtual BOOL isText()const { return FALSE; }
151 virtual void setValue(const LLSD& value); 151 virtual void setValue(const LLSD& value);
152 152
153private: 153private:
154 LLPointer<LLImageGL> mIcon; 154 LLUIImagePtr mIcon;
155 LLUUID mImageUUID;
156 LLColor4 mColor; 155 LLColor4 mColor;
157}; 156};
158 157
@@ -342,8 +341,8 @@ public:
342 void addColumn( const LLString& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE) 341 void addColumn( const LLString& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE)
343 { mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); } 342 { mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); }
344 343
345 void addColumn( const LLUUID& icon_id, S32 width = 0 ) 344 void addColumn( LLUIImagePtr icon, S32 width = 0 )
346 { mColumns.push_back( new LLScrollListIcon(icon_id, width) ); } 345 { mColumns.push_back( new LLScrollListIcon(icon, width) ); }
347 346
348 void addColumn( LLCheckBoxCtrl* check, S32 width = 0 ) 347 void addColumn( LLCheckBoxCtrl* check, S32 width = 0 )
349 { mColumns.push_back( new LLScrollListCheck(check,width) ); } 348 { mColumns.push_back( new LLScrollListCheck(check,width) ); }
@@ -404,8 +403,7 @@ public:
404 BOOL draw_border = TRUE); 403 BOOL draw_border = TRUE);
405 404
406 virtual ~LLScrollListCtrl(); 405 virtual ~LLScrollListCtrl();
407 virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SCROLL_LIST; } 406
408 virtual LLString getWidgetTag() const { return LL_SCROLL_LIST_CTRL_TAG; }
409 virtual LLXMLNodePtr getXML(bool save_children = true) const; 407 virtual LLXMLNodePtr getXML(bool save_children = true) const;
410 void setScrollListParameters(LLXMLNodePtr node); 408 void setScrollListParameters(LLXMLNodePtr node);
411 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 409 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
@@ -562,8 +560,8 @@ public:
562 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); 560 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
563 /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); 561 /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
564 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); 562 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
565 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); 563 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
566 /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); 564 /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
567 /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 565 /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
568 /*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); 566 /*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect);
569 /*virtual*/ void setEnabled(BOOL enabled); 567 /*virtual*/ void setEnabled(BOOL enabled);
@@ -618,6 +616,7 @@ public:
618 616
619 S32 selectMultiple( LLDynamicArray<LLUUID> ids ); 617 S32 selectMultiple( LLDynamicArray<LLUUID> ids );
620 void sortItems(); 618 void sortItems();
619
621 // manually call this whenever editing list items in place to flag need for resorting 620 // manually call this whenever editing list items in place to flag need for resorting
622 void setSorted(BOOL sorted) { mSorted = sorted; } 621 void setSorted(BOOL sorted) { mSorted = sorted; }
623 void dirtyColumns(); // some operation has potentially affected column layout or ordering 622 void dirtyColumns(); // some operation has potentially affected column layout or ordering