summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltexteditor.h')
-rwxr-xr-xindra/llui/lltexteditor.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index d3b7bc0eb7..d7f6c7f643 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -1,25 +1,25 @@
-/**
+/**
* @file lltexteditor.h
* @brief LLTextEditor base class
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -133,7 +133,7 @@ public:
virtual BOOL canCopy() const;
virtual void paste();
virtual BOOL canPaste() const;
-
+
virtual void updatePrimary();
virtual void copyPrimary();
virtual void pastePrimary();
@@ -151,7 +151,7 @@ public:
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE);
void replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive);
-
+
// Undo/redo stack
void blockUndo();
@@ -188,13 +188,14 @@ public:
void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap );
- void loadKeywords(const std::string& filename,
- const std::vector<std::string>& funcs,
- const std::vector<std::string>& tooltips,
- const LLColor3& func_color);
+ LLKeywords mKeywords;
+ void loadKeywords();
LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); }
LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); }
+ void loadKeywords(const std::string& filename_keywords,
+ const std::string& filename_colors);
+
// Hacky methods to make it into a word-wrapping, potentially scrolling,
// read-only text box.
void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; }
@@ -218,7 +219,7 @@ protected:
void drawPreeditMarker();
void assignEmbedded(const std::string &s);
-
+
void removeCharOrTab();
void indentSelectedLines( S32 spaces );
@@ -237,12 +238,12 @@ protected:
S32 nextWordPos(S32 cursorPos) const;
void autoIndent();
-
+
void findEmbeddedItemSegments(S32 start, S32 end);
void getSegmentsInRange(segment_vec_t& segments, S32 start, S32 end, bool include_partial) const;
virtual llwchar pasteEmbeddedItem(llwchar ext_char) { return ext_char; }
-
+
// Here's the method that takes and applies text commands.
S32 execute(TextCmd* cmd);
@@ -256,7 +257,7 @@ protected:
S32 removeChar(S32 pos);
S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment);
S32 remove(S32 pos, S32 length, bool group_with_next_op);
-
+
void focusLostHelper();
void updateAllowingLanguageInput();
BOOL hasPreeditString() const;
@@ -274,14 +275,14 @@ protected:
//
// Protected data
//
- // Probably deserves serious thought to hiding as many of these
+ // Probably deserves serious thought to hiding as many of these
// as possible behind protected accessor methods.
//
// Use these to determine if a click on an embedded item is a drag or not.
S32 mMouseDownX;
S32 mMouseDownY;
-
+
LLWString mPreeditWString;
LLWString mPreeditOverwrittenWString;
std::vector<S32> mPreeditPositions;
@@ -308,11 +309,6 @@ private:
void onKeyStroke();
- //
- // Data
- //
- LLKeywords mKeywords;
-
// Concrete TextCmd sub-classes used by the LLTextEditor base class
class TextCmdInsert;
class TextCmdAddChar;