#include <llviewertexteditor.h>
Inheritance diagram for LLViewerTextEditor:
Definition at line 44 of file llviewertexteditor.h.
LLViewerTextEditor::LLViewerTextEditor | ( | const LLString & | name, | |
const LLRect & | rect, | |||
S32 | max_length, | |||
const LLString & | default_text = LLString() , |
|||
const LLFontGL * | glfont = NULL , |
|||
BOOL | allow_embedded_items = FALSE | |||
) |
Definition at line 560 of file llviewertexteditor.cpp.
References LLUICtrlFactory::buildMenu(), gColors, LLControlGroup::getColor(), gUICtrlFactory, LLEmbeddedItems, mEmbeddedItemList, mInventoryCallback, mPopupMenuHandle, LLView::mViewHandle, and LLMenuGL::setBackgroundColor().
Referenced by fromXML().
LLViewerTextEditor::~LLViewerTextEditor | ( | ) | [virtual] |
Definition at line 586 of file llviewertexteditor.cpp.
References mEmbeddedItemList, mInventoryCallback, and NULL.
LLString LLViewerTextEditor::appendTime | ( | bool | prepend_newline | ) |
Definition at line 1246 of file llviewertexteditor.cpp.
References LLTextEditor::appendColoredText(), gPacificDaylightTime, LLColor4::grey, llformat(), time_corrected(), tut::tm(), and utc_to_pacific_time().
Referenced by add_timestamped_line(), and LLFloaterIMPanel::addHistoryLine().
Reimplemented from LLTextEditor.
Definition at line 1286 of file llviewertexteditor.cpp.
References LLEmbeddedItems::bindEmbeddedChars(), and mEmbeddedItemList.
void LLViewerTextEditor::copyInventory | ( | const LLInventoryItem * | item, | |
U32 | callback_id = 0 | |||
) |
Definition at line 1487 of file llviewertexteditor.cpp.
References copy_inventory_from_notecard(), mNotecardInventoryID, and mObjectID.
Referenced by onCopyToInvDialog(), LLPreviewNotecard::onSaveComplete(), and openEmbeddedNotecard().
Reimplemented from LLTextEditor.
Definition at line 1507 of file llviewertexteditor.cpp.
References LLNotecard::exportStream(), LLEmbeddedItems::getEmbeddedItemList(), getEmbeddedText(), LLNotecard::MAX_SIZE, mEmbeddedItemList, LLNotecard::setItems(), LLNotecard::setText(), and TRUE.
Referenced by LLPreviewNotecard::saveIfNeeded().
LLView * LLViewerTextEditor::fromXML | ( | LLXMLNodePtr | node, | |
LLView * | parent, | |||
LLUICtrlFactory * | factory | |||
) | [static] |
Reimplemented from LLTextEditor.
Definition at line 1527 of file llviewertexteditor.cpp.
References LLTextEditor::appendStyledText(), LLView::createRect(), FALSE, LLView::getVisible(), LLUICtrl::initFromXML(), LLViewerTextEditor(), LLTextEditor::mBorder, LLTextEditor::mParseHTML, LLTextEditor::mTabToNextField, NULL, LLView::selectFont(), LLTextEditor::setBorderVisible(), LLTextEditor::setHideScrollbarForShortDocs(), LLTextEditor::setParseHTML(), LLTextEditor::setTabToNextField(), and LLTextEditor::setTextEditorParameters().
const LLInventoryItem* LLViewerTextEditor::getDragItem | ( | ) | [inline] |
Definition at line 75 of file llviewertexteditor.h.
References mDragItem.
Referenced by LLPreviewNotecard::getDragItem().
Definition at line 1296 of file llviewertexteditor.cpp.
References FALSE, LLInventoryItem::getDescription(), LLEmbeddedItems::getEmbeddedItem(), LLTextEditor::getLength(), LLInventoryObject::getName(), LLTextEditor::mWText, TRUE, and utf8str_to_wstring().
Referenced by handleToolTip().
LLString LLViewerTextEditor::getEmbeddedText | ( | ) |
Definition at line 1206 of file llviewertexteditor.cpp.
References LLEmbeddedItems::copyUsedCharsToIndexed(), FIRST_EMBEDDED_CHAR, LLEmbeddedItems::getIndexFromEmbeddedChar(), i, LAST_EMBEDDED_CHAR, LL_UNKNOWN_CHAR, mEmbeddedItemList, LLTextEditor::mWText, S32, and wstring_to_utf8str().
Referenced by exportBuffer().
Reimplemented from LLTextEditor.
Definition at line 996 of file llviewertexteditor.cpp.
References LLView::childrenHandleDoubleClick(), LLTextEditor::deselect(), FALSE, LLStyle::getIsEmbeddedItem(), LLTextEditor::getSegmentAtLocalPos(), LLTextSegment::getStart(), LLTextSegment::getStyle(), LLTextEditor::getWText(), LLTextEditor::isPartOfWord(), LLTextEditor::mAllowEmbeddedItems, LLTextEditor::mCursorPos, LLTextEditor::mIsSelecting, LLTextEditor::mKeystrokeTimer, LLTextEditor::mSelectionEnd, LLTextEditor::mTakesFocus, LLTextEditor::mTakesNonScrollClicks, NULL, openEmbeddedItemAtPos(), LLFrameTimer::reset(), S32, LLTextEditor::setCursorAtLocalPos(), LLTextEditor::setFocus(), LLTextEditor::startSelection(), and TRUE.
BOOL LLViewerTextEditor::handleDragAndDrop | ( | S32 | x, | |
S32 | y, | |||
MASK | mask, | |||
BOOL | drop, | |||
EDragAndDropType | cargo_type, | |||
void * | cargo_data, | |||
EAcceptance * | accept, | |||
LLString & | tooltip_msg | |||
) | [virtual] |
Reimplemented from LLTextEditor.
Definition at line 1069 of file llviewertexteditor.cpp.
References ACCEPT_NO, ACCEPT_YES_COPY_MULTI, ACCEPT_YES_COPY_SINGLE, LLTextEditor::appendText(), DAD_ANIMATION, DAD_BODYPART, DAD_CALLINGCARD, DAD_CLOTHING, DAD_GESTURE, DAD_LANDMARK, DAD_NOTECARD, DAD_OBJECT, DAD_SCRIPT, DAD_SOUND, DAD_TEXTURE, LLTextEditor::deselect(), FALSE, LLView::getEnabled(), LLPermissions::getMaskNextOwner(), LLView::getName(), LLInventoryObject::getName(), LLInventoryItem::getPermissions(), insertEmbeddedItem(), lldebugst, llendl, LLTextEditor::mAcceptCallingCardNames, LLTextEditor::mAllowEmbeddedItems, LLTextEditor::mCursorPos, LLTextEditor::mReadOnly, LLTextEditor::mTakesNonScrollClicks, PERM_ITEM_UNRESTRICTED, S32, LLTextEditor::setCursorAtLocalPos(), LLTextEditor::setCursorPos(), TRUE, and LLTextEditor::updateLineStartList().
Reimplemented from LLTextEditor.
Definition at line 775 of file llviewertexteditor.cpp.
References LLToolDragAndDrop::beginDrag(), LLView::childrenHandleHover(), FALSE, LLScrollbar::getDocPos(), LLView::getName(), LLTextEditor::getSegmentAtLocalPos(), LLView::getVisible(), LLRectBase< Type >::getWidth(), LLView::getWindow(), gToolDragAndDrop, LLToolDragAndDrop::handleHover(), LLView::hasMouseCapture(), LLToolDragAndDrop::isOverThreshold(), lldebugst, llendl, LLView::localPointToScreen(), LLAssetType::lookupDragAndDropType(), LLRectBase< Type >::mBottom, LLTextEditor::mCursorPos, mDragItem, LLTextEditor::mHoverSegment, LLTextEditor::mIsSelecting, LLTextEditor::mKeystrokeTimer, LLTextEditor::mLastSelectionX, LLTextEditor::mLastSelectionY, mObjectID, LLView::mRect, LLTextEditor::mScrollbar, LLTextEditor::mSegments, LLTextEditor::mSelectionEnd, LLTextEditor::mSourceID, LLTextEditor::mTakesNonScrollClicks, LLTextEditor::mTextRect, LLRectBase< Type >::mTop, NULL, LLFrameTimer::reset(), S32, SCROLLBAR_SIZE, LLWindow::setCursor(), LLTextEditor::setCursorAtLocalPos(), LLScrollbar::setDocPos(), LLToolDragAndDrop::SOURCE_NOTECARD, TRUE, UI_CURSOR_ARROW, UI_CURSOR_HAND, UI_CURSOR_IBEAM, and LLTextEditor::updateScrollFromCursor().
Reimplemented from LLTextEditor.
Definition at line 658 of file llviewertexteditor.cpp.
References LLView::childrenHandleMouseDown(), LLTextEditor::deselect(), FALSE, LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), LLEmbeddedItems::getEmbeddedItem(), LLEmbeddedItems::getEmbeddedItemSaved(), LLTextEditor::getLength(), gFocusMgr, gToolDragAndDrop, LLTextEditor::hasSelection(), LLView::localPointToScreen(), LLTextEditor::mAllowEmbeddedItems, MASK_SHIFT, LLTextEditor::mCursorPos, mDragItem, mDragItemSaved, LLTextEditor::mIsSelecting, LLTextEditor::mKeystrokeTimer, LLTextEditor::mMouseDownX, LLTextEditor::mMouseDownY, LLTextEditor::mOnScrollEndCallback, LLTextEditor::mOnScrollEndData, LLTextEditor::mScrollbar, LLTextEditor::mSelectionEnd, LLTextEditor::mSelectionStart, LLTextEditor::mTakesFocus, LLTextEditor::mTakesNonScrollClicks, LLTextEditor::mWText, NULL, LLFrameTimer::reset(), S32, LLTextEditor::setCursorAtLocalPos(), LLToolDragAndDrop::setDragStart(), LLTextEditor::setFocus(), LLFocusMgr::setMouseCapture(), LLTextEditor::startSelection(), and TRUE.
Reimplemented from LLTextEditor.
Definition at line 893 of file llviewertexteditor.cpp.
References LLView::childrenHandleMouseUp(), LLTextEditor::endSelection(), FALSE, LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), gFocusMgr, LLTextEditor::handleMouseUpOverSegment(), LLView::hasMouseCapture(), LLTextEditor::hasSelection(), LLRectBase< Type >::mBottom, mDragItem, mDragItemSaved, LLTextEditor::mIsSelecting, LLTextEditor::mKeystrokeTimer, LLTextEditor::mMouseDownX, LLTextEditor::mMouseDownY, LLTextEditor::mOnScrollEndCallback, LLTextEditor::mOnScrollEndData, LLTextEditor::mScrollbar, LLTextEditor::mTakesNonScrollClicks, LLTextEditor::mTextRect, LLRectBase< Type >::mTop, NULL, openEmbeddedItem(), LLFrameTimer::reset(), S32, LLTextEditor::setCursorAtLocalPos(), LLScrollbar::setDocPos(), LLFocusMgr::setMouseCapture(), TRUE, and LLTextEditor::updateScrollFromCursor().
Reimplemented from LLView.
Definition at line 959 of file llviewertexteditor.cpp.
References LLMenuGL::arrange(), LLView::childrenHandleRightMouseDown(), FALSE, LLStyle::getLinkHREF(), LLTextEditor::getSegmentAtLocalPos(), LLTextSegment::getStyle(), LLView::getViewByHandle(), LLView::getVisible(), LLStyle::isLink(), LLTextEditor::mHTML, LLTextEditor::mParseHTML, mPopupMenuHandle, NULL, LLMenuGL::setVisible(), LLMenuGL::showPopup(), LLMenuGL::sMenuContainer, TRUE, and LLMenuGL::updateParent().
BOOL LLViewerTextEditor::handleToolTip | ( | S32 | x, | |
S32 | y, | |||
LLString & | msg, | |||
LLRect * | sticky_rect | |||
) | [virtual] |
Reimplemented from LLTextEditor.
Definition at line 606 of file llviewertexteditor.cpp.
References FALSE, LLView::getChildList(), getEmbeddedItemToolTipAtPos(), LLStyle::getIsEmbeddedItem(), LLTextEditor::getSegmentAtLocalPos(), LLTextSegment::getStart(), LLTextSegment::getStyle(), LLTextSegment::getToolTip(), LLView::getVisible(), LLView::localPointToScreen(), LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, LLTextEditor::mSegments, LLRectBase< Type >::mTop, LLView::pointInView(), S32, TRUE, and wstring_to_utf8str().
bool LLViewerTextEditor::hasEmbeddedInventory | ( | ) |
Definition at line 1494 of file llviewertexteditor.cpp.
References LLEmbeddedItems::empty(), and mEmbeddedItemList.
Referenced by LLPreviewNotecard::hasEmbeddedInventory().
Reimplemented from LLTextEditor.
Definition at line 1501 of file llviewertexteditor.cpp.
References importStream().
Referenced by onCovenantLoadComplete(), and LLPreviewNotecard::onLoadComplete().
bool LLViewerTextEditor::importStream | ( | std::istream & | str | ) | [virtual] |
Definition at line 1462 of file llviewertexteditor.cpp.
References LLEmbeddedItems::addItems(), LLEmbeddedItems::clear(), LLNotecard::getItems(), LLNotecard::getText(), LLNotecard::getVersion(), LLNotecard::importStream(), LLTextEditor::mAllowEmbeddedItems, LLNotecard::MAX_SIZE, mEmbeddedItemList, setASCIIEmbeddedText(), setEmbeddedText(), and LLTextEditor::setText().
Referenced by importBuffer().
S32 LLViewerTextEditor::insertEmbeddedItem | ( | S32 | pos, | |
LLInventoryItem * | item | |||
) | [protected] |
Definition at line 1457 of file llviewertexteditor.cpp.
References LLTextEditor::execute(), and LLTextCmdInsertEmbeddedItem.
Referenced by handleDragAndDrop().
void LLViewerTextEditor::makePristine | ( | ) | [virtual] |
Reimplemented from LLTextEditor.
Definition at line 598 of file llviewertexteditor.cpp.
References LLTextEditor::makePristine(), LLEmbeddedItems::markSaved(), and mEmbeddedItemList.
Referenced by LLPreviewNotecard::loadAsset(), LLPreviewNotecard::onLoadComplete(), LLPreviewNotecard::postBuild(), and LLPreviewNotecard::saveIfNeeded().
Definition at line 1444 of file llviewertexteditor.cpp.
References copyInventory(), LLNotecardCopyInfo::mItem, and LLNotecardCopyInfo::mTextEd.
Referenced by showCopyToInvDialog().
Definition at line 1423 of file llviewertexteditor.cpp.
References LLNotecardCopyInfo::mItem, mNotecardInventoryID, LLNotecardCopyInfo::mTextEd, and LLPreview::save().
Referenced by openEmbeddedNotecard().
BOOL LLViewerTextEditor::openEmbeddedItem | ( | LLInventoryItem * | item, | |
BOOL | saved | |||
) | [protected] |
Definition at line 1328 of file llviewertexteditor.cpp.
References LLAssetType::AT_ANIMATION, LLAssetType::AT_BODYPART, LLAssetType::AT_CLOTHING, LLAssetType::AT_GESTURE, LLAssetType::AT_LANDMARK, LLAssetType::AT_LSL_TEXT, LLAssetType::AT_NOTECARD, LLAssetType::AT_OBJECT, LLAssetType::AT_SOUND, LLAssetType::AT_TEXTURE, FALSE, LLInventoryObject::getType(), openEmbeddedLandmark(), openEmbeddedNotecard(), openEmbeddedSound(), openEmbeddedTexture(), showCopyToInvDialog(), and TRUE.
Referenced by handleMouseUp(), and openEmbeddedItemAtPos().
Definition at line 1313 of file llviewertexteditor.cpp.
References FALSE, LLEmbeddedItems::getEmbeddedItem(), LLEmbeddedItems::getEmbeddedItemSaved(), LLTextEditor::getLength(), LLTextEditor::mWText, and openEmbeddedItem().
Referenced by handleDoubleClick().
void LLViewerTextEditor::openEmbeddedLandmark | ( | LLInventoryItem * | item | ) | [protected] |
Definition at line 1400 of file llviewertexteditor.cpp.
References FALSE, LLInventoryObject::getUUID(), open_landmark(), and TRUE.
Referenced by openEmbeddedItem().
void LLViewerTextEditor::openEmbeddedNotecard | ( | LLInventoryItem * | item, | |
BOOL | saved | |||
) | [protected] |
Definition at line 1405 of file llviewertexteditor.cpp.
References LLViewerWindow::alertXml(), copyInventory(), gInventoryCallbacks, gViewerWindow, mInventoryCallback, onNotecardDialog(), and LLInventoryCallbackManager::registerCB().
Referenced by openEmbeddedItem().
void LLViewerTextEditor::openEmbeddedSound | ( | LLInventoryItem * | item | ) | [protected] |
Definition at line 1386 of file llviewertexteditor.cpp.
References gAgent, gAgentID, gAudiop, LLInventoryItem::getAssetUUID(), LLControlGroup::getF32(), LLAgent::getPositionGlobal(), gSavedSettings, showCopyToInvDialog(), SOUND_GAIN, and LLAudioEngine::triggerSound().
Referenced by openEmbeddedItem().
void LLViewerTextEditor::openEmbeddedTexture | ( | LLInventoryItem * | item | ) | [protected] |
Definition at line 1362 of file llviewertexteditor.cpp.
References LLFloaterView::getNewFloaterPosition(), LLControlGroup::getRect(), LLInventoryObject::getUUID(), gFloaterView, gSavedSettings, left, LLRectBase< Type >::mLeft, mNotecardInventoryID, mObjectID, LLRectBase< Type >::mTop, S32, LLPreview::setAuxItem(), LLPreview::setNotecardInfo(), LLPreview::show(), top, LLRectBase< Type >::translate(), and TRUE.
Referenced by openEmbeddedItem().
Reimplemented from LLTextEditor.
Definition at line 1267 of file llviewertexteditor.cpp.
References LLEmbeddedItems::getEmbeddedItem(), LLEmbeddedItems::hasEmbeddedItem(), LLEmbeddedItems::insertEmbeddedItem(), LL_UNKNOWN_CHAR, and mEmbeddedItemList.
Definition at line 1169 of file llviewertexteditor.cpp.
References c, LLEmbeddedItems::getEmbeddedCharFromIndex(), mEmbeddedItemList, S32, and LLTextEditor::setWText().
Referenced by importStream().
Definition at line 1191 of file llviewertexteditor.cpp.
References FIRST_EMBEDDED_CHAR, LLEmbeddedItems::getEmbeddedCharFromIndex(), i, LAST_EMBEDDED_CHAR, mEmbeddedItemList, S32, LLTextEditor::setWText(), and utf8str_to_wstring().
Referenced by importStream().
void LLViewerTextEditor::setNotecardInfo | ( | const LLUUID & | notecard_item_id, | |
const LLUUID & | object_id | |||
) | [inline] |
Definition at line 79 of file llviewertexteditor.h.
References mNotecardInventoryID, and mObjectID.
Referenced by LLPreviewNotecard::postBuild().
void LLViewerTextEditor::showCopyToInvDialog | ( | LLInventoryItem * | item | ) | [protected] |
Definition at line 1436 of file llviewertexteditor.cpp.
References LLViewerWindow::alertXml(), gViewerWindow, and onCopyToInvDialog().
Referenced by openEmbeddedItem(), and openEmbeddedSound().
Reimplemented from LLTextEditor.
Definition at line 1291 of file llviewertexteditor.cpp.
References mEmbeddedItemList, and LLEmbeddedItems::unbindEmbeddedChars().
friend class LLEmbeddedItems [friend] |
friend class LLTextCmdInsertEmbeddedItem [friend] |
LLPointer<LLInventoryItem> LLViewerTextEditor::mDragItem [protected] |
Definition at line 124 of file llviewertexteditor.h.
Referenced by getDragItem(), handleHover(), handleMouseDown(), and handleMouseUp().
BOOL LLViewerTextEditor::mDragItemSaved [protected] |
Definition at line 125 of file llviewertexteditor.h.
Referenced by handleMouseDown(), and handleMouseUp().
LLEmbeddedItems* LLViewerTextEditor::mEmbeddedItemList [protected] |
Definition at line 126 of file llviewertexteditor.h.
Referenced by bindEmbeddedChars(), LLTextCmdInsertEmbeddedItem::execute(), exportBuffer(), getEmbeddedText(), hasEmbeddedInventory(), importStream(), LLViewerTextEditor(), makePristine(), pasteEmbeddedItem(), setASCIIEmbeddedText(), setEmbeddedText(), unbindEmbeddedChars(), and ~LLViewerTextEditor().
Definition at line 131 of file llviewertexteditor.h.
Referenced by LLViewerTextEditor(), openEmbeddedNotecard(), and ~LLViewerTextEditor().
LLUUID LLViewerTextEditor::mNotecardInventoryID [protected] |
Definition at line 129 of file llviewertexteditor.h.
Referenced by copyInventory(), onNotecardDialog(), openEmbeddedTexture(), and setNotecardInfo().
LLUUID LLViewerTextEditor::mObjectID [protected] |
Definition at line 128 of file llviewertexteditor.h.
Referenced by copyInventory(), handleHover(), openEmbeddedTexture(), and setNotecardInfo().
LLViewHandle LLViewerTextEditor::mPopupMenuHandle [protected] |
Definition at line 133 of file llviewertexteditor.h.
Referenced by handleRightMouseDown(), and LLViewerTextEditor().