diff options
author | Kent Quirk <q@lindenlab.com> | 2010-03-23 23:02:02 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-03-23 23:02:02 -0400 |
commit | 62ebb4533ceff1d0a7cf68a6385a8d3b34fa51d4 (patch) | |
tree | dd6cd1b313f933847c6e603d50a65ffbc82fee01 /indra/llui/llcombobox.h | |
parent | 3ad56f22158dd2665204745af2171689f208cd7e (diff) | |
parent | ea8f1b80df0fcfcdbb52123b2ece68916ed139ff (diff) |
Merge from viewer-2-0
Diffstat (limited to 'indra/llui/llcombobox.h')
-rw-r--r-- | indra/llui/llcombobox.h | 37 |
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 |