LLTextEditor Class Reference

#include <lltexteditor.h>

Inheritance diagram for LLTextEditor:

Inheritance graph
[legend]
Collaboration diagram for LLTextEditor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLTextEditor (const LLString &name, const LLRect &rect, S32 max_length, const LLString &default_text, const LLFontGL *glfont=NULL, BOOL allow_embedded_items=FALSE)
virtual ~LLTextEditor ()
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
virtual LLXMLNodePtr getXML (bool save_children=true) const
void setTextEditorParameters (LLXMLNodePtr node)
void setParseHTML (BOOL parsing)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleScrollWheel (S32 x, S32 y, S32 clicks)
virtual BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
virtual BOOL handleKeyHere (KEY key, MASK mask, BOOL called_from_parent)
virtual BOOL handleUnicodeCharHere (llwchar uni_char, BOOL called_from_parent)
virtual BOOL handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect)
virtual BOOL handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString &tooltip_msg)
virtual void onMouseCaptureLost ()
virtual void reshape (S32 width, S32 height, BOOL called_from_parent)
virtual void draw ()
virtual void onFocusLost ()
virtual void setEnabled (BOOL enabled)
virtual void onTabInto ()
virtual void clear ()
virtual void setFocus (BOOL b)
virtual BOOL acceptsTextInput () const
virtual BOOL isDirty () const
virtual void undo ()
virtual BOOL canUndo ()
virtual void redo ()
virtual BOOL canRedo ()
virtual void cut ()
virtual BOOL canCut ()
virtual void copy ()
virtual BOOL canCopy ()
virtual void paste ()
virtual BOOL canPaste ()
virtual void doDelete ()
virtual BOOL canDoDelete ()
virtual void selectAll ()
virtual BOOL canSelectAll ()
virtual void deselect ()
virtual BOOL canDeselect ()
void selectNext (const LLString &search_text_in, BOOL case_insensitive, BOOL wrap=TRUE)
BOOL replaceText (const LLString &search_text, const LLString &replace_text, BOOL case_insensitive, BOOL wrap=TRUE)
void replaceTextAll (const LLString &search_text, const LLString &replace_text, BOOL case_insensitive)
void blockUndo ()
virtual void makePristine ()
BOOL isPristine () const
void insertText (const LLString &text)
void appendText (const LLString &wtext, bool allow_undo, bool prepend_newline, const LLStyle *segment_style=NULL)
void appendColoredText (const LLString &wtext, bool allow_undo, bool prepend_newline, const LLColor4 &color, const LLString &font_name=LLString::null)
void appendStyledText (const LLString &new_text, bool allow_undo, bool prepend_newline, const LLStyle *style)
void removeTextFromEnd (S32 num_chars)
BOOL tryToRevertToPristineState ()
void setCursor (S32 row, S32 column)
void setCursorPos (S32 offset)
void setCursorAndScrollToEnd ()
void getCurrentLineAndColumn (S32 *line, S32 *col, BOOL include_wordwrap)
void loadKeywords (const LLString &filename, const LLDynamicArray< const char * > &funcs, const LLDynamicArray< const char * > &tooltips, const LLColor3 &func_color)
void setCursorColor (const LLColor4 &c)
void setFgColor (const LLColor4 &c)
void setReadOnlyFgColor (const LLColor4 &c)
void setWriteableBgColor (const LLColor4 &c)
void setReadOnlyBgColor (const LLColor4 &c)
void setTrackColor (const LLColor4 &color)
void setThumbColor (const LLColor4 &color)
void setHighlightColor (const LLColor4 &color)
void setShadowColor (const LLColor4 &color)
void setBorderVisible (BOOL b)
void setTakesNonScrollClicks (BOOL b)
void setHideScrollbarForShortDocs (BOOL b)
void setWordWrap (BOOL b)
void setTabToNextField (BOOL b)
void setCommitOnFocusLost (BOOL b)
void setTakesFocus (BOOL b)
virtual BOOL importBuffer (const LLString &buffer)
virtual BOOL exportBuffer (LLString &buffer)
void setSourceID (const LLUUID &id)
void setAcceptCallingCardNames (BOOL enable)
void setHandleEditKeysDirectly (BOOL b)
void setOnScrollEndCallback (void(*callback)(void *), void *userdata)
void setValue (const LLSD &value)
LLSD getValue () const
const LLStringgetText () const
void setText (const LLStringExplicit &utf8str)
void setWText (const LLWString &wtext)
S32 getMaxLength () const
void startOfLine ()
void endOfLine ()
void endOfDoc ()
const LLWStringgetWText () const
llwchar getWChar (S32 pos)
LLWString getWSubString (S32 pos, S32 len)
LLTextSegmentgetCurrentSegment ()
LLTextSegmentgetPreviousSegment ()
void getSelectedSegments (std::vector< LLTextSegment * > &segments)

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
static void setLinkColor (LLColor4 color)
static void setURLCallbacks (void(*callback1)(const char *url), bool(*callback2)(const std::string &url), bool(*callback3)(const std::string &url))

Public Attributes

LLKeywords mKeywords

Static Public Attributes

static LLColor4 mLinkColor = LLColor4::blue
static void(* mURLcallback )(const char *url) = NULL
static bool(* mSecondlifeURLcallback )(const std::string &url) = NULL
static bool(* mSecondlifeURLcallbackRightClick )(const std::string &url) = NULL

Protected Types

typedef std::deque< LLTextCmd * > undo_stack_t
typedef std::vector< line_infoline_list_t
typedef std::vector< LLTextSegment * > segment_list_t

Protected Member Functions

S32 getLength () const
void getSegmentAndOffset (S32 startpos, S32 *segidxp, S32 *offsetp)
void drawBackground ()
void drawSelectionBackground ()
void drawCursor ()
void drawText ()
void drawClippedSegment (const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyle &color, F32 *right_x)
void updateLineStartList (S32 startpos=0)
void updateScrollFromCursor ()
void updateTextRect ()
void updateSegments ()
void pruneSegments ()
void assignEmbedded (const LLString &s)
void truncate ()
void removeCharOrTab ()
void setCursorAtLocalPos (S32 x, S32 y, BOOL round)
S32 getCursorPosFromLocalCoord (S32 local_x, S32 local_y, BOOL round)
void indentSelectedLines (S32 spaces)
S32 indentLine (S32 pos, S32 spaces)
void unindentLineBeforeCloseBrace ()
S32 getSegmentIdxAtOffset (S32 offset)
LLTextSegmentgetSegmentAtLocalPos (S32 x, S32 y)
LLTextSegmentgetSegmentAtOffset (S32 offset)
void reportBadKeystroke ()
BOOL handleNavigationKey (const KEY key, const MASK mask)
BOOL handleSpecialKey (const KEY key, const MASK mask, BOOL *return_key_hit)
BOOL handleSelectionKey (const KEY key, const MASK mask)
BOOL handleControlKey (const KEY key, const MASK mask)
BOOL handleEditKey (const KEY key, const MASK mask)
BOOL hasSelection ()
BOOL selectionContainsLineBreaks ()
void startSelection ()
void endSelection ()
void deleteSelection (BOOL transient_operation)
S32 prevWordPos (S32 cursorPos) const
S32 nextWordPos (S32 cursorPos) const
S32 getLineCount ()
S32 getLineStart (S32 line)
void getLineAndOffset (S32 pos, S32 *linep, S32 *offsetp)
S32 getPos (S32 line, S32 offset)
void changePage (S32 delta)
void changeLine (S32 delta)
void autoIndent ()
S32 execute (LLTextCmd *cmd)
void findEmbeddedItemSegments ()
virtual BOOL handleMouseUpOverSegment (S32 x, S32 y, MASK mask)
virtual llwchar pasteEmbeddedItem (llwchar ext_char)
virtual void bindEmbeddedChars (const LLFontGL *font)
virtual void unbindEmbeddedChars (const LLFontGL *font)
S32 findHTMLToken (const LLString &line, S32 pos, BOOL reverse)
BOOL findHTML (const LLString &line, S32 *begin, S32 *end)
void addChar (llwchar c)
S32 addChar (S32 pos, llwchar wc)
S32 overwriteChar (S32 pos, llwchar wc)
void removeChar ()
S32 removeChar (S32 pos)
S32 insert (const S32 pos, const LLWString &wstr, const BOOL group_with_next_op)
S32 remove (const S32 pos, const S32 length, const BOOL group_with_next_op)
S32 append (const LLWString &wstr, const BOOL group_with_next_op)
S32 insertStringNoUndo (S32 pos, const LLWString &wstr)
S32 removeStringNoUndo (S32 pos, S32 length)
S32 overwriteCharNoUndo (S32 pos, llwchar wc)

Static Protected Member Functions

static BOOL isPartOfWord (llwchar c)

Protected Attributes

LLWString mWText
LLString mUTF8Text
BOOL mTextIsUpToDate
S32 mMaxTextLength
const LLFontGLmGLFont
LLScrollbarmScrollbar
LLViewBordermBorder
BOOL mBaseDocIsPristine
LLTextCmdmPristineCmd
LLTextCmdmLastCmd
undo_stack_t mUndoStack
S32 mCursorPos
S32 mDesiredXPixel
LLRect mTextRect
line_list_t mLineStartList
BOOL mIsSelecting
S32 mSelectionStart
S32 mSelectionEnd
void(* mOnScrollEndCallback )(void *)
voidmOnScrollEndData
segment_list_t mSegments
LLTextSegmentmHoverSegment
LLFrameTimer mKeystrokeTimer
LLColor4 mCursorColor
LLColor4 mFgColor
LLColor4 mReadOnlyFgColor
LLColor4 mWriteableBgColor
LLColor4 mReadOnlyBgColor
LLColor4 mFocusBgColor
BOOL mReadOnly
BOOL mWordWrap
BOOL mTabToNextField
BOOL mCommitOnFocusLost
BOOL mTakesFocus
BOOL mHideScrollbarForShortDocs
BOOL mTakesNonScrollClicks
BOOL mAllowEmbeddedItems
BOOL mAcceptCallingCardNames
LLUUID mSourceID
BOOL mHandleEditKeysDirectly
S32 mMouseDownX
S32 mMouseDownY
S32 mLastSelectionX
S32 mLastSelectionY
BOOL mParseHTML
LLString mHTML
LLCoordGL mLastIMEPosition

Friends

class LLTextCmd

Classes

struct  line_info
struct  line_info_compare

Detailed Description

Definition at line 67 of file lltexteditor.h.


Member Typedef Documentation

typedef std::vector<line_info> LLTextEditor::line_list_t [protected]

Definition at line 389 of file lltexteditor.h.

typedef std::vector<LLTextSegment *> LLTextEditor::segment_list_t [protected]

Definition at line 402 of file lltexteditor.h.

typedef std::deque<LLTextCmd*> LLTextEditor::undo_stack_t [protected]

Definition at line 364 of file lltexteditor.h.


Constructor & Destructor Documentation

LLTextEditor::LLTextEditor ( const LLString name,
const LLRect rect,
S32  max_length,
const LLString default_text,
const LLFontGL glfont = NULL,
BOOL  allow_embedded_items = FALSE 
)

Definition at line 274 of file lltexteditor.cpp.

References LLView::addChild(), appendText(), LLViewBorder::BEVEL_IN, FALSE, LLUUID::generate(), LLRectBase< Type >::getHeight(), getLineCount(), LLFontGL::getLineHeight(), LLRectBase< Type >::getWidth(), llround(), mBorder, mDesiredXPixel, mGLFont, mHTML, mOnScrollEndCallback, mOnScrollEndData, mParseHTML, LLView::mRect, mScrollbar, mSourceID, mTextRect, NULL, LLUICtrl::resetDirty(), S32, SCROLLBAR_SIZE, LLView::setEnabled(), LLView::setFollowsBottom(), LLView::setFollowsRight(), LLView::setFollowsTop(), LLScrollbar::setOnScrollEndCallback(), LLRectBase< Type >::setOriginAndSize(), LLView::setVisible(), LLFontGL::sSansSerif, LLViewBorder::STYLE_LINE, TRUE, UI_TEXTEDITOR_BORDER, updateTextRect(), and LLScrollbar::VERTICAL.

Referenced by fromXML().

LLTextEditor::~LLTextEditor (  )  [virtual]

Definition at line 369 of file lltexteditor.cpp.

References gEditMenuHandler, gFocusMgr, mHoverSegment, mSegments, mUndoStack, NULL, and LLFocusMgr::releaseFocusIfNeeded().


Member Function Documentation

BOOL LLTextEditor::acceptsTextInput (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 3110 of file lltexteditor.cpp.

References mReadOnly.

S32 LLTextEditor::addChar ( S32  pos,
llwchar  wc 
) [protected]

Definition at line 1606 of file lltexteditor.cpp.

References LLTextCmd::canExtend(), execute(), LLTextCmd::extendAndExecute(), FALSE, make_ui_sound(), mLastCmd, mMaxTextLength, mWText, and S32.

void LLTextEditor::addChar ( llwchar  c  )  [protected]

Definition at line 1626 of file lltexteditor.cpp.

References deleteSelection(), LLView::getEnabled(), LLKeyboard::getInsertMode(), gKeyboard, hasSelection(), LL_KIM_OVERWRITE, mCursorPos, removeChar(), setCursorPos(), and TRUE.

Referenced by autoIndent(), handleSpecialKey(), handleUnicodeCharHere(), indentLine(), and overwriteChar().

S32 LLTextEditor::append ( const LLWString wstr,
const BOOL  group_with_next_op 
) [protected]

Definition at line 1516 of file lltexteditor.cpp.

References insert(), and mWText.

Referenced by appendText().

void LLTextEditor::appendColoredText ( const LLString wtext,
bool  allow_undo,
bool  prepend_newline,
const LLColor4 color,
const LLString font_name = LLString::null 
)

Definition at line 3399 of file lltexteditor.cpp.

References appendStyledText(), font_name, LLStyle::setColor(), LLStyle::setFontName(), and LLStyle::setVisible().

Referenced by add_timestamped_line(), LLFloaterIMPanel::addHistoryLine(), LLFloaterScriptDebugOutput::addLine(), LLViewerTextEditor::appendTime(), and LLGroupNotifyBox::LLGroupNotifyBox().

void LLTextEditor::appendStyledText ( const LLString new_text,
bool  allow_undo,
bool  prepend_newline,
const LLStyle style 
)

Definition at line 3412 of file lltexteditor.cpp.

References appendText(), end, findHTML(), LLStyle::getFontString(), mLinkColor, mParseHTML, LLStyle::mUnderline, S32, LLStyle::setColor(), LLStyle::setFontName(), LLStyle::setLinkHREF(), LLStyle::setVisible(), start, and TRUE.

Referenced by appendColoredText(), LLViewerTextEditor::fromXML(), and LLGroupNotifyBox::LLGroupNotifyBox().

void LLTextEditor::appendText ( const LLString wtext,
bool  allow_undo,
bool  prepend_newline,
const LLStyle segment_style = NULL 
)

Definition at line 3455 of file lltexteditor.cpp.

References append(), blockUndo(), deselect(), endOfDoc(), LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), getLength(), mCursorPos, mIsSelecting, mScrollbar, mSegments, mSelectionEnd, mSelectionStart, S32, setCursorPos(), TRUE, updateLineStartList(), and utf8str_to_wstring().

Referenced by appendStyledText(), LLViewerTextEditor::handleDragAndDrop(), and LLTextEditor().

void LLTextEditor::assignEmbedded ( const LLString s  )  [protected]

void LLTextEditor::autoIndent (  )  [protected]

Definition at line 3348 of file lltexteditor.cpp.

References addChar(), getLineAndOffset(), getLineStart(), i, mCursorPos, mWText, S32, and SPACES_PER_TAB.

Referenced by handleSpecialKey().

void LLTextEditor::bindEmbeddedChars ( const LLFontGL font  )  [protected, virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3834 of file lltexteditor.cpp.

Referenced by changeLine(), draw(), getCursorPosFromLocalCoord(), and updateLineStartList().

void LLTextEditor::blockUndo (  ) 

Definition at line 2410 of file lltexteditor.cpp.

References FALSE, mBaseDocIsPristine, mLastCmd, mUndoStack, and NULL.

Referenced by appendText(), setText(), and setWText().

BOOL LLTextEditor::canCopy (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1909 of file lltexteditor.cpp.

References hasSelection().

Referenced by copy(), and handleEditKey().

BOOL LLTextEditor::canCut (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1889 of file lltexteditor.cpp.

References hasSelection(), and mReadOnly.

Referenced by cut(), and handleEditKey().

BOOL LLTextEditor::canDeselect (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 939 of file lltexteditor.cpp.

References hasSelection().

BOOL LLTextEditor::canDoDelete (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2354 of file lltexteditor.cpp.

References getLength(), hasSelection(), mCursorPos, and mReadOnly.

Referenced by doDelete(), and handleEditKey().

BOOL LLTextEditor::canPaste (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1926 of file lltexteditor.cpp.

References LLClipboard::canPasteString(), gClipboard, and mReadOnly.

Referenced by handleEditKey(), and paste().

BOOL LLTextEditor::canRedo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2451 of file lltexteditor.cpp.

References mLastCmd, mReadOnly, and mUndoStack.

Referenced by redo(), and tryToRevertToPristineState().

BOOL LLTextEditor::canSelectAll (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1107 of file lltexteditor.cpp.

References TRUE.

Referenced by handleSelectionKey().

BOOL LLTextEditor::canUndo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2419 of file lltexteditor.cpp.

References mLastCmd, mReadOnly, and NULL.

Referenced by tryToRevertToPristineState(), and undo().

void LLTextEditor::changeLine ( S32  delta  )  [protected]

Definition at line 3162 of file lltexteditor.cpp.

References bindEmbeddedChars(), LLFontGL::charFromPixelOffset(), getLength(), getLineAndOffset(), getLineCount(), getLineStart(), getPos(), LLRectBase< Type >::getWidth(), LLFontGL::getWidth(), mAllowEmbeddedItems, mCursorPos, mDesiredXPixel, mGLFont, mTextRect, mWText, S32, setCursorPos(), and unbindEmbeddedChars().

Referenced by handleNavigationKey(), and handleSelectionKey().

void LLTextEditor::changePage ( S32  delta  )  [protected]

Definition at line 3130 of file lltexteditor.cpp.

References LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), getLineAndOffset(), LLScrollbar::getPageSize(), getPos(), llmax(), mCursorPos, mDesiredXPixel, mOnScrollEndCallback, mOnScrollEndData, mScrollbar, S32, setCursorPos(), and LLScrollbar::setDocPos().

Referenced by handleNavigationKey(), and handleSelectionKey().

void LLTextEditor::clear (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 3062 of file lltexteditor.cpp.

References LLStringBase< char >::null, and setText().

Referenced by LLPanelGroupActionsSubTab::activate(), LLPanelGroupRolesSubTab::activate(), LLPanelGroupActionsSubTab::handleActionSelect(), LLPanelGroupRolesSubTab::handleRoleSelect(), LLPanelGroupActionsSubTab::update(), and LLPanelGroupRolesSubTab::update().

void LLTextEditor::copy (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1916 of file lltexteditor.cpp.

References canCopy(), LLClipboard::copyFromSubstring(), gClipboard, llmin(), mSelectionEnd, mSelectionStart, mSourceID, mWText, and S32.

Referenced by handleEditKey().

void LLTextEditor::cut (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1895 of file lltexteditor.cpp.

References canCut(), LLClipboard::copyFromSubstring(), deleteSelection(), FALSE, gClipboard, llmin(), mSelectionEnd, mSelectionStart, mSourceID, mWText, S32, updateLineStartList(), and updateScrollFromCursor().

Referenced by handleEditKey().

void LLTextEditor::deleteSelection ( BOOL  transient_operation  )  [protected]

Definition at line 1875 of file lltexteditor.cpp.

References deselect(), LLView::getEnabled(), hasSelection(), llmin(), mSelectionEnd, mSelectionStart, remove(), S32, and setCursorPos().

Referenced by addChar(), cut(), doDelete(), handleSpecialKey(), insertText(), and paste().

void LLTextEditor::deselect (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 945 of file lltexteditor.cpp.

References FALSE, mIsSelecting, mSelectionEnd, and mSelectionStart.

Referenced by appendText(), deleteSelection(), handleControlKey(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleDragAndDrop(), handleKeyHere(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), handleUnicodeCharHere(), importBuffer(), paste(), redo(), setCursorAndScrollToEnd(), setText(), setWordWrap(), setWText(), tryToRevertToPristineState(), and undo().

void LLTextEditor::doDelete (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2359 of file lltexteditor.cpp.

References canDoDelete(), deleteSelection(), FALSE, getLength(), getLineAndOffset(), hasSelection(), i, mCursorPos, mWText, removeChar(), S32, setCursorPos(), SPACES_PER_TAB, updateLineStartList(), and updateScrollFromCursor().

Referenced by handleEditKey().

void LLTextEditor::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 3023 of file lltexteditor.cpp.

References bindEmbeddedChars(), LLView::draw(), drawBackground(), drawCursor(), drawSelectionBackground(), drawText(), LLRectBase< Type >::getHeight(), LLFocusMgr::getKeyboardFocus(), LLView::getVisible(), LLRectBase< Type >::getWidth(), gFocusMgr, mBorder, mGLFont, LLView::mRect, mScrollbar, SCROLLBAR_SIZE, LLViewBorder::setKeyboardFocusHighlight(), and unbindEmbeddedChars().

void LLTextEditor::drawBackground (  )  [protected]

Definition at line 2528 of file lltexteditor.cpp.

References bottom, LLView::draw(), LLRectBase< Type >::getHeight(), LLFocusMgr::getKeyboardFocus(), LLRectBase< Type >::getWidth(), gFocusMgr, gl_rect_2d(), left, mFocusBgColor, mReadOnly, mReadOnlyBgColor, LLView::mRect, mWriteableBgColor, right, S32, and top.

Referenced by draw().

void LLTextEditor::drawClippedSegment ( const LLWString wtext,
S32  seg_start,
S32  seg_end,
F32  x,
F32  y,
S32  selection_left,
S32  selection_right,
const LLStyle color,
F32 right_x 
) [protected]

Definition at line 2943 of file lltexteditor.cpp.

References LLFontGL::BOLD, end, f, LLControlGroup::getColor(), LLStyle::getColor(), LLStyle::getFontID(), LLStyle::getFontString(), LLStyle::getIsEmbeddedItem(), LLFontGL::getLineHeight(), LLResMgr::getRes(), gResMgr, LLStyle::isVisible(), LLFontGL::ITALIC, LLFontGL::LEFT, llmax(), llmin(), llround(), mAllowEmbeddedItems, LLStyle::mBold, mGLFont, LLStyle::mItalic, mReadOnly, LLStyle::mUnderline, LLColor4::mV, LLFontGL::NORMAL, LLFontGL::render(), S32, S32_MAX, LLUI::sColorsGroup, start, LLFontGL::TOP, and LLFontGL::UNDERLINE.

Referenced by drawText().

void LLTextEditor::drawCursor (  )  [protected]

Definition at line 2704 of file lltexteditor.cpp.

References CURSOR_FLASH_DELAY, CURSOR_THICKNESS, f, FALSE, LLScrollbar::getDocPos(), LLFrameTimer::getElapsedTimeF32(), LLKeyboard::getInsertMode(), LLFocusMgr::getKeyboardFocus(), getLength(), getLineCount(), LLFontGL::getLineHeight(), getLineStart(), LLView::getScreenRect(), getSegmentAtOffset(), LLFontGL::getWidthF32(), LLView::getWindow(), gFocusMgr, gKeyboard, gl_rect_2d(), glColor4fv, gShowTextEditCursor, hasSelection(), LLFontGL::LEFT, LL_KIM_OVERWRITE, llfloor(), llmax(), llround(), mAllowEmbeddedItems, LLRectBase< Type >::mBottom, mCursorColor, mCursorPos, mFgColor, mGLFont, mKeystrokeTimer, mLastIMEPosition, LLRectBase< Type >::mLeft, mReadOnly, mReadOnlyFgColor, mScrollbar, mTextRect, LLRectBase< Type >::mTop, LLVector2::mV, LLColor4::mV, mWText, LLCoord::mX, LLCoord::mY, LLFontGL::NORMAL, LLFontGL::render(), S32, LLWindow::setLanguageTextInput(), LLUI::sGLScaleFactor, texture, LLFontGL::TOP, TRUE, utf8str_to_wstring(), VBLUE, VGREEN, VRED, VX, VY, and width.

Referenced by draw().

void LLTextEditor::drawSelectionBackground (  )  [protected]

Definition at line 2554 of file lltexteditor.cpp.

References CURSOR_THICKNESS, f, FALSE, LLScrollbar::getDocPos(), getLength(), getLineCount(), LLFontGL::getLineHeight(), getLineStart(), LLFontGL::getWidth(), gl_rect_2d(), glColor4f, LLUICtrl::hasFocus(), hasSelection(), llmax(), llmin(), llround(), mAllowEmbeddedItems, LLRectBase< Type >::mBottom, mGLFont, LLRectBase< Type >::mLeft, mReadOnly, mReadOnlyBgColor, LLRectBase< Type >::mRight, mScrollbar, mSelectionEnd, mSelectionStart, mTextRect, LLRectBase< Type >::mTop, LLColor4::mV, mWriteableBgColor, mWText, S32, TRUE, and utf8str_to_wstring().

Referenced by draw().

void LLTextEditor::drawText (  )  [protected]

Definition at line 2835 of file lltexteditor.cpp.

References drawClippedSegment(), LLScrollbar::getDocPos(), LLTextSegment::getEnd(), LLStyle::getImage(), LLStyle::getIsEmbeddedItem(), getLength(), getLineCount(), LLFontGL::getLineHeight(), getLineStart(), LLStyle::getLinkHREF(), LLTextSegment::getStart(), LLTextSegment::getStyle(), gl_draw_scaled_image(), hasSelection(), LLStyle::isImage(), llendl, llmax(), llmin(), llround(), llwarns, LLRectBase< Type >::mBottom, mGLFont, mHoverSegment, mHTML, LLStyle::mImageHeight, LLStyle::mImageWidth, mIsSelecting, LLRectBase< Type >::mLeft, mParseHTML, mScrollbar, mSegments, mSelectionEnd, mSelectionStart, mTextRect, LLRectBase< Type >::mTop, LLStyle::mUnderline, mWText, S32, t, TRUE, and LLColor4::white.

Referenced by draw().

void LLTextEditor::endOfDoc (  ) 

Definition at line 3277 of file lltexteditor.cpp.

References LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), getLength(), mOnScrollEndCallback, mOnScrollEndData, mScrollbar, S32, setCursorPos(), and LLScrollbar::setDocPos().

Referenced by appendText(), handleControlKey(), and setCursorAndScrollToEnd().

void LLTextEditor::endOfLine (  ) 

Definition at line 3262 of file lltexteditor.cpp.

References getLength(), getLineAndOffset(), getLineCount(), getLineStart(), mCursorPos, S32, and setCursorPos().

Referenced by handleNavigationKey(), and handleSelectionKey().

void LLTextEditor::endSelection (  )  [protected]

Definition at line 963 of file lltexteditor.cpp.

References FALSE, mCursorPos, mIsSelecting, and mSelectionEnd.

Referenced by LLViewerTextEditor::handleMouseUp(), handleMouseUp(), onMouseCaptureLost(), and setFocus().

S32 LLTextEditor::execute ( LLTextCmd cmd  )  [protected]

Definition at line 1480 of file lltexteditor.cpp.

References LLTextCmd::execute(), mLastCmd, mUndoStack, and S32.

Referenced by addChar(), insert(), LLViewerTextEditor::insertEmbeddedItem(), overwriteChar(), and remove().

BOOL LLTextEditor::exportBuffer ( LLString buffer  )  [virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3975 of file lltexteditor.cpp.

References getText(), llformat(), mWText, and TRUE.

void LLTextEditor::findEmbeddedItemSegments (  )  [protected]

Definition at line 3747 of file lltexteditor.cpp.

References FALSE, FIRST_EMBEDDED_CHAR, LAST_EMBEDDED_CHAR, mFgColor, mHoverSegment, mReadOnly, mReadOnlyFgColor, mSegments, mWText, NULL, S32, LLStyle::setIsEmbeddedItem(), and TRUE.

Referenced by updateSegments().

BOOL LLTextEditor::findHTML ( const LLString line,
S32 begin,
S32 end 
) [protected]

Definition at line 4188 of file lltexteditor.cpp.

References FALSE, findHTMLToken(), S32, and TRUE.

Referenced by appendStyledText().

S32 LLTextEditor::findHTMLToken ( const LLString line,
S32  pos,
BOOL  reverse 
) [protected]

Definition at line 4151 of file lltexteditor.cpp.

References S32.

Referenced by findHTML().

LLView * LLTextEditor::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Reimplemented in LLViewerTextEditor.

Definition at line 4085 of file lltexteditor.cpp.

References LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLTextEditor(), LLView::selectFont(), setHideScrollbarForShortDocs(), and setTextEditorParameters().

void LLTextEditor::getCurrentLineAndColumn ( S32 line,
S32 col,
BOOL  include_wordwrap 
)

Definition at line 3236 of file lltexteditor.cpp.

References getLineAndOffset(), i, mCursorPos, mWText, and S32.

Referenced by LLScriptEdCore::draw().

LLTextSegment * LLTextEditor::getCurrentSegment (  ) 

Definition at line 833 of file lltexteditor.cpp.

References getSegmentAtOffset(), and mCursorPos.

S32 LLTextEditor::getCursorPosFromLocalCoord ( S32  local_x,
S32  local_y,
BOOL  round 
) [protected]

Definition at line 858 of file lltexteditor.cpp.

References bindEmbeddedChars(), LLFontGL::charFromPixelOffset(), LLScrollbar::getDocPos(), LLRectBase< Type >::getHeight(), getLength(), getLineCount(), LLFontGL::getLineHeight(), getLineStart(), LLRectBase< Type >::getWidth(), llclamp(), llmin(), llround(), mAllowEmbeddedItems, mGLFont, LLRectBase< Type >::mLeft, mScrollbar, mTextRect, LLRectBase< Type >::mTop, mWText, S32, TRUE, and unbindEmbeddedChars().

Referenced by getSegmentAtLocalPos(), and setCursorAtLocalPos().

S32 LLTextEditor::getLength (  )  const [protected]

Definition at line 818 of file lltexteditor.cpp.

References mWText.

Referenced by appendText(), canDoDelete(), changeLine(), doDelete(), drawCursor(), drawSelectionBackground(), drawText(), endOfDoc(), endOfLine(), getCursorPosFromLocalCoord(), LLViewerTextEditor::getEmbeddedItemToolTipAtPos(), getPos(), getSegmentIdxAtOffset(), handleControlKey(), LLViewerTextEditor::handleMouseDown(), handleNavigationKey(), handleSelectionKey(), indentLine(), indentSelectedLines(), loadKeywords(), nextWordPos(), LLViewerTextEditor::openEmbeddedItemAtPos(), removeTextFromEnd(), selectAll(), selectNext(), and setCursorPos().

void LLTextEditor::getLineAndOffset ( S32  pos,
S32 linep,
S32 offsetp 
) [protected]

Definition at line 776 of file lltexteditor.cpp.

References getSegmentAndOffset(), mLineStartList, mSegments, and S32.

Referenced by autoIndent(), changeLine(), changePage(), doDelete(), endOfLine(), getCurrentLineAndColumn(), handleSpecialKey(), removeCharOrTab(), startOfLine(), and updateScrollFromCursor().

S32 LLTextEditor::getLineCount (  )  [protected]

Definition at line 754 of file lltexteditor.cpp.

References mLineStartList.

Referenced by changeLine(), drawCursor(), drawSelectionBackground(), drawText(), endOfLine(), getCursorPosFromLocalCoord(), getLineStart(), LLTextEditor(), updateLineStartList(), and updateScrollFromCursor().

S32 LLTextEditor::getLineStart ( S32  line  )  [protected]

Definition at line 759 of file lltexteditor.cpp.

References LLTextSegment::getEnd(), getLineCount(), LLTextSegment::getStart(), llclamp(), llendl, llerrs, mLineStartList, mSegments, and S32.

Referenced by autoIndent(), changeLine(), drawCursor(), drawSelectionBackground(), drawText(), endOfLine(), getCursorPosFromLocalCoord(), and getPos().

S32 LLTextEditor::getMaxLength (  )  const [inline]

Definition at line 237 of file lltexteditor.h.

References mMaxTextLength.

Referenced by getXML().

S32 LLTextEditor::getPos ( S32  line,
S32  offset 
) [protected]

Definition at line 3116 of file lltexteditor.cpp.

References getLength(), getLineStart(), llmax(), llmin(), and S32.

Referenced by changeLine(), and changePage().

LLTextSegment * LLTextEditor::getPreviousSegment (  ) 

Definition at line 838 of file lltexteditor.cpp.

References getSegmentIdxAtOffset(), llmax(), mCursorPos, mSegments, NULL, and S32.

Referenced by LLScriptEdCore::updateDynamicHelp().

void LLTextEditor::getSegmentAndOffset ( S32  startpos,
S32 segidxp,
S32 offsetp 
) [protected]

Definition at line 797 of file lltexteditor.cpp.

References mSegments.

Referenced by getLineAndOffset(), getSegmentIdxAtOffset(), and updateLineStartList().

LLTextSegment * LLTextEditor::getSegmentAtLocalPos ( S32  x,
S32  y 
) [protected]

Definition at line 3843 of file lltexteditor.cpp.

References FALSE, getCursorPosFromLocalCoord(), getSegmentIdxAtOffset(), mSegments, NULL, and S32.

Referenced by LLViewerTextEditor::handleDoubleClick(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleRightMouseDown(), LLViewerTextEditor::handleToolTip(), and handleToolTip().

LLTextSegment * LLTextEditor::getSegmentAtOffset ( S32  offset  )  [protected]

Definition at line 3851 of file lltexteditor.cpp.

References getSegmentIdxAtOffset(), mSegments, NULL, and S32.

Referenced by drawCursor(), and getCurrentSegment().

S32 LLTextEditor::getSegmentIdxAtOffset ( S32  offset  )  [protected]

Definition at line 3857 of file lltexteditor.cpp.

References getLength(), getSegmentAndOffset(), mSegments, and S32.

Referenced by getPreviousSegment(), getSegmentAtLocalPos(), getSegmentAtOffset(), and getSelectedSegments().

void LLTextEditor::getSelectedSegments ( std::vector< LLTextSegment * > &  segments  ) 

Definition at line 845 of file lltexteditor.cpp.

References getSegmentIdxAtOffset(), hasSelection(), left, llmax(), llmin(), mCursorPos, mSegments, mSelectionEnd, mSelectionStart, right, and S32.

Referenced by LLScriptEdCore::updateDynamicHelp().

const LLString & LLTextEditor::getText (  )  const

Definition at line 566 of file lltexteditor.cpp.

References llendl, llwarns, mAllowEmbeddedItems, mTextIsUpToDate, mUTF8Text, mWText, TRUE, and wstring_to_utf8str().

Referenced by exportBuffer(), getValue(), getXML(), LLPanelLandGeneral::onCommitAny(), onCovenantLoadComplete(), LLLiveLSLEditor::saveIfNeeded(), LLPreviewLSL::saveIfNeeded(), LLPanelGroupRolesSubTab::saveRoleChanges(), LLPanelClassified::sendClassifiedInfoUpdate(), LLPanelPick::sendPickInfoUpdate(), LLPanelGroupVoting::impl::sendStartGroupProposal(), and LLScriptEdCore::updateDynamicHelp().

LLSD LLTextEditor::getValue (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 580 of file lltexteditor.cpp.

References getText().

llwchar LLTextEditor::getWChar ( S32  pos  ) 

Definition at line 823 of file lltexteditor.cpp.

References mWText.

Referenced by LLTextCmdOverwriteChar::execute().

LLString LLTextEditor::getWidgetTag (  )  const [virtual]

Implements LLView.

Definition at line 387 of file lltexteditor.cpp.

References LL_TEXT_EDITOR_TAG.

virtual EWidgetType LLTextEditor::getWidgetType (  )  const [inline, virtual]

Implements LLView.

Definition at line 80 of file lltexteditor.h.

References WIDGET_TYPE_TEXT_EDITOR.

LLWString LLTextEditor::getWSubString ( S32  pos,
S32  len 
)

Definition at line 828 of file lltexteditor.cpp.

References mWText.

Referenced by LLTextCmdRemove::execute().

const LLWString & LLTextEditor::getWText (  )  const

Definition at line 813 of file lltexteditor.cpp.

References mWText.

Referenced by LLFloaterIMPanel::addTypingIndicator(), LLPrefsIMImpl::apply(), LLViewerTextEditor::handleDoubleClick(), LLFloaterIMPanel::init(), LLFloaterIMPanel::removeTypingIndicator(), LLEmbeddedItems::removeUnusedChars(), replaceText(), selectNext(), and LLFloaterIMPanel::sessionInitReplyReceived().

LLXMLNodePtr LLTextEditor::getXML ( bool  save_children = true  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 4055 of file lltexteditor.cpp.

References LLView::addColorXML(), getMaxLength(), getText(), LLUICtrl::getXML(), mAllowEmbeddedItems, mCursorColor, mFgColor, mFocusBgColor, mGLFont, mHideScrollbarForShortDocs, mReadOnlyBgColor, mReadOnlyFgColor, mWordWrap, mWriteableBgColor, LLFontGL::nameFromFont(), and TRUE.

BOOL LLTextEditor::handleControlKey ( const KEY  key,
const MASK  mask 
) [protected]

Definition at line 1979 of file lltexteditor.cpp.

References deselect(), endOfDoc(), FALSE, getLength(), KEY_END, KEY_HOME, KEY_LEFT, KEY_RIGHT, MASK_CONTROL, MASK_SHIFT, mCursorPos, mSelectionEnd, nextWordPos(), prevWordPos(), setCursorPos(), startSelection(), and TRUE.

Referenced by handleKeyHere().

BOOL LLTextEditor::handleDoubleClick ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1408 of file lltexteditor.cpp.

References LLView::childrenHandleDoubleClick(), deselect(), FALSE, isPartOfWord(), mCursorPos, mIsSelecting, mKeystrokeTimer, mSelectionEnd, mTakesFocus, mTakesNonScrollClicks, mWText, NULL, LLFrameTimer::reset(), S32, setCursorAtLocalPos(), setFocus(), startSelection(), and TRUE.

BOOL LLTextEditor::handleDragAndDrop ( S32  x,
S32  y,
MASK  mask,
BOOL  drop,
EDragAndDropType  cargo_type,
void cargo_data,
EAcceptance accept,
LLString tooltip_msg 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1467 of file lltexteditor.cpp.

References ACCEPT_NO, and TRUE.

BOOL LLTextEditor::handleEditKey ( const KEY  key,
const MASK  mask 
) [protected]

Definition at line 2057 of file lltexteditor.cpp.

References canCopy(), canCut(), canDoDelete(), canPaste(), copy(), cut(), doDelete(), FALSE, KEY_DELETE, MASK_CONTROL, paste(), reportBadKeystroke(), and TRUE.

Referenced by handleKeyHere().

BOOL LLTextEditor::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1257 of file lltexteditor.cpp.

References LLView::childrenHandleHover(), FALSE, LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), LLView::getName(), getSegmentAtLocalPos(), LLView::getVisible(), LLRectBase< Type >::getWidth(), LLView::getWindow(), LLView::hasMouseCapture(), lldebugst, llendl, LLRectBase< Type >::mBottom, mCursorPos, mHoverSegment, mIsSelecting, mKeystrokeTimer, mLastSelectionX, mLastSelectionY, mOnScrollEndCallback, mOnScrollEndData, LLView::mRect, mScrollbar, mSegments, mSelectionEnd, mTakesNonScrollClicks, mTextRect, LLRectBase< Type >::mTop, NULL, LLFrameTimer::reset(), SCROLLBAR_SIZE, LLWindow::setCursor(), setCursorAtLocalPos(), LLScrollbar::setDocPos(), TRUE, UI_CURSOR_ARROW, UI_CURSOR_HAND, UI_CURSOR_IBEAM, and updateScrollFromCursor().

BOOL LLTextEditor::handleKeyHere ( KEY  key,
MASK  mask,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 2218 of file lltexteditor.cpp.

References deselect(), FALSE, LLFocusMgr::getKeyboardFocus(), LLView::getVisible(), gFocusMgr, handleControlKey(), handleEditKey(), handleNavigationKey(), handleSelectionKey(), handleSpecialKey(), KEY_ALT, KEY_CAPSLOCK, KEY_CONTROL, KEY_SHIFT, KEY_TAB, mHandleEditKeysDirectly, mKeystrokeTimer, mReadOnly, mTabToNextField, LLFrameTimer::reset(), TRUE, updateLineStartList(), and updateScrollFromCursor().

BOOL LLTextEditor::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1177 of file lltexteditor.cpp.

References LLView::childrenHandleMouseDown(), deselect(), FALSE, gFocusMgr, hasSelection(), MASK_SHIFT, mCursorPos, mIsSelecting, mKeystrokeTimer, mSelectionEnd, mSelectionStart, mTakesFocus, mTakesNonScrollClicks, NULL, LLFrameTimer::reset(), S32, setCursorAtLocalPos(), setFocus(), LLFocusMgr::setMouseCapture(), startSelection(), and TRUE.

BOOL LLTextEditor::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1358 of file lltexteditor.cpp.

References LLView::childrenHandleMouseUp(), endSelection(), FALSE, LLScrollbar::getDocPos(), gFocusMgr, handleMouseUpOverSegment(), LLView::hasMouseCapture(), hasSelection(), LLRectBase< Type >::mBottom, mIsSelecting, mKeystrokeTimer, mScrollbar, mTakesNonScrollClicks, mTextRect, LLRectBase< Type >::mTop, NULL, LLFrameTimer::reset(), setCursorAtLocalPos(), LLScrollbar::setDocPos(), LLFocusMgr::setMouseCapture(), TRUE, and updateScrollFromCursor().

BOOL LLTextEditor::handleMouseUpOverSegment ( S32  x,
S32  y,
MASK  mask 
) [protected, virtual]

Definition at line 3808 of file lltexteditor.cpp.

References FALSE, LLView::hasMouseCapture(), mHTML, mParseHTML, mSecondlifeURLcallback, mURLcallback, and NULL.

Referenced by LLViewerTextEditor::handleMouseUp(), and handleMouseUp().

BOOL LLTextEditor::handleNavigationKey ( const KEY  key,
const MASK  mask 
) [protected]

Definition at line 1756 of file lltexteditor.cpp.

References changeLine(), changePage(), endOfLine(), FALSE, LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), getLength(), hasSelection(), KEY_DOWN, KEY_END, KEY_HOME, KEY_LEFT, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_RIGHT, KEY_UP, llmax(), llmin(), MASK_NONE, mCursorPos, mOnScrollEndCallback, mOnScrollEndData, mReadOnly, mScrollbar, mSelectionEnd, mSelectionStart, reportBadKeystroke(), setCursorPos(), LLScrollbar::setDocPos(), startOfLine(), and TRUE.

Referenced by handleKeyHere().

BOOL LLTextEditor::handleScrollWheel ( S32  x,
S32  y,
S32  clicks 
) [virtual]

Reimplemented from LLView.

Definition at line 1164 of file lltexteditor.cpp.

References FALSE, LLView::getVisible(), LLScrollbar::handleScrollWheel(), and mScrollbar.

BOOL LLTextEditor::handleSelectionKey ( const KEY  key,
const MASK  mask 
) [protected]

Definition at line 1644 of file lltexteditor.cpp.

References canSelectAll(), changeLine(), changePage(), endOfLine(), FALSE, getLength(), KEY_DOWN, KEY_END, KEY_HOME, KEY_LEFT, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_RIGHT, KEY_UP, MASK_CONTROL, MASK_SHIFT, mCursorPos, mHandleEditKeysDirectly, mSelectionEnd, nextWordPos(), prevWordPos(), reportBadKeystroke(), selectAll(), startOfLine(), startSelection(), and TRUE.

Referenced by handleKeyHere().

BOOL LLTextEditor::handleSpecialKey ( const KEY  key,
const MASK  mask,
BOOL return_key_hit 
) [protected]

Definition at line 2121 of file lltexteditor.cpp.

References addChar(), autoIndent(), deleteSelection(), FALSE, getLineAndOffset(), gKeyboard, hasSelection(), i, indentSelectedLines(), KEY_BACKSPACE, KEY_INSERT, KEY_RETURN, KEY_TAB, MASK_CONTROL, MASK_NONE, MASK_SHIFT, mCursorPos, removeCharOrTab(), reportBadKeystroke(), S32, selectionContainsLineBreaks(), SPACES_PER_TAB, LLKeyboard::toggleInsertMode(), and TRUE.

Referenced by handleKeyHere().

BOOL LLTextEditor::handleToolTip ( S32  x,
S32  y,
LLString msg,
LLRect sticky_rect 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLViewerTextEditor.

Definition at line 1120 of file lltexteditor.cpp.

References FALSE, LLView::getChildList(), getSegmentAtLocalPos(), LLTextSegment::getToolTip(), LLView::getVisible(), LLView::localPointToScreen(), LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, mSegments, LLRectBase< Type >::mTop, LLView::pointInView(), S32, and TRUE.

BOOL LLTextEditor::handleUnicodeCharHere ( llwchar  uni_char,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 2309 of file lltexteditor.cpp.

References addChar(), deselect(), FALSE, LLFocusMgr::getKeyboardFocus(), LLView::getVisible(), LLView::getWindow(), gFocusMgr, LLWindow::hideCursorUntilMouseMove(), mKeystrokeTimer, mReadOnly, LLFrameTimer::reset(), TRUE, unindentLineBeforeCloseBrace(), updateLineStartList(), and updateScrollFromCursor().

BOOL LLTextEditor::hasSelection (  )  [inline, protected]

Definition at line 294 of file lltexteditor.h.

References mSelectionEnd, and mSelectionStart.

Referenced by addChar(), canCopy(), canCut(), canDeselect(), canDoDelete(), deleteSelection(), doDelete(), drawCursor(), drawSelectionBackground(), drawText(), getSelectedSegments(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), handleNavigationKey(), handleSpecialKey(), indentSelectedLines(), insertText(), paste(), and selectionContainsLineBreaks().

BOOL LLTextEditor::importBuffer ( const LLString buffer  )  [virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3886 of file lltexteditor.cpp.

References deselect(), FALSE, llendl, llerrs, llformat(), llwarns, MAX_STRING, mMaxTextLength, NULL, S32, setCursorPos(), setText(), TRUE, updateLineStartList(), and updateScrollFromCursor().

S32 LLTextEditor::indentLine ( S32  pos,
S32  spaces 
) [protected]

Definition at line 992 of file lltexteditor.cpp.

References addChar(), FALSE, getLength(), i, llassert, mWText, remove(), and S32.

Referenced by indentSelectedLines().

void LLTextEditor::indentSelectedLines ( S32  spaces  )  [protected]

Definition at line 1027 of file lltexteditor.cpp.

References getLength(), hasSelection(), indentLine(), left, llmin(), mCursorPos, mSelectionEnd, mSelectionStart, mWText, right, and S32.

Referenced by handleSpecialKey().

S32 LLTextEditor::insert ( const S32  pos,
const LLWString wstr,
const BOOL  group_with_next_op 
) [protected]

Definition at line 1506 of file lltexteditor.cpp.

References execute().

Referenced by append(), insertText(), and paste().

S32 LLTextEditor::insertStringNoUndo ( S32  pos,
const LLWString wstr 
) [protected]

Definition at line 3547 of file lltexteditor.cpp.

References FALSE, make_ui_sound(), mMaxTextLength, mTextIsUpToDate, mWText, S32, and truncate().

Referenced by LLTextCmd::insert().

void LLTextEditor::insertText ( const LLString text  ) 

Definition at line 3379 of file lltexteditor.cpp.

References deleteSelection(), FALSE, LLView::getEnabled(), hasSelection(), insert(), mCursorPos, setCursorPos(), setEnabled(), TRUE, updateLineStartList(), updateScrollFromCursor(), and utf8str_to_wstring().

Referenced by LLFloaterReporter::addDescription(), and replaceText().

BOOL LLTextEditor::isDirty (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 3649 of file lltexteditor.cpp.

References mLastCmd, mPristineCmd, and NULL.

Referenced by LLPanelClassified::checkDirty().

BOOL LLTextEditor::isPartOfWord ( llwchar  c  )  [static, protected]

Definition at line 510 of file lltexteditor.cpp.

Referenced by LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), nextWordPos(), and prevWordPos().

BOOL LLTextEditor::isPristine (  )  const

Definition at line 3600 of file lltexteditor.cpp.

References mBaseDocIsPristine, mLastCmd, and mPristineCmd.

Referenced by LLScriptEdCore::canClose(), LLPreviewNotecard::canClose(), LLScriptEdCore::draw(), LLPreviewNotecard::draw(), LLLiveLSLEditor::saveIfNeeded(), LLPreviewLSL::saveIfNeeded(), LLPreviewNotecard::saveIfNeeded(), LLPreviewNotecard::setEnabled(), and tryToRevertToPristineState().

void LLTextEditor::loadKeywords ( const LLString filename,
const LLDynamicArray< const char * > &  funcs,
const LLDynamicArray< const char * > &  tooltips,
const LLColor3 func_color 
)

Definition at line 3664 of file lltexteditor.cpp.

References LLKeywords::addToken(), LLDynamicArray< Type, BlockSize >::count(), count, LLKeywords::findSegments(), LLDynamicArray< Type, BlockSize >::get(), getLength(), i, llassert, LLKeywords::loadFromFile(), mKeywords, mSegments, mWText, S32, utf8str_trim(), and LLKeywordToken::WORD.

void LLTextEditor::makePristine (  )  [virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3587 of file lltexteditor.cpp.

References LLTextCmd::blockExtensions(), mBaseDocIsPristine, mLastCmd, and mPristineCmd.

Referenced by LLLiveLSLEditor::LLLiveLSLEditor(), LLLiveLSLEditor::loadAsset(), LLPreviewLSL::loadAsset(), LLLiveLSLEditor::loadScriptText(), LLViewerTextEditor::makePristine(), LLPreviewLSL::onLoadComplete(), LLLiveLSLEditor::saveIfNeeded(), and LLPreviewLSL::saveIfNeeded().

S32 LLTextEditor::nextWordPos ( S32  cursorPos  )  const [protected]

Definition at line 740 of file lltexteditor.cpp.

References getLength(), isPartOfWord(), and mWText.

Referenced by handleControlKey(), and handleSelectionKey().

void LLTextEditor::onFocusLost (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 2496 of file lltexteditor.cpp.

References LLWindow::allowLanguageTextInput(), FALSE, gEditMenuHandler, LLView::getWindow(), mCommitOnFocusLost, NULL, LLUICtrl::onCommit(), LLUICtrl::onFocusLost(), and LLWindow::showCursorFromMouseMove().

void LLTextEditor::onMouseCaptureLost (  )  [virtual]

Reimplemented from LLView.

Definition at line 3871 of file lltexteditor.cpp.

References endSelection().

void LLTextEditor::onTabInto (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 3053 of file lltexteditor.cpp.

S32 LLTextEditor::overwriteChar ( S32  pos,
llwchar  wc 
) [protected]

Definition at line 1521 of file lltexteditor.cpp.

References addChar(), execute(), FALSE, mWText, and S32.

S32 LLTextEditor::overwriteCharNoUndo ( S32  pos,
llwchar  wc 
) [protected]

Definition at line 3574 of file lltexteditor.cpp.

References FALSE, mTextIsUpToDate, mWText, and S32.

Referenced by LLTextCmd::overwrite().

void LLTextEditor::paste (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1933 of file lltexteditor.cpp.

References canPaste(), deleteSelection(), deselect(), FALSE, LLFont::FIRST_CHAR, FIRST_EMBEDDED_CHAR, gClipboard, LLClipboard::getPasteWString(), hasSelection(), i, insert(), LAST_EMBEDDED_CHAR, LL_UNKNOWN_CHAR, mAllowEmbeddedItems, mCursorPos, pasteEmbeddedItem(), LLStringBase< T >::replaceTabsWithSpaces(), S32, setCursorPos(), SPACES_PER_TAB, TRUE, updateLineStartList(), and updateScrollFromCursor().

Referenced by handleEditKey().

llwchar LLTextEditor::pasteEmbeddedItem ( llwchar  ext_char  )  [protected, virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3829 of file lltexteditor.cpp.

Referenced by paste().

S32 LLTextEditor::prevWordPos ( S32  cursorPos  )  const [protected]

Definition at line 726 of file lltexteditor.cpp.

References isPartOfWord(), and mWText.

Referenced by handleControlKey(), and handleSelectionKey().

void LLTextEditor::pruneSegments (  )  [protected]

Definition at line 3714 of file lltexteditor.cpp.

References LLTextSegment::getEnd(), LLTextSegment::getStart(), llendl, llwarns, mSegments, mWText, S32, and LLTextSegment::setEnd().

Referenced by removeTextFromEnd().

void LLTextEditor::redo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2456 of file lltexteditor.cpp.

References canRedo(), deselect(), LLTextCmd::groupWithNext(), mLastCmd, mUndoStack, NULL, LLTextCmd::redo(), S32, setCursorPos(), updateLineStartList(), and updateScrollFromCursor().

Referenced by tryToRevertToPristineState().

S32 LLTextEditor::remove ( const S32  pos,
const S32  length,
const BOOL  group_with_next_op 
) [protected]

Definition at line 1511 of file lltexteditor.cpp.

References execute().

Referenced by deleteSelection(), indentLine(), removeChar(), removeCharOrTab(), and removeTextFromEnd().

S32 LLTextEditor::removeChar ( S32  pos  )  [protected]

Definition at line 1584 of file lltexteditor.cpp.

References FALSE, and remove().

void LLTextEditor::removeChar (  )  [protected]

Definition at line 1589 of file lltexteditor.cpp.

References LLView::getEnabled(), mCursorPos, reportBadKeystroke(), and setCursorPos().

Referenced by addChar(), and doDelete().

void LLTextEditor::removeCharOrTab (  )  [protected]

Definition at line 1535 of file lltexteditor.cpp.

References FALSE, LLView::getEnabled(), getLineAndOffset(), i, mCursorPos, mWText, remove(), reportBadKeystroke(), S32, setCursorPos(), and SPACES_PER_TAB.

Referenced by handleSpecialKey(), and unindentLineBeforeCloseBrace().

S32 LLTextEditor::removeStringNoUndo ( S32  pos,
S32  length 
) [protected]

Definition at line 3567 of file lltexteditor.cpp.

References FALSE, mTextIsUpToDate, and mWText.

Referenced by LLTextCmd::remove().

void LLTextEditor::removeTextFromEnd ( S32  num_chars  ) 

Definition at line 3529 of file lltexteditor.cpp.

References FALSE, getLength(), llclamp(), mCursorPos, mSelectionEnd, mSelectionStart, pruneSegments(), remove(), S32, and updateLineStartList().

Referenced by LLFloaterIMPanel::removeTypingIndicator(), and LLFloaterIMPanel::sessionInitReplyReceived().

BOOL LLTextEditor::replaceText ( const LLString search_text,
const LLString replace_text,
BOOL  case_insensitive,
BOOL  wrap = TRUE 
)

Definition at line 665 of file lltexteditor.cpp.

References FALSE, getWText(), insertText(), mIsSelecting, mSelectionEnd, mSelectionStart, selectNext(), LLStringBase< T >::toLower(), TRUE, and utf8str_to_wstring().

Referenced by LLFloaterScriptSearch::handleBtnReplace(), and replaceTextAll().

void LLTextEditor::replaceTextAll ( const LLString search_text,
const LLString replace_text,
BOOL  case_insensitive 
)

Definition at line 698 of file lltexteditor.cpp.

References FALSE, LLScrollbar::getDocPos(), mScrollbar, replaceText(), S32, selectNext(), setCursorPos(), LLScrollbar::setDocPos(), and TRUE.

Referenced by LLFloaterScriptSearch::handleBtnReplaceAll().

void LLTextEditor::reportBadKeystroke (  )  [protected]

Definition at line 3047 of file lltexteditor.cpp.

References make_ui_sound().

Referenced by handleEditKey(), handleNavigationKey(), handleSelectionKey(), handleSpecialKey(), removeChar(), and removeCharOrTab().

void LLTextEditor::reshape ( S32  width,
S32  height,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 3335 of file lltexteditor.cpp.

References LLRectBase< Type >::getHeight(), LLFontGL::getLineHeight(), llround(), mGLFont, mScrollbar, mTextRect, LLView::reshape(), S32, LLScrollbar::setPageSize(), updateLineStartList(), and updateTextRect().

void LLTextEditor::selectAll (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1112 of file lltexteditor.cpp.

References getLength(), mCursorPos, mSelectionEnd, and mSelectionStart.

Referenced by handleSelectionKey().

BOOL LLTextEditor::selectionContainsLineBreaks (  )  [protected]

Definition at line 972 of file lltexteditor.cpp.

References FALSE, hasSelection(), i, left, llmin(), mSelectionEnd, mSelectionStart, mWText, right, S32, and TRUE.

Referenced by handleSpecialKey().

void LLTextEditor::selectNext ( const LLString search_text_in,
BOOL  case_insensitive,
BOOL  wrap = TRUE 
)

Definition at line 615 of file lltexteditor.cpp.

References FALSE, getLength(), getWText(), llmin(), mCursorPos, mIsSelecting, mSelectionEnd, mSelectionStart, S32, setCursorPos(), LLStringBase< T >::toLower(), TRUE, and utf8str_to_wstring().

Referenced by LLFloaterScriptSearch::handleBtnSearch(), replaceText(), and replaceTextAll().

void LLTextEditor::setAcceptCallingCardNames ( BOOL  enable  )  [inline]

Definition at line 214 of file lltexteditor.h.

References mAcceptCallingCardNames.

void LLTextEditor::setBorderVisible ( BOOL  b  ) 

Definition at line 597 of file lltexteditor.cpp.

References mBorder, and LLView::setVisible().

Referenced by LLViewerTextEditor::fromXML(), LLGroupNotifyBox::LLGroupNotifyBox(), and LLNotifyBox::LLNotifyBox().

void LLTextEditor::setCommitOnFocusLost ( BOOL  b  )  [inline]

Definition at line 204 of file lltexteditor.h.

References mCommitOnFocusLost.

Referenced by LLPanelPick::postBuild(), LLPanelClassified::postBuild(), LLPanelAvatarNotes::postBuild(), LLPanelLandGeneral::postBuild(), and LLPanelGroupRolesSubTab::postBuildSubTab().

void LLTextEditor::setCursor ( S32  row,
S32  column 
)

Definition at line 917 of file lltexteditor.cpp.

References mWText, setCursorPos(), and updateScrollFromCursor().

Referenced by LLGroupNotifyBox::LLGroupNotifyBox().

void LLTextEditor::setCursorAndScrollToEnd (  ) 

Definition at line 3228 of file lltexteditor.cpp.

References deselect(), endOfDoc(), and updateScrollFromCursor().

Referenced by LLFloaterChat::onClickToggleShowMute(), and LLFloaterChat::setHistoryCursorAndScrollToEnd().

void LLTextEditor::setCursorAtLocalPos ( S32  x,
S32  y,
BOOL  round 
) [protected]

Definition at line 721 of file lltexteditor.cpp.

References getCursorPosFromLocalCoord(), and setCursorPos().

Referenced by LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleDragAndDrop(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLViewerTextEditor::handleMouseUp(), and handleMouseUp().

void LLTextEditor::setCursorColor ( const LLColor4 c  )  [inline]

Definition at line 185 of file lltexteditor.h.

References c, and mCursorColor.

Referenced by setTextEditorParameters().

void LLTextEditor::setCursorPos ( S32  offset  ) 

Definition at line 930 of file lltexteditor.cpp.

References getLength(), llclamp(), mCursorPos, mDesiredXPixel, S32, and updateScrollFromCursor().

Referenced by addChar(), appendText(), changeLine(), changePage(), deleteSelection(), doDelete(), endOfDoc(), endOfLine(), handleControlKey(), LLViewerTextEditor::handleDragAndDrop(), handleNavigationKey(), importBuffer(), insertText(), paste(), redo(), removeChar(), removeCharOrTab(), replaceTextAll(), selectNext(), setCursor(), setCursorAtLocalPos(), setText(), setWordWrap(), setWText(), startOfLine(), and undo().

void LLTextEditor::setEnabled ( BOOL  enabled  )  [virtual]

Reimplemented from LLView.

Definition at line 2517 of file lltexteditor.cpp.

References mReadOnly, and updateSegments().

Referenced by LLPanelGroupRolesSubTab::handleRoleSelect(), insertText(), LLFloaterAbout::LLFloaterAbout(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), LLLiveLSLEditor::loadAsset(), LLPreviewLSL::loadAsset(), LLPreviewNotecard::loadAsset(), LLPreviewLSL::onLoadComplete(), LLPanelGroupGeneral::postBuild(), LLPanelEvent::postBuild(), LLFloaterTOS::postBuild(), LLPanelPick::refresh(), LLPanelClassified::refresh(), LLPanelLandGeneral::refresh(), LLPanelGroupVoting::impl::setEnableCreateProposal(), LLPanelGroupVoting::impl::setEnableHistoryItem(), LLPanelGroupVoting::impl::setEnableVoteProposal(), and LLPanelGroupGeneral::update().

void LLTextEditor::setFgColor ( const LLColor4 c  )  [inline]

Definition at line 186 of file lltexteditor.h.

References c, and mFgColor.

Referenced by LLPanelEvent::postBuild(), and setTextEditorParameters().

void LLTextEditor::setFocus ( BOOL  b  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 3069 of file lltexteditor.cpp.

References LLWindow::allowLanguageTextInput(), endSelection(), FALSE, gEditMenuHandler, LLView::getWindow(), LLUICtrl::hasFocus(), mKeystrokeTimer, mReadOnly, NULL, LLFrameTimer::reset(), LLUICtrl::setFocus(), and TRUE.

Referenced by LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLLiveLSLEditor::LLLiveLSLEditor(), and LLFloaterTOS::postBuild().

void LLTextEditor::setHandleEditKeysDirectly ( BOOL  b  )  [inline]

Definition at line 216 of file lltexteditor.h.

References mHandleEditKeysDirectly.

Referenced by LLFloaterAbout::LLFloaterAbout(), LLPreviewNotecard::LLPreviewNotecard(), LLFloaterTOS::postBuild(), LLPanelEstateCovenant::postBuild(), LLPanelLandCovenant::updateCovenantText(), and LLFloaterBuyLandUI::updateCovenantText().

void LLTextEditor::setHideScrollbarForShortDocs ( BOOL  b  ) 

Definition at line 604 of file lltexteditor.cpp.

References LLScrollbar::getDocSize(), LLScrollbar::getPageSize(), mHideScrollbarForShortDocs, mScrollbar, and LLView::setVisible().

Referenced by LLViewerTextEditor::fromXML(), fromXML(), LLGroupNotifyBox::LLGroupNotifyBox(), and LLNotifyBox::LLNotifyBox().

void LLTextEditor::setHighlightColor ( const LLColor4 color  ) 

Definition at line 402 of file lltexteditor.cpp.

References mScrollbar, and LLScrollbar::setHighlightColor().

static void LLTextEditor::setLinkColor ( LLColor4  color  )  [inline, static]

Definition at line 219 of file lltexteditor.h.

References mLinkColor.

Referenced by LLPrefsChat::apply(), and idle_startup().

void LLTextEditor::setOnScrollEndCallback ( void(*)(void *)  callback,
void userdata 
)

Definition at line 3876 of file lltexteditor.cpp.

References mOnScrollEndCallback, mOnScrollEndData, mScrollbar, and LLScrollbar::setOnScrollEndCallback().

void LLTextEditor::setParseHTML ( BOOL  parsing  )  [inline]

Definition at line 86 of file lltexteditor.h.

References mParseHTML.

Referenced by LLFloaterChat::addChatHistory(), LLViewerTextEditor::fromXML(), and LLFloaterIMPanel::postBuild().

void LLTextEditor::setReadOnlyBgColor ( const LLColor4 c  )  [inline]

Definition at line 189 of file lltexteditor.h.

References c, and mReadOnlyBgColor.

Referenced by LLPanelAvatarSecondLife::enableControls(), LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), and setTextEditorParameters().

void LLTextEditor::setReadOnlyFgColor ( const LLColor4 c  )  [inline]

Definition at line 187 of file lltexteditor.h.

References c, and mReadOnlyFgColor.

Referenced by LLNotifyBox::LLNotifyBox(), LLPanelEvent::postBuild(), LLFloaterTOS::postBuild(), and setTextEditorParameters().

void LLTextEditor::setShadowColor ( const LLColor4 color  ) 

Definition at line 407 of file lltexteditor.cpp.

References mScrollbar, and LLScrollbar::setShadowColor().

void LLTextEditor::setSourceID ( const LLUUID id  )  [inline]

Definition at line 213 of file lltexteditor.h.

References mSourceID.

Referenced by LLPreviewNotecard::LLPreviewNotecard().

void LLTextEditor::setTabToNextField ( BOOL  b  )  [inline]

Definition at line 203 of file lltexteditor.h.

References mTabToNextField.

Referenced by LLViewerTextEditor::fromXML(), LLGroupNotifyBox::LLGroupNotifyBox(), LLPanelPick::postBuild(), and LLPanelClassified::postBuild().

void LLTextEditor::setTakesFocus ( BOOL  b  )  [inline]

Definition at line 207 of file lltexteditor.h.

References mTakesFocus.

Referenced by LLFloaterAbout::LLFloaterAbout(), LLGroupNotifyBox::LLGroupNotifyBox(), and LLNotifyBox::LLNotifyBox().

void LLTextEditor::setTakesNonScrollClicks ( BOOL  b  ) 

Definition at line 714 of file lltexteditor.cpp.

References mTakesNonScrollClicks.

Referenced by LLGroupNotifyBox::LLGroupNotifyBox(), and LLNotifyBox::LLNotifyBox().

void LLTextEditor::setText ( const LLStringExplicit utf8str  ) 

Definition at line 523 of file lltexteditor.cpp.

References blockUndo(), deselect(), mTextIsUpToDate, mUTF8Text, mWText, LLUICtrl::resetDirty(), setCursorPos(), TRUE, truncate(), updateLineStartList(), updateScrollFromCursor(), utf8str_removeCRLF(), and utf8str_to_wstring().

Referenced by clear(), LLPanelPlace::displayItemInfo(), LLPanelPlace::displayParcelInfo(), LLPanelGroupActionsSubTab::handleActionSelect(), LLPanelGroupRolesSubTab::handleRoleSelect(), importBuffer(), LLViewerTextEditor::importStream(), LLPanelPick::initNewPick(), LLFloaterAbout::LLFloaterAbout(), LLLiveLSLEditor::loadAsset(), LLPreviewLSL::loadAsset(), LLPreviewNotecard::loadAsset(), LLLiveLSLEditor::loadScriptText(), LLGroupMoneyTabEventHandler::onClickEarlier(), LLGroupMoneyTabEventHandler::onClickLater(), LLPreviewLSL::onLoadComplete(), LLPreviewNotecard::onLoadComplete(), LLFloaterPostcard::onMsgFormFocusRecieved(), LLPanelGroupLandMoney::postBuild(), LLPanelLandGeneral::refresh(), LLPanelPlace::resetLocation(), LLPanelEstateCovenant::setCovenantTextEditor(), LLPanelGroupVoting::impl::setEnableCreateProposal(), LLPanelGroupVoting::impl::setEnableHistoryItem(), LLPanelGroupVoting::impl::setEnableVoteProposal(), LLPanelPlace::setErrorStatus(), setValue(), LLFloaterNetwork2080::setWhiteboardText(), LLPanelGroupNotices::showNotice(), LLPanelGroupGeneral::update(), LLFloaterSettingsDebug::updateControl(), LLPanelEstateCovenant::updateCovenantText(), LLPanelLandCovenant::updateCovenantText(), and LLFloaterBuyLandUI::updateCovenantText().

void LLTextEditor::setTextEditorParameters ( LLXMLNodePtr  node  ) 

Definition at line 4121 of file lltexteditor.cpp.

References FALSE, LLUICtrlFactory::getAttributeColor(), setCursorColor(), setFgColor(), setReadOnlyBgColor(), setReadOnlyFgColor(), setWordWrap(), and setWriteableBgColor().

Referenced by LLViewerTextEditor::fromXML(), and fromXML().

void LLTextEditor::setThumbColor ( const LLColor4 color  ) 

Definition at line 397 of file lltexteditor.cpp.

References mScrollbar, and LLScrollbar::setThumbColor().

void LLTextEditor::setTrackColor ( const LLColor4 color  ) 

Definition at line 392 of file lltexteditor.cpp.

References mScrollbar, and LLScrollbar::setTrackColor().

static void LLTextEditor::setURLCallbacks ( void(*)(const char *url)  callback1,
bool(*)(const std::string &url)  callback2,
bool(*)(const std::string &url)  callback3 
) [inline, static]

Definition at line 220 of file lltexteditor.h.

References mSecondlifeURLcallback, mSecondlifeURLcallbackRightClick, and mURLcallback.

Referenced by idle_startup().

void LLTextEditor::setValue ( const LLSD value  )  [virtual]

Reimplemented from LLView.

Definition at line 561 of file lltexteditor.cpp.

References LLSD::asString(), and setText().

void LLTextEditor::setWordWrap ( BOOL  b  ) 

Definition at line 585 of file lltexteditor.cpp.

References deselect(), mWordWrap, setCursorPos(), updateLineStartList(), and updateScrollFromCursor().

Referenced by LLGroupNotifyBox::LLGroupNotifyBox(), LLNotifyBox::LLNotifyBox(), LLPreviewNotecard::LLPreviewNotecard(), LLPanelEvent::postBuild(), LLFloaterTOS::postBuild(), LLFloaterPostcard::postBuild(), and setTextEditorParameters().

void LLTextEditor::setWriteableBgColor ( const LLColor4 c  )  [inline]

Definition at line 188 of file lltexteditor.h.

References c, and mWriteableBgColor.

Referenced by LLGroupNotifyBox::LLGroupNotifyBox(), and setTextEditorParameters().

void LLTextEditor::setWText ( const LLWString wtext  ) 

Definition at line 543 of file lltexteditor.cpp.

References blockUndo(), deselect(), FALSE, mTextIsUpToDate, mUTF8Text, mWText, LLUICtrl::resetDirty(), setCursorPos(), truncate(), updateLineStartList(), and updateScrollFromCursor().

Referenced by LLViewerTextEditor::setASCIIEmbeddedText(), and LLViewerTextEditor::setEmbeddedText().

void LLTextEditor::startOfLine (  ) 

Definition at line 3219 of file lltexteditor.cpp.

References getLineAndOffset(), mCursorPos, S32, and setCursorPos().

Referenced by handleNavigationKey(), and handleSelectionKey().

void LLTextEditor::startSelection (  )  [protected]

Definition at line 953 of file lltexteditor.cpp.

References mCursorPos, mIsSelecting, mSelectionEnd, mSelectionStart, and TRUE.

Referenced by handleControlKey(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), and handleSelectionKey().

void LLTextEditor::truncate (  )  [protected]

Definition at line 514 of file lltexteditor.cpp.

References FALSE, mMaxTextLength, mTextIsUpToDate, mWText, and LLStringBase< T >::truncate().

Referenced by insertStringNoUndo(), setText(), and setWText().

BOOL LLTextEditor::tryToRevertToPristineState (  ) 

Definition at line 3613 of file lltexteditor.cpp.

References canRedo(), canUndo(), deselect(), i, isPristine(), redo(), S32, undo(), updateLineStartList(), and updateScrollFromCursor().

void LLTextEditor::unbindEmbeddedChars ( const LLFontGL font  )  [protected, virtual]

Reimplemented in LLViewerTextEditor.

Definition at line 3838 of file lltexteditor.cpp.

Referenced by changeLine(), draw(), getCursorPosFromLocalCoord(), and updateLineStartList().

void LLTextEditor::undo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 2424 of file lltexteditor.cpp.

References canUndo(), deselect(), LLTextCmd::groupWithNext(), mLastCmd, mUndoStack, NULL, S32, setCursorPos(), LLTextCmd::undo(), updateLineStartList(), and updateScrollFromCursor().

Referenced by tryToRevertToPristineState().

void LLTextEditor::unindentLineBeforeCloseBrace (  )  [protected]

Definition at line 2205 of file lltexteditor.cpp.

References mCursorPos, mWText, and removeCharOrTab().

Referenced by handleUnicodeCharHere().

void LLTextEditor::updateLineStartList ( S32  startpos = 0  )  [protected]

Definition at line 412 of file lltexteditor.cpp.

References bindEmbeddedChars(), FALSE, LLScrollbar::getDocSize(), LLTextSegment::getEnd(), getLineCount(), LLScrollbar::getPageSize(), getSegmentAndOffset(), LLTextSegment::getStart(), LLFontGL::getWidth(), LLRectBase< Type >::getWidth(), mAllowEmbeddedItems, LLFontGL::maxDrawableChars(), mGLFont, mHideScrollbarForShortDocs, mLineStartList, mScrollbar, mSegments, mTextRect, mWordWrap, mWText, S32, LLScrollbar::setDocSize(), LLView::setVisible(), t, TRUE, unbindEmbeddedChars(), and updateSegments().

Referenced by appendText(), cut(), doDelete(), LLViewerTextEditor::handleDragAndDrop(), handleKeyHere(), handleUnicodeCharHere(), importBuffer(), insertText(), paste(), redo(), removeTextFromEnd(), reshape(), setText(), setWordWrap(), setWText(), tryToRevertToPristineState(), and undo().

void LLTextEditor::updateScrollFromCursor (  )  [protected]

Definition at line 3292 of file lltexteditor.cpp.

References LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), getLineAndOffset(), getLineCount(), LLScrollbar::getPageSize(), mCursorPos, mOnScrollEndCallback, mOnScrollEndData, mReadOnly, mScrollbar, S32, LLScrollbar::setDocPos(), and LLScrollbar::setDocSize().

Referenced by cut(), doDelete(), LLViewerTextEditor::handleHover(), handleHover(), handleKeyHere(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), handleUnicodeCharHere(), importBuffer(), insertText(), paste(), redo(), setCursor(), setCursorAndScrollToEnd(), setCursorPos(), setText(), setWordWrap(), setWText(), tryToRevertToPristineState(), and undo().

void LLTextEditor::updateSegments (  )  [protected]

Definition at line 3687 of file lltexteditor.cpp.

References findEmbeddedItemSegments(), LLKeywords::findSegments(), LLKeywords::isLoaded(), mAllowEmbeddedItems, mFgColor, mKeywords, mReadOnly, mReadOnlyFgColor, mSegments, mWText, LLTextSegment::setIsDefault(), and TRUE.

Referenced by setEnabled(), and updateLineStartList().

void LLTextEditor::updateTextRect (  )  [protected]

Definition at line 3655 of file lltexteditor.cpp.

References LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), LLView::mRect, mTextRect, SCROLLBAR_SIZE, LLRectBase< Type >::setOriginAndSize(), UI_TEXTEDITOR_BORDER, UI_TEXTEDITOR_H_PAD, and UI_TEXTEDITOR_V_PAD_TOP.

Referenced by LLTextEditor(), and reshape().


Friends And Related Function Documentation

friend class LLTextCmd [friend]

Definition at line 69 of file lltexteditor.h.


Member Data Documentation

BOOL LLTextEditor::mAcceptCallingCardNames [protected]

Definition at line 426 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleDragAndDrop(), and setAcceptCallingCardNames().

BOOL LLTextEditor::mAllowEmbeddedItems [protected]

Definition at line 424 of file lltexteditor.h.

Referenced by changeLine(), drawClippedSegment(), drawCursor(), drawSelectionBackground(), getCursorPosFromLocalCoord(), getText(), getXML(), LLViewerTextEditor::handleDoubleClick(), LLViewerTextEditor::handleDragAndDrop(), LLViewerTextEditor::handleMouseDown(), LLViewerTextEditor::importStream(), paste(), updateLineStartList(), and updateSegments().

BOOL LLTextEditor::mBaseDocIsPristine [protected]

Definition at line 359 of file lltexteditor.h.

Referenced by blockUndo(), isPristine(), and makePristine().

LLViewBorder* LLTextEditor::mBorder [protected]

Definition at line 357 of file lltexteditor.h.

Referenced by draw(), LLViewerTextEditor::fromXML(), LLTextEditor(), and setBorderVisible().

BOOL LLTextEditor::mCommitOnFocusLost [protected]

Definition at line 419 of file lltexteditor.h.

Referenced by onFocusLost(), and setCommitOnFocusLost().

LLColor4 LLTextEditor::mCursorColor [protected]

Definition at line 407 of file lltexteditor.h.

Referenced by drawCursor(), getXML(), and setCursorColor().

S32 LLTextEditor::mCursorPos [protected]

Definition at line 367 of file lltexteditor.h.

Referenced by addChar(), appendText(), autoIndent(), canDoDelete(), changeLine(), changePage(), doDelete(), drawCursor(), endOfLine(), endSelection(), getCurrentLineAndColumn(), getCurrentSegment(), getPreviousSegment(), getSelectedSegments(), handleControlKey(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleDragAndDrop(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), handleNavigationKey(), handleSelectionKey(), handleSpecialKey(), indentSelectedLines(), insertText(), paste(), removeChar(), removeCharOrTab(), removeTextFromEnd(), selectAll(), selectNext(), setCursorPos(), startOfLine(), startSelection(), unindentLineBeforeCloseBrace(), and updateScrollFromCursor().

S32 LLTextEditor::mDesiredXPixel [protected]

Definition at line 368 of file lltexteditor.h.

Referenced by changeLine(), changePage(), LLTextEditor(), and setCursorPos().

LLColor4 LLTextEditor::mFgColor [protected]

Definition at line 409 of file lltexteditor.h.

Referenced by drawCursor(), findEmbeddedItemSegments(), getXML(), setFgColor(), and updateSegments().

LLColor4 LLTextEditor::mFocusBgColor [protected]

Definition at line 413 of file lltexteditor.h.

Referenced by drawBackground(), and getXML().

const LLFontGL* LLTextEditor::mGLFont [protected]

Definition at line 354 of file lltexteditor.h.

Referenced by changeLine(), draw(), drawClippedSegment(), drawCursor(), drawSelectionBackground(), drawText(), getCursorPosFromLocalCoord(), getXML(), LLTextEditor(), reshape(), and updateLineStartList().

BOOL LLTextEditor::mHandleEditKeysDirectly [protected]

Definition at line 430 of file lltexteditor.h.

Referenced by handleKeyHere(), handleSelectionKey(), and setHandleEditKeysDirectly().

BOOL LLTextEditor::mHideScrollbarForShortDocs [protected]

Definition at line 421 of file lltexteditor.h.

Referenced by getXML(), setHideScrollbarForShortDocs(), and updateLineStartList().

LLTextSegment* LLTextEditor::mHoverSegment [protected]

Definition at line 404 of file lltexteditor.h.

Referenced by drawText(), findEmbeddedItemSegments(), LLViewerTextEditor::handleHover(), handleHover(), and ~LLTextEditor().

LLString LLTextEditor::mHTML [protected]

Definition at line 441 of file lltexteditor.h.

Referenced by drawText(), handleMouseUpOverSegment(), LLViewerTextEditor::handleRightMouseDown(), and LLTextEditor().

BOOL LLTextEditor::mIsSelecting [protected]

Definition at line 394 of file lltexteditor.h.

Referenced by appendText(), deselect(), drawText(), endSelection(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), replaceText(), selectNext(), and startSelection().

LLFrameTimer LLTextEditor::mKeystrokeTimer [protected]

Definition at line 405 of file lltexteditor.h.

Referenced by drawCursor(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleHover(), handleHover(), handleKeyHere(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), handleUnicodeCharHere(), and setFocus().

LLKeywords LLTextEditor::mKeywords

Definition at line 342 of file lltexteditor.h.

Referenced by loadKeywords(), LLScriptEdCore::onBtnDynamicHelp(), and updateSegments().

LLTextCmd* LLTextEditor::mLastCmd [protected]

Definition at line 362 of file lltexteditor.h.

Referenced by addChar(), blockUndo(), canRedo(), canUndo(), execute(), isDirty(), isPristine(), makePristine(), redo(), and undo().

LLCoordGL LLTextEditor::mLastIMEPosition [protected]

Definition at line 443 of file lltexteditor.h.

Referenced by drawCursor().

S32 LLTextEditor::mLastSelectionX [protected]

Definition at line 437 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleHover(), and handleHover().

S32 LLTextEditor::mLastSelectionY [protected]

Definition at line 438 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleHover(), and handleHover().

line_list_t LLTextEditor::mLineStartList [protected]

Definition at line 390 of file lltexteditor.h.

Referenced by getLineAndOffset(), getLineCount(), getLineStart(), and updateLineStartList().

LLColor4 LLTextEditor::mLinkColor = LLColor4::blue [static]

Definition at line 343 of file lltexteditor.h.

Referenced by appendStyledText(), and setLinkColor().

S32 LLTextEditor::mMaxTextLength [protected]

Definition at line 352 of file lltexteditor.h.

Referenced by addChar(), getMaxLength(), importBuffer(), insertStringNoUndo(), and truncate().

S32 LLTextEditor::mMouseDownX [protected]

Definition at line 434 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleMouseDown(), and LLViewerTextEditor::handleMouseUp().

S32 LLTextEditor::mMouseDownY [protected]

Definition at line 435 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleMouseDown(), and LLViewerTextEditor::handleMouseUp().

void(* LLTextEditor::mOnScrollEndCallback)(void *) [protected]

Referenced by changePage(), endOfDoc(), handleHover(), LLViewerTextEditor::handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleNavigationKey(), LLTextEditor(), setOnScrollEndCallback(), and updateScrollFromCursor().

void* LLTextEditor::mOnScrollEndData [protected]

Definition at line 400 of file lltexteditor.h.

Referenced by changePage(), endOfDoc(), handleHover(), LLViewerTextEditor::handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleNavigationKey(), LLTextEditor(), setOnScrollEndCallback(), and updateScrollFromCursor().

BOOL LLTextEditor::mParseHTML [protected]

Definition at line 440 of file lltexteditor.h.

Referenced by appendStyledText(), drawText(), LLViewerTextEditor::fromXML(), handleMouseUpOverSegment(), LLViewerTextEditor::handleRightMouseDown(), LLTextEditor(), and setParseHTML().

LLTextCmd* LLTextEditor::mPristineCmd [protected]

Definition at line 360 of file lltexteditor.h.

Referenced by isDirty(), isPristine(), and makePristine().

BOOL LLTextEditor::mReadOnly [protected]

Definition at line 415 of file lltexteditor.h.

Referenced by acceptsTextInput(), canCut(), canDoDelete(), canPaste(), canRedo(), canUndo(), drawBackground(), drawClippedSegment(), drawCursor(), drawSelectionBackground(), findEmbeddedItemSegments(), LLViewerTextEditor::handleDragAndDrop(), handleKeyHere(), handleNavigationKey(), handleUnicodeCharHere(), setEnabled(), setFocus(), updateScrollFromCursor(), and updateSegments().

LLColor4 LLTextEditor::mReadOnlyBgColor [protected]

Definition at line 412 of file lltexteditor.h.

Referenced by drawBackground(), drawSelectionBackground(), getXML(), and setReadOnlyBgColor().

LLColor4 LLTextEditor::mReadOnlyFgColor [protected]

Definition at line 410 of file lltexteditor.h.

Referenced by drawCursor(), findEmbeddedItemSegments(), getXML(), setReadOnlyFgColor(), and updateSegments().

LLScrollbar* LLTextEditor::mScrollbar [protected]

Definition at line 356 of file lltexteditor.h.

Referenced by appendText(), changePage(), draw(), drawCursor(), drawSelectionBackground(), drawText(), endOfDoc(), getCursorPosFromLocalCoord(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), handleNavigationKey(), handleScrollWheel(), LLTextEditor(), replaceTextAll(), reshape(), setHideScrollbarForShortDocs(), setHighlightColor(), setOnScrollEndCallback(), setShadowColor(), setThumbColor(), setTrackColor(), updateLineStartList(), and updateScrollFromCursor().

bool(* LLTextEditor::mSecondlifeURLcallback)(const std::string &) = NULL [static]

Definition at line 84 of file lltexteditor.cpp.

Referenced by handleMouseUpOverSegment(), and setURLCallbacks().

bool(* LLTextEditor::mSecondlifeURLcallbackRightClick)(const std::string &) = NULL [static]

Definition at line 85 of file lltexteditor.cpp.

Referenced by setURLCallbacks().

segment_list_t LLTextEditor::mSegments [protected]

Definition at line 403 of file lltexteditor.h.

Referenced by appendText(), drawText(), findEmbeddedItemSegments(), getLineAndOffset(), getLineStart(), getPreviousSegment(), getSegmentAndOffset(), getSegmentAtLocalPos(), getSegmentAtOffset(), getSegmentIdxAtOffset(), getSelectedSegments(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleToolTip(), handleToolTip(), loadKeywords(), pruneSegments(), updateLineStartList(), updateSegments(), and ~LLTextEditor().

S32 LLTextEditor::mSelectionEnd [protected]

Definition at line 397 of file lltexteditor.h.

Referenced by appendText(), copy(), cut(), deleteSelection(), deselect(), drawSelectionBackground(), drawText(), endSelection(), getSelectedSegments(), handleControlKey(), LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), handleNavigationKey(), handleSelectionKey(), hasSelection(), indentSelectedLines(), removeTextFromEnd(), replaceText(), selectAll(), selectionContainsLineBreaks(), selectNext(), and startSelection().

S32 LLTextEditor::mSelectionStart [protected]

Definition at line 396 of file lltexteditor.h.

Referenced by appendText(), copy(), cut(), deleteSelection(), deselect(), drawSelectionBackground(), drawText(), getSelectedSegments(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), handleNavigationKey(), hasSelection(), indentSelectedLines(), removeTextFromEnd(), replaceText(), selectAll(), selectionContainsLineBreaks(), selectNext(), and startSelection().

LLUUID LLTextEditor::mSourceID [protected]

Definition at line 428 of file lltexteditor.h.

Referenced by copy(), cut(), LLViewerTextEditor::handleHover(), LLTextEditor(), and setSourceID().

BOOL LLTextEditor::mTabToNextField [protected]

Definition at line 418 of file lltexteditor.h.

Referenced by LLViewerTextEditor::fromXML(), handleKeyHere(), and setTabToNextField().

BOOL LLTextEditor::mTakesFocus [protected]

Definition at line 420 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), and setTakesFocus().

BOOL LLTextEditor::mTakesNonScrollClicks [protected]

Definition at line 422 of file lltexteditor.h.

Referenced by LLViewerTextEditor::handleDoubleClick(), handleDoubleClick(), LLViewerTextEditor::handleDragAndDrop(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseDown(), handleMouseDown(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), and setTakesNonScrollClicks().

BOOL LLTextEditor::mTextIsUpToDate [mutable, protected]

Definition at line 350 of file lltexteditor.h.

Referenced by getText(), insertStringNoUndo(), overwriteCharNoUndo(), removeStringNoUndo(), setText(), setWText(), and truncate().

LLRect LLTextEditor::mTextRect [protected]

Definition at line 369 of file lltexteditor.h.

Referenced by changeLine(), drawCursor(), drawSelectionBackground(), drawText(), getCursorPosFromLocalCoord(), LLViewerTextEditor::handleHover(), handleHover(), LLViewerTextEditor::handleMouseUp(), handleMouseUp(), LLTextEditor(), reshape(), updateLineStartList(), and updateTextRect().

undo_stack_t LLTextEditor::mUndoStack [protected]

Definition at line 365 of file lltexteditor.h.

Referenced by blockUndo(), canRedo(), execute(), redo(), undo(), and ~LLTextEditor().

void(* LLTextEditor::mURLcallback)(const char *) = NULL [static]

Definition at line 83 of file lltexteditor.cpp.

Referenced by handleMouseUpOverSegment(), and setURLCallbacks().

LLString LLTextEditor::mUTF8Text [mutable, protected]

Definition at line 349 of file lltexteditor.h.

Referenced by getText(), setText(), and setWText().

BOOL LLTextEditor::mWordWrap [protected]

Definition at line 416 of file lltexteditor.h.

Referenced by getXML(), setWordWrap(), and updateLineStartList().

LLColor4 LLTextEditor::mWriteableBgColor [protected]

Definition at line 411 of file lltexteditor.h.

Referenced by drawBackground(), drawSelectionBackground(), getXML(), and setWriteableBgColor().

LLWString LLTextEditor::mWText [protected]

Definition at line 348 of file lltexteditor.h.

Referenced by addChar(), append(), autoIndent(), changeLine(), copy(), cut(), doDelete(), drawCursor(), drawSelectionBackground(), drawText(), exportBuffer(), findEmbeddedItemSegments(), getCurrentLineAndColumn(), getCursorPosFromLocalCoord(), LLViewerTextEditor::getEmbeddedItemToolTipAtPos(), LLViewerTextEditor::getEmbeddedText(), getLength(), getText(), getWChar(), getWSubString(), getWText(), handleDoubleClick(), LLViewerTextEditor::handleMouseDown(), indentLine(), indentSelectedLines(), insertStringNoUndo(), loadKeywords(), nextWordPos(), LLViewerTextEditor::openEmbeddedItemAtPos(), overwriteChar(), overwriteCharNoUndo(), prevWordPos(), pruneSegments(), removeCharOrTab(), removeStringNoUndo(), selectionContainsLineBreaks(), setCursor(), setText(), setWText(), truncate(), unindentLineBeforeCloseBrace(), updateLineStartList(), and updateSegments().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:51 2010 for Second Life Viewer by  doxygen 1.4.7