diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lltexteditor.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 3cff91d..3604cf6 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h | |||
@@ -245,9 +245,11 @@ public: | |||
245 | llwchar getWChar(S32 pos) const { return mWText[pos]; } | 245 | llwchar getWChar(S32 pos) const { return mWText[pos]; } |
246 | LLWString getWSubString(S32 pos, S32 len) const { return mWText.substr(pos, len); } | 246 | LLWString getWSubString(S32 pos, S32 len) const { return mWText.substr(pos, len); } |
247 | 247 | ||
248 | const LLTextSegment* getCurrentSegment() { return getSegmentAtOffset(mCursorPos); } | 248 | const LLTextSegment* getCurrentSegment() const { return getSegmentAtOffset(mCursorPos); } |
249 | const LLTextSegment* getPreviousSegment(); | 249 | const LLTextSegment* getPreviousSegment() const; |
250 | void getSelectedSegments(std::vector<const LLTextSegment*>& segments); | 250 | void getSelectedSegments(std::vector<const LLTextSegment*>& segments) const; |
251 | |||
252 | static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); } | ||
251 | 253 | ||
252 | protected: | 254 | protected: |
253 | // | 255 | // |
@@ -266,8 +268,6 @@ protected: | |||
266 | void assignEmbedded(const std::string &s); | 268 | void assignEmbedded(const std::string &s); |
267 | BOOL truncate(); // Returns true if truncation occurs | 269 | BOOL truncate(); // Returns true if truncation occurs |
268 | 270 | ||
269 | static BOOL isPartOfWord(llwchar c) { return (c == '_') || isalnum(c); } | ||
270 | |||
271 | void removeCharOrTab(); | 271 | void removeCharOrTab(); |
272 | void setCursorAtLocalPos(S32 x, S32 y, BOOL round); | 272 | void setCursorAtLocalPos(S32 x, S32 y, BOOL round); |
273 | S32 getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const; | 273 | S32 getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const; |
@@ -433,6 +433,14 @@ private: | |||
433 | void drawText(); | 433 | void drawText(); |
434 | void drawClippedSegment(const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyleSP& color, F32* right_x); | 434 | void drawClippedSegment(const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyleSP& color, F32* right_x); |
435 | 435 | ||
436 | void needsReflow() | ||
437 | { | ||
438 | mReflowNeeded = TRUE; | ||
439 | // cursor might have moved, need to scroll | ||
440 | mScrollNeeded = TRUE; | ||
441 | } | ||
442 | void needsScroll() { mScrollNeeded = TRUE; } | ||
443 | |||
436 | // | 444 | // |
437 | // Data | 445 | // Data |
438 | // | 446 | // |
@@ -489,6 +497,8 @@ private: | |||
489 | }; | 497 | }; |
490 | typedef std::vector<line_info> line_list_t; | 498 | typedef std::vector<line_info> line_list_t; |
491 | line_list_t mLineStartList; | 499 | line_list_t mLineStartList; |
500 | BOOL mReflowNeeded; | ||
501 | BOOL mScrollNeeded; | ||
492 | 502 | ||
493 | LLFrameTimer mKeystrokeTimer; | 503 | LLFrameTimer mKeystrokeTimer; |
494 | 504 | ||