#include <llpreviewscript.h>
Inheritance diagram for LLLiveLSLEditor:


| Public Member Functions | |
| LLLiveLSLEditor (const std::string &name, const LLRect &rect, const std::string &title, const LLUUID &object_id, const LLUUID &item_id) | |
| ~LLLiveLSLEditor () | |
| virtual void | callbackLSLCompileSucceeded (const LLUUID &task_id, const LLUUID &item_id, bool is_script_running) | 
| virtual void | callbackLSLCompileFailed (const LLSD &compile_errors) | 
| void | open () | 
| Static Public Member Functions | |
| static LLLiveLSLEditor * | show (const LLUUID &item_id, const LLUUID &object_id) | 
| static void | hide (const LLUUID &item_id, const LLUUID &object_id) | 
| static LLLiveLSLEditor * | find (const LLUUID &item_id, const LLUUID &object_id) | 
| static void | processScriptRunningReply (LLMessageSystem *msg, void **) | 
| Protected Member Functions | |
| virtual BOOL | canClose () | 
| void | closeIfNeeded () | 
| virtual void | draw () | 
| virtual void | reshape (S32 width, S32 height, BOOL called_from_parent=TRUE) | 
| virtual void | loadAsset () | 
| void | loadAsset (BOOL is_new) | 
| void | saveIfNeeded () | 
| void | uploadAssetViaCaps (const std::string &url, const std::string &filename, const LLUUID &task_id, const LLUUID &item_id, BOOL is_running) | 
| void | uploadAssetLegacy (const std::string &filename, LLViewerObject *object, const LLTransactionID &tid, BOOL is_running) | 
| void | loadScriptText (const char *filename) | 
| void | loadScriptText (LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type) | 
| Static Protected Member Functions | |
| static void | onSearchReplace (void *userdata) | 
| static void | onLoad (void *userdata) | 
| static void | onSave (void *userdata, BOOL close_after_save) | 
| static void | onLoadComplete (LLVFS *vfs, const LLUUID &asset_uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status) | 
| static void | onSaveTextComplete (const LLUUID &asset_uuid, void *user_data, S32 status, LLExtStat ext_status) | 
| static void | onSaveBytecodeComplete (const LLUUID &asset_uuid, void *user_data, S32 status, LLExtStat ext_status) | 
| static void | onRunningCheckboxClicked (LLUICtrl *, void *userdata) | 
| static void | onReset (void *userdata) | 
| static void | onErrorList (LLUICtrl *, void *user_data) | 
| static void * | createScriptEdPanel (void *userdata) | 
| Protected Attributes | |
| LLUUID | mObjectID | 
| LLUUID | mItemID | 
| BOOL | mIsNew | 
| LLScriptEdCore * | mScriptEd | 
| LLCheckBoxCtrl * | mRunningCheckbox | 
| BOOL | mAskedForRunningInfo | 
| BOOL | mHaveRunningInfo | 
| LLButton * | mResetButton | 
| LLPointer< LLViewerInventoryItem > | mItem | 
| BOOL | mCloseAfterSave | 
| S32 | mPendingUploads | 
| Static Protected Attributes | |
| static LLMap< LLUUID, LLLiveLSLEditor * > | sInstances | 
Definition at line 199 of file llpreviewscript.h.
| LLLiveLSLEditor::LLLiveLSLEditor | ( | const std::string & | name, | |
| const LLRect & | rect, | |||
| const std::string & | title, | |||
| const LLUUID & | object_id, | |||
| const LLUUID & | item_id | |||
| ) | 
Definition at line 1611 of file llpreviewscript.cpp.
References LLMap< INDEX_TYPE, MAPPED_TYPE >::addData(), LLUICtrlFactory::buildFloater(), LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetEnabled(), createScriptEdPanel(), FALSE, LLUUID::generate(), LLFloater::getHost(), LLView::getRect(), gUICtrlFactory, LLUUID::isNull(), loadAsset(), LLTextEditor::makePristine(), LLScriptEdCore::mEditor, mItemID, LLRectBase< Type >::mLeft, mObjectID, mScriptEd, LLRectBase< Type >::mTop, onReset(), onRunningCheckboxClicked(), LLTextEditor::setFocus(), LLFloater::setTitle(), sInstances, LLView::translate(), and TRUE.
| LLLiveLSLEditor::~LLLiveLSLEditor | ( | ) | 
Definition at line 1667 of file llpreviewscript.cpp.
References mItemID, mObjectID, LLMap< INDEX_TYPE, MAPPED_TYPE >::removeData(), and sInstances.
Definition at line 1690 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLSD::beginArray(), closeIfNeeded(), LLSD::endArray(), lldebugs, llendl, LLScriptEdCore::mErrorList, mScriptEd, and LLScriptEdCore::selectFirstError().
Referenced by LLUpdateTaskInventoryResponder::uploadComplete().
| void LLLiveLSLEditor::callbackLSLCompileSucceeded | ( | const LLUUID & | task_id, | |
| const LLUUID & | item_id, | |||
| bool | is_script_running | |||
| ) |  [virtual] | 
Definition at line 1679 of file llpreviewscript.cpp.
References LLScrollListCtrl::addSimpleItem(), closeIfNeeded(), lldebugs, llendl, LLScriptEdCore::mErrorList, and mScriptEd.
Referenced by LLUpdateTaskInventoryResponder::uploadComplete().
| BOOL LLLiveLSLEditor::canClose | ( | ) |  [protected, virtual] | 
Reimplemented from LLFloater.
Definition at line 2324 of file llpreviewscript.cpp.
References LLScriptEdCore::canClose(), and mScriptEd.
| void LLLiveLSLEditor::closeIfNeeded | ( | ) |  [protected] | 
Definition at line 2329 of file llpreviewscript.cpp.
References LLFloater::close(), LLWindow::decBusyCount(), LLView::getWindow(), mCloseAfterSave, and mPendingUploads.
Referenced by callbackLSLCompileFailed(), and callbackLSLCompileSucceeded().
Definition at line 1591 of file llpreviewscript.cpp.
References HELLO_LSL, HELP_LSL, onLoad(), onSave(), and onSearchReplace().
Referenced by LLLiveLSLEditor().
| void LLLiveLSLEditor::draw | ( | ) |  [protected, virtual] | 
Reimplemented from LLFloater.
Definition at line 1974 of file llpreviewscript.cpp.
References LLPanel::childGetText(), LLFloater::draw(), FALSE, LLViewerObjectList::findObject(), LLUICtrlFactory::getCheckBoxByName(), LLView::getVisible(), gObjectList, mAskedForRunningInfo, mHaveRunningInfo, mObjectID, LLViewerObject::permAnyOwner(), LLCheckBoxCtrl::set(), LLCheckBoxCtrl::setEnabled(), LLCheckBoxCtrl::setLabel(), LLFloater::setTitle(), and TRUE.
| LLLiveLSLEditor * LLLiveLSLEditor::find | ( | const LLUUID & | item_id, | |
| const LLUUID & | object_id | |||
| ) |  [static] | 
Definition at line 2383 of file llpreviewscript.cpp.
References LLMap< INDEX_TYPE, MAPPED_TYPE >::getIfThere(), and sInstances.
Referenced by LLUpdateTaskInventoryResponder::uploadComplete().
Definition at line 2369 of file llpreviewscript.cpp.
References LLView::getParent(), LLView::removeChild(), and sInstances.
Referenced by LLTaskLSLBridge::removeItem().
Definition at line 1706 of file llpreviewscript.cpp.
References _PREHASH_GetScriptRunning, _PREHASH_ItemID, _PREHASH_ObjectID, _PREHASH_Script, LLMessageSystem::addUUIDFast(), LLAgent::allowOperation(), LLAssetType::AT_LSL_TEXT, LLPanel::childGetText(), LLSaleInfo::DEFAULT, DEFAULT_SCRIPT_DESC, DEFAULT_SCRIPT_NAME, FALSE, LLViewerObjectList::findObject(), gAgent, gAssetStorage, LLInventoryItem::getAssetUUID(), LLAgent::getGroupID(), LLViewerRegion::getHost(), LLViewerObject::getID(), LLAgent::getID(), LLViewerObject::getInventoryObject(), LLAssetStorage::getInvItemAsset(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLViewerObject::getRegion(), LLAgent::getSessionID(), LLInventoryObject::getType(), LLInventoryObject::getUUID(), gMessageSystem, gObjectList, GP_OBJECT_MANIPULATE, HELLO_LSL, LLInventoryItem::II_FLAGS_NONE, LLPermissions::init(), LLPermissions::initMasks(), LLAgent::isGodlike(), LLPointer< Type >::isNull(), LLInventoryType::IT_LSL, LLTextEditor::makePristine(), mAskedForRunningInfo, LLPreview::mAssetStatus, LLScriptEdCore::mEditor, mItem, mItemID, mObjectID, mScriptEd, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLPointer< Type >::notNull(), LLUUID::null, LLStringBase< char >::null, onLoadComplete(), PERM_ALL, PERM_COPY, PERM_MODIFY, PERM_MOVE, PERM_NONE, PERM_TRANSFER, LLPreview::PREVIEW_ASSET_LOADED, LLPreview::PREVIEW_ASSET_LOADING, LLMessageSystem::sendReliable(), LLTextEditor::setEnabled(), LLTextEditor::setText(), time_corrected(), and TRUE.
| void LLLiveLSLEditor::loadAsset | ( | ) |  [protected, virtual] | 
Reimplemented from LLPreview.
Definition at line 1673 of file llpreviewscript.cpp.
References FALSE.
Referenced by LLLiveLSLEditor().
| void LLLiveLSLEditor::loadScriptText | ( | LLVFS * | vfs, | |
| const LLUUID & | uuid, | |||
| LLAssetType::EType | type | |||
| ) |  [protected] | 
Definition at line 1902 of file llpreviewscript.cpp.
References LLVFile::getLastBytesRead(), LLVFile::getSize(), llendl, llwarns, LLTextEditor::makePristine(), LLScriptEdCore::mEditor, mScriptEd, LLVFile::read(), S32, and LLTextEditor::setText().
| void LLLiveLSLEditor::loadScriptText | ( | const char * | filename | ) |  [protected] | 
Definition at line 1870 of file llpreviewscript.cpp.
References LLFile::fopen(), llendl, llerrs, llwarns, LLTextEditor::makePristine(), LLScriptEdCore::mEditor, mScriptEd, and LLTextEditor::setText().
Referenced by onLoadComplete().
| void LLLiveLSLEditor::onLoadComplete | ( | LLVFS * | vfs, | |
| const LLUUID & | asset_uuid, | |||
| LLAssetType::EType | type, | |||
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 1826 of file llpreviewscript.cpp.
References gViewerStats, LLViewerStats::incStat(), LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_ERR_FILE_EMPTY, LL_ERR_INSUFFICIENT_PERMISSIONS, LL_ERR_NOERR, lldebugs, llendl, loadScriptText(), LLPreview::mAssetStatus, NULL, LLPreview::PREVIEW_ASSET_ERROR, LLPreview::PREVIEW_ASSET_LOADED, LLNotifyBox::showXml(), sInstances, and LLViewerStats::ST_DOWNLOAD_FAILED.
Referenced by loadAsset().
Definition at line 1951 of file llpreviewscript.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_ItemID, _PREHASH_ObjectID, _PREHASH_Script, _PREHASH_ScriptReset, _PREHASH_SessionID, LLMessageSystem::addUUIDFast(), LLViewerWindow::alertXml(), LLViewerObjectList::findObject(), gAgent, LLViewerRegion::getHost(), LLAgent::getID(), LLViewerObject::getRegion(), LLAgent::getSessionID(), gMessageSystem, gObjectList, gViewerWindow, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), and LLMessageSystem::sendReliable().
Referenced by LLLiveLSLEditor().
Definition at line 1924 of file llpreviewscript.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_ItemID, _PREHASH_ObjectID, _PREHASH_Running, _PREHASH_Script, _PREHASH_SessionID, _PREHASH_SetScriptRunning, LLMessageSystem::addBOOLFast(), LLMessageSystem::addUUIDFast(), LLViewerWindow::alertXml(), LLViewerObjectList::findObject(), gAgent, LLCheckBoxCtrl::get(), LLUICtrlFactory::getCheckBoxByName(), LLViewerRegion::getHost(), LLAgent::getID(), LLViewerObject::getRegion(), LLAgent::getSessionID(), gMessageSystem, gObjectList, gViewerWindow, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLMessageSystem::sendReliable(), and LLCheckBoxCtrl::set().
Referenced by LLLiveLSLEditor().
| void LLLiveLSLEditor::onSaveBytecodeComplete | ( | const LLUUID & | asset_uuid, | |
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 2271 of file llpreviewscript.cpp.
References LLScrollListCtrl::addSimpleItem(), LLViewerWindow::alertXml(), LLUUID::asString(), dialog_refresh_all(), LLViewerObjectList::findObject(), gDirUtilp, LLAssetStorage::getErrorString(), LLDir::getExpandedFilename(), LLMap< INDEX_TYPE, MAPPED_TYPE >::getIfThere(), gObjectList, gViewerWindow, LL_PATH_CACHE, llendl, llformat(), llinfos, llwarns, LLLiveLSLSaveData::mActive, LLScriptEdCore::mErrorList, LLLiveLSLSaveData::mItem, LLLiveLSLSaveData::mObjectID, mScriptEd, LLFile::remove(), LLViewerObject::saveScript(), and sInstances.
Referenced by uploadAssetLegacy().
| void LLLiveLSLEditor::onSaveTextComplete | ( | const LLUUID & | asset_uuid, | |
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 2241 of file llpreviewscript.cpp.
References LLViewerWindow::alertXml(), LLWindow::decBusyCount(), LLAssetStorage::getErrorString(), LLMap< INDEX_TYPE, MAPPED_TYPE >::getIfThere(), LLView::getWindow(), gViewerWindow, llendl, llwarns, LLLiveLSLSaveData::mItem, LLLiveLSLSaveData::mObjectID, NULL, and sInstances.
Referenced by uploadAssetLegacy().
Definition at line 2012 of file llpreviewscript.cpp.
References LLFloaterScriptSearch::show().
Referenced by createScriptEdPanel().
| void LLLiveLSLEditor::open | ( | ) |  [virtual] | 
Reimplemented from LLPreview.
Definition at line 2319 of file llpreviewscript.cpp.
References LLFloater::open().
Referenced by LLPanelContents::onClickNewScript(), LLTaskLSLBridge::openItem(), and show().
| void LLLiveLSLEditor::processScriptRunningReply | ( | LLMessageSystem * | msg, | |
| void ** | ||||
| ) |  [static] | 
Definition at line 2391 of file llpreviewscript.cpp.
References _PREHASH_ItemID, _PREHASH_ObjectID, _PREHASH_Running, _PREHASH_Script, LLMessageSystem::getBOOLFast(), LLUICtrlFactory::getCheckBoxByName(), LLMessageSystem::getUUIDFast(), mHaveRunningInfo, LLCheckBoxCtrl::set(), sInstances, and TRUE.
Referenced by register_viewer_callbacks().
| void LLLiveLSLEditor::reshape | ( | S32 | width, | |
| S32 | height, | |||
| BOOL | called_from_parent = TRUE | |||
| ) |  [protected, virtual] | 
Reimplemented from LLView.
Definition at line 2409 of file llpreviewscript.cpp.
References gSavedSettings, LLFloater::isMinimized(), LLView::mRect, LLView::reshape(), and LLControlGroup::setRect().
| void LLLiveLSLEditor::saveIfNeeded | ( | ) |  [protected] | 
Definition at line 2038 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLViewerWindow::alertXml(), LLUUID::asString(), LLScrollListCtrl::deleteAllItems(), LLViewerObjectList::findObject(), LLFile::fopen(), gAgent, gAssetStorage, gDirUtilp, LLUUID::generate(), LLCheckBoxCtrl::get(), LLViewerRegion::getCapability(), LLUICtrlFactory::getCheckBoxByName(), LLDir::getExpandedFilename(), LLViewerObject::getInventoryObject(), LLAgent::getRegion(), LLAgent::getSecureSessionID(), LLTextEditor::getText(), LLView::getWindow(), gObjectList, gViewerWindow, LLWindow::incBusyCount(), LLPointer< Type >::isNull(), LLTextEditor::isPristine(), LL_PATH_CACHE, llendl, llformat(), llinfos, llwarns, LLTransactionID::makeAssetID(), LLTextEditor::makePristine(), LLScriptEdCore::mEditor, LLScriptEdCore::mErrorList, mItem, mItemID, mObjectID, mPendingUploads, mScriptEd, NULL, uploadAssetLegacy(), and uploadAssetViaCaps().
| LLLiveLSLEditor * LLLiveLSLEditor::show | ( | const LLUUID & | item_id, | |
| const LLUUID & | object_id | |||
| ) |  [static] | 
Definition at line 2355 of file llpreviewscript.cpp.
References NULL, open(), and sInstances.
Referenced by LLTaskLSLBridge::openItem().
| void LLLiveLSLEditor::uploadAssetLegacy | ( | const std::string & | filename, | |
| LLViewerObject * | object, | |||
| const LLTransactionID & | tid, | |||
| BOOL | is_running | |||
| ) |  [protected] | 
Definition at line 2145 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLScrollListCtrl::addSimpleItem(), LLUUID::asString(), LLAssetType::AT_LSL_BYTECODE, LLAssetType::AT_LSL_TEXT, LLPanel::childGetText(), dialog_refresh_all(), FALSE, LLFile::fopen(), gAgent, gAssetStorage, gDirUtilp, LLUICtrlFactory::getCheckBoxByName(), LLDir::getExpandedFilename(), LLAgent::getSecureSessionID(), LLView::getWindow(), LLWindow::incBusyCount(), LLAgent::isGodlike(), LL_PATH_CACHE, llendl, llformat(), llinfos, lscript_compile(), LLTransactionID::makeAssetID(), MAX_STRING, LLScriptEdCore::mErrorList, mItem, mObjectID, mPendingUploads, mScriptEd, NULL, onSaveBytecodeComplete(), onSaveTextComplete(), LLFile::remove(), LLViewerObject::saveScript(), LLScriptEdCore::selectFirstError(), LLAssetStorage::storeAssetData(), LLStringBase< char >::stripNonprintable(), and TRUE.
Referenced by saveIfNeeded().
| void LLLiveLSLEditor::uploadAssetViaCaps | ( | const std::string & | url, | |
| const std::string & | filename, | |||
| const LLUUID & | task_id, | |||
| const LLUUID & | item_id, | |||
| BOOL | is_running | |||
| ) |  [protected] | 
Definition at line 2130 of file llpreviewscript.cpp.
References llendl, llinfos, and LLHTTPClient::post().
Referenced by saveIfNeeded().
| BOOL LLLiveLSLEditor::mAskedForRunningInfo  [protected] | 
| BOOL LLLiveLSLEditor::mCloseAfterSave  [protected] | 
Reimplemented from LLPreview.
Definition at line 272 of file llpreviewscript.h.
Referenced by closeIfNeeded().
| BOOL LLLiveLSLEditor::mHaveRunningInfo  [protected] | 
Definition at line 269 of file llpreviewscript.h.
Referenced by draw(), and processScriptRunningReply().
| BOOL LLLiveLSLEditor::mIsNew  [protected] | 
Definition at line 264 of file llpreviewscript.h.
| LLPointer<LLViewerInventoryItem> LLLiveLSLEditor::mItem  [protected] | 
Reimplemented from LLPreview.
Definition at line 271 of file llpreviewscript.h.
Referenced by loadAsset(), saveIfNeeded(), and uploadAssetLegacy().
| LLUUID LLLiveLSLEditor::mItemID  [protected] | 
Definition at line 263 of file llpreviewscript.h.
Referenced by LLLiveLSLEditor(), loadAsset(), saveIfNeeded(), and ~LLLiveLSLEditor().
| LLUUID LLLiveLSLEditor::mObjectID  [protected] | 
Reimplemented from LLPreview.
Definition at line 262 of file llpreviewscript.h.
Referenced by draw(), LLLiveLSLEditor(), loadAsset(), saveIfNeeded(), uploadAssetLegacy(), and ~LLLiveLSLEditor().
| S32 LLLiveLSLEditor::mPendingUploads  [protected] | 
Definition at line 274 of file llpreviewscript.h.
Referenced by closeIfNeeded(), saveIfNeeded(), and uploadAssetLegacy().
| LLButton* LLLiveLSLEditor::mResetButton  [protected] | 
Definition at line 270 of file llpreviewscript.h.
| LLCheckBoxCtrl* LLLiveLSLEditor::mRunningCheckbox  [protected] | 
Definition at line 267 of file llpreviewscript.h.
| LLScriptEdCore* LLLiveLSLEditor::mScriptEd  [protected] | 
Definition at line 265 of file llpreviewscript.h.
Referenced by callbackLSLCompileFailed(), callbackLSLCompileSucceeded(), canClose(), LLLiveLSLEditor(), loadAsset(), loadScriptText(), onSaveBytecodeComplete(), saveIfNeeded(), and uploadAssetLegacy().
| LLMap< LLUUID, LLLiveLSLEditor * > LLLiveLSLEditor::sInstances  [static, protected] | 
--------------------------------------------------------------------------- LLLiveLSLEditor ---------------------------------------------------------------------------
Reimplemented from LLPreview.
Definition at line 276 of file llpreviewscript.h.
Referenced by find(), hide(), LLLiveLSLEditor(), onLoadComplete(), onSaveBytecodeComplete(), onSaveTextComplete(), processScriptRunningReply(), show(), and ~LLLiveLSLEditor().
 1.4.7
 1.4.7