diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
commit | 7df79382a075646a51f21bed0d7f8de883fc3608 (patch) | |
tree | e7a71ed0dc7e05e4091066e3a0455343dfcfce4f /indra/llui/llsearcheditor.h | |
parent | 56449313529145a3d3c0e231967d9502b549056c (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1634 https://svn.aws.productengine.com/secondlife/pe/stable-2@1648 -> viewer-2.0.0-3
* Bugs: EXT-888 EXT-866 EXT-861 EXT-858 EXT-864 EXT-875 EXT-884 EXT-718 EXT-786 EXT-885 EXT-910 EXT-845 EXT-312 EXT-823 EXT-868
* New Development: EXT-748 EXT-863 EXT-835
QA: Please test Recent List to verify it has no troubles.
Diffstat (limited to 'indra/llui/llsearcheditor.h')
-rw-r--r-- | indra/llui/llsearcheditor.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index cd2867b493..f395e7e816 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -50,10 +50,15 @@ class LLSearchEditor : public LLUICtrl public: struct Params : public LLInitParam::Block<Params, LLLineEditor::Params> { - Optional<LLButton::Params> search_button; + Optional<LLButton::Params> search_button, clear_button; + Optional<bool> search_button_visible, clear_button_visible; + Optional<commit_callback_t> keystroke_callback; Params() : search_button("search_button") + , search_button_visible("search_button_visible") + , clear_button("clear_button") + , clear_button_visible("clear_button_visible") { name = "search_editor"; } @@ -66,26 +71,29 @@ protected: public: virtual ~LLSearchEditor() {} + /*virtual*/ void draw(); + void setText(const LLStringExplicit &new_text) { mSearchEditor->setText(new_text); } const std::string& getText() const { return mSearchEditor->getText(); } - // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + virtual void setLabel( const LLStringExplicit &new_label ); virtual void clear(); - void setKeystrokeCallback(LLLineEditor::callback_t callback, void* user_data) - { - if(mSearchEditor) - mSearchEditor->setKeystrokeCallback(callback,user_data); - } + void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; } + +protected: + void onClearButtonClick(const LLSD& data); + virtual void handleKeystroke(); -private: + commit_callback_t mKeystrokeCallback; LLLineEditor* mSearchEditor; LLButton* mSearchButton; + LLButton* mClearButton; }; #endif // LL_SEARCHEDITOR_H |