void LLFloaterLuaConsole::onClickClear(void *data) { LLFloaterLuaConsole *self = (LLFloaterLuaConsole *)data; LLViewerTextEditor *editor = self->getChild<LLViewerTextEditor>("Lua Output Editor"); editor->removeTextFromEnd(editor->getWText().length()); editor->makePristine(); }
void LLEmbeddedItems::removeUnusedChars() { std::set<llwchar> used = mEmbeddedUsedChars; const LLWString& wtext = mEditor->getWText(); for (S32 i=0; i<(S32)wtext.size(); i++) { llwchar wc = wtext[i]; if( wc >= LLTextEditor::FIRST_EMBEDDED_CHAR && wc <= LLTextEditor::LAST_EMBEDDED_CHAR ) { used.erase(wc); } } // Remove chars not actually used for (std::set<llwchar>::iterator iter = used.begin(); iter != used.end(); ++iter) { removeEmbeddedItem(*iter); } }
void onCopyToInventory() { LLViewerTextEditor* pEditor = dynamic_cast<LLViewerTextEditor*>(&mEditor); if (pEditor) pEditor->showCopyToInvDialog(mItem, pEditor->getWText()[pEditor->getCursorPos()]); }
void onOpen() { LLViewerTextEditor* pEditor = dynamic_cast<LLViewerTextEditor*>(&mEditor); if (pEditor) pEditor->openEmbeddedItem(mItem, pEditor->getWText()[pEditor->getCursorPos()]); }