diff options
Diffstat (limited to 'indra/llui/lltexteditor.h')
-rwxr-xr-x[-rw-r--r--] | indra/llui/lltexteditor.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 40821ae9fb..d3b7bc0eb7 100644..100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -64,7 +64,9 @@ public: ignore_tab, show_line_numbers, commit_on_focus_lost, - show_context_menu; + show_context_menu, + enable_tooltip_paste, + auto_indent; //colors Optional<LLUIColor> default_color; @@ -142,6 +144,8 @@ public: virtual void selectAll(); virtual BOOL canSelectAll() const; + void selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos); + virtual bool canLoadOrSaveToFile(); void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); @@ -156,6 +160,11 @@ public: BOOL isPristine() const; BOOL allowsEmbeddedItems() const { return mAllowEmbeddedItems; } + // Autoreplace (formerly part of LLLineEditor) + typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t; + autoreplace_callback_t mAutoreplaceCallback; + void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } + // // Text manipulation // @@ -202,6 +211,8 @@ public: void setShowContextMenu(bool show) { mShowContextMenu = show; } bool getShowContextMenu() const { return mShowContextMenu; } + void setPassDelete(BOOL b) { mPassDelete = b; } + protected: void showContextMenu(S32 x, S32 y); void drawPreeditMarker(); @@ -214,8 +225,8 @@ protected: S32 indentLine( S32 pos, S32 spaces ); void unindentLineBeforeCloseBrace(); + virtual BOOL handleSpecialKey(const KEY key, const MASK mask); BOOL handleNavigationKey(const KEY key, const MASK mask); - BOOL handleSpecialKey(const KEY key, const MASK mask); BOOL handleSelectionKey(const KEY key, const MASK mask); BOOL handleControlKey(const KEY key, const MASK mask); @@ -239,13 +250,14 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addLineBreakChar(); + void addLineBreakChar(BOOL group_together = FALSE); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); 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; @@ -279,6 +291,7 @@ protected: LLUIColor mDefaultColor; BOOL mShowLineNumbers; + bool mAutoIndent; /*virtual*/ void updateSegments(); void updateLinkSegments(); @@ -288,6 +301,8 @@ private: // Methods // void pasteHelper(bool is_primary); + void cleanStringForPaste(LLWString & clean_string); + void pasteTextWithLinebreaks(LLWString & clean_string); void drawLineNumbers(); @@ -321,6 +336,8 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; bool mParseOnTheFly; + bool mEnableTooltipPaste; + bool mPassDelete; LLUUID mSourceID; |