summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.h
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-03-29 16:55:22 -0700
committerJames Cook <james@lindenlab.com>2010-03-29 16:55:22 -0700
commitecc2c726502448076295254714c0bfa8c0074f25 (patch)
tree6a9434c540f7b5ea7bca326df1a420e4a0a99cc4 /indra/llui/llcombobox.h
parentd2f9e34598621f1dabad15025417efd6b81dddf0 (diff)
parentac103403160e87bb6b40ac3e032d077a3381da8e (diff)
Merge latest viewer-hotfix, approximately equal to Viewer 2.0 final
Diffstat (limited to 'indra/llui/llcombobox.h')
-rw-r--r--indra/llui/llcombobox.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 3ed273404c..7f93cd1477 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -147,7 +147,7 @@ public:
// Get name of current item. Returns an empty string if not found.
const std::string getSimple() const;
// Get contents of column x of selected row
- const std::string getSelectedItemLabel(S32 column = 0) const;
+ virtual const std::string getSelectedItemLabel(S32 column = 0) const;
// Sets the label, which doesn't have to exist in the label.
// This is probably a UI abuse.
@@ -230,4 +230,35 @@ private:
boost::signals2::connection mTopLostSignalConnection;
S32 mLastSelectedIndex;
};
+
+// A combo box with icons for the list of items.
+class LLIconsComboBox
+: public LLComboBox
+{
+public:
+ struct Params
+ : public LLInitParam::Block<Params, LLComboBox::Params>
+ {
+ Optional<S32> icon_column,
+ label_column;
+ Params();
+ };
+
+ /*virtual*/ const std::string getSelectedItemLabel(S32 column = 0) const;
+
+private:
+ enum EColumnIndex
+ {
+ ICON_COLUMN = 0,
+ LABEL_COLUMN
+ };
+
+ friend class LLUICtrlFactory;
+ LLIconsComboBox(const Params&);
+ virtual ~LLIconsComboBox() {};
+
+ S32 mIconColumnIndex;
+ S32 mLabelColumnIndex;
+};
+
#endif