summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llcombobox.h')
-rw-r--r--indra/llui/llcombobox.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 82134c4ffe..f0bd432f3a 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -150,7 +150,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,7 +230,38 @@ private:
commit_callback_t mPrearrangeCallback;
commit_callback_t mTextEntryCallback;
commit_callback_t mSelectionCallback;
- boost::signals2::connection mTopLostSignalConnection;
- S32 mLastSelectedIndex;
+ 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