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