From aaa8cb5a37a720ff67792d0a31fec793b03b3742 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 29 Jan 2024 17:42:38 +0800 Subject: First attempt to fix unicode input It should work well enough with most, but on Japanese (I assume all CJK), for now the composition part is still left printed out along with the result (as opposed to just replaced by the result). It's to be fixed next. --- indra/llui/lltexteditor.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/lltexteditor.h') diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index f3939248c2..513781e365 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -101,6 +101,7 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask ); virtual BOOL handleUnicodeCharHere(llwchar uni_char); + virtual BOOL handleUnicodeStringHere(char *uni_str); virtual void onMouseCaptureLost(); @@ -241,6 +242,8 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); + void addString(char *s); + S32 addString(S32 pos, char *str); void addLineBreakChar(BOOL group_together = FALSE); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); @@ -301,6 +304,7 @@ private: // Concrete TextCmd sub-classes used by the LLTextEditor base class class TextCmdInsert; class TextCmdAddChar; + class TextCmdAddString; class TextCmdOverwriteChar; class TextCmdRemove; -- cgit v1.3