summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltexteditor.h')
-rw-r--r--indra/llui/lltexteditor.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 0b5acf19a1..869ff2a63c 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -34,6 +34,7 @@
#include "llstyle.h"
#include "lleditmenuhandler.h"
#include "llviewborder.h" // for params
+#include "llstring.h"
#include "lltextbase.h"
#include "lltextvalidate.h"
@@ -142,8 +143,10 @@ public:
virtual bool canDoDelete() const;
virtual void selectAll();
virtual bool canSelectAll() const;
+ virtual void deselect();
void selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos);
+ void setSelectAllOnFocusReceived(bool b);
virtual bool canLoadOrSaveToFile();
@@ -200,13 +203,13 @@ public:
const LLUUID& getSourceID() const { return mSourceID; }
const LLTextSegmentPtr getPreviousSegment() const;
- const LLTextSegmentPtr getLastSegment() const;
void getSelectedSegments(segment_vec_t& segments) const;
void setShowContextMenu(bool show) { mShowContextMenu = show; }
bool getShowContextMenu() const { return mShowContextMenu; }
void showEmojiHelper();
+ void hideEmojiHelper();
void setShowEmojiHelper(bool show);
bool getShowEmojiHelper() const { return mShowEmojiHelper; }
@@ -216,8 +219,6 @@ protected:
void showContextMenu(S32 x, S32 y);
void drawPreeditMarker();
- void assignEmbedded(const std::string &s);
-
void removeCharOrTab();
void indentSelectedLines( S32 spaces );
@@ -237,7 +238,6 @@ protected:
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; }
@@ -249,7 +249,9 @@ protected:
// Undoable operations
void addChar(llwchar c); // at mCursorPos
S32 addChar(S32 pos, llwchar wc);
+public:
void addLineBreakChar(bool group_together = false);
+protected:
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);
@@ -271,6 +273,8 @@ protected:
virtual bool getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const;
virtual S32 getPreeditFontSize() const;
virtual LLWString getPreeditString() const { return getWText(); }
+
+ virtual bool useFontBuffers() const { return getReadOnly(); }
//
// Protected data
//
@@ -302,9 +306,17 @@ private:
// Methods
//
void pasteHelper(bool is_primary);
- void cleanStringForPaste(LLWString & clean_string);
- void pasteTextWithLinebreaks(LLWString & clean_string);
+ void cleanStringForPaste(LLWString& clean_string);
+public:
+ template <typename STRINGTYPE>
+ void pasteTextWithLinebreaks(const STRINGTYPE& clean_string, bool reset_cursor = false)
+ {
+ pasteTextWithLinebreaksImpl(ll_convert(clean_string), reset_cursor);
+ }
+ void pasteTextWithLinebreaksImpl(const LLWString& clean_string, bool reset_cursor = false);
+
+private:
void onKeyStroke();
// Concrete TextCmd sub-classes used by the LLTextEditor base class
@@ -331,6 +343,8 @@ private:
bool mEnableTooltipPaste;
bool mPassDelete;
bool mKeepSelectionOnReturn; // disabling of removing selected text after pressing of Enter
+ bool mSelectAllOnFocusReceived;
+ bool mSelectedOnFocusReceived;
LLUUID mSourceID;