diff options
author | Jonathan Yap <none@none> | 2012-02-01 10:16:13 -0500 |
---|---|---|
committer | Jonathan Yap <none@none> | 2012-02-01 10:16:13 -0500 |
commit | 4778d82ec6b735d6f3d3a4335496e9b6d804bbf7 (patch) | |
tree | e8c978642b19fc3930e826fae42463b4334ab7aa /indra/llui | |
parent | 4ef9277761b5faee2825177112939b72c563a4ea (diff) | |
parent | 8758c7b8415a1cb67c504f142f96b5a7fec296d2 (diff) |
STORM-1738 Initial callback work
warn-on-failure:open-license
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 8 | ||||
-rw-r--r-- | indra/llui/lllineeditor.h | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 06dfc90d83..ba50728e89 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -195,7 +195,6 @@ LLLineEditor::~LLLineEditor() gFocusMgr.releaseFocusIfNeeded( this ); } - void LLLineEditor::onFocusReceived() { gEditMenuHandler = this; @@ -866,6 +865,13 @@ void LLLineEditor::addChar(const llwchar uni_char) LLUI::reportBadKeystroke(); } +// *TODO implement callback routine + if (!mReadOnly /*&& autocorrectCallbackRoutine != NULL */) + { + // call callback + // autotocorrectCallbackRoutine(mText&, mCursorPos&); + } + getWindow()->hideCursorUntilMouseMove(); } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 2518dbe3c7..9394700e8c 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -169,6 +169,10 @@ public: virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + // *TODO Make this work + typedef boost::function<void()> autocorrect_callback_t; + autocorrect_callback_t mAutocorrectCallback; + void setAutocorrectCallback(autocorrect_callback_t cb) { mAutocorrectCallback = cb; } void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } const std::string& getLabel() { return mLabel.getString(); } |