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


| Public Member Functions | |
| LLPreviewLSL (const std::string &name, const LLRect &rect, const std::string &title, const LLUUID &item_uuid) | |
| virtual void | callbackLSLCompileSucceeded () | 
| virtual void | callbackLSLCompileFailed (const LLSD &compile_errors) | 
| void | open () | 
| Protected Member Functions | |
| virtual BOOL | canClose () | 
| void | closeIfNeeded () | 
| virtual void | reshape (S32 width, S32 height, BOOL called_from_parent=TRUE) | 
| virtual void | loadAsset () | 
| void | saveIfNeeded () | 
| void | uploadAssetViaCaps (const std::string &url, const std::string &filename, const LLUUID &item_id) | 
| void | uploadAssetLegacy (const std::string &filename, const LLUUID &item_id, const LLTransactionID &tid) | 
| 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 &uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status) | 
| static void | onSaveComplete (const LLUUID &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 LLPreviewLSL * | getInstance (const LLUUID &uuid) | 
| static void * | createScriptEdPanel (void *userdata) | 
| Protected Attributes | |
| LLScriptEdCore * | mScriptEd | 
| S32 | mPendingUploads | 
Definition at line 153 of file llpreviewscript.h.
| LLPreviewLSL::LLPreviewLSL | ( | const std::string & | name, | |
| const LLRect & | rect, | |||
| const std::string & | title, | |||
| const LLUUID & | item_uuid | |||
| ) | 
Definition at line 1095 of file llpreviewscript.cpp.
References LLUICtrlFactory::buildFloater(), LLPanel::childSetCommitCallback(), LLPanel::childSetPrevalidate(), LLPanel::childSetText(), createScriptEdPanel(), LLPreview::getAssetStatus(), LLInventoryItem::getDescription(), LLRectBase< Type >::getHeight(), LLFloater::getHost(), LLPreview::getItem(), LLRectBase< Type >::getWidth(), gUICtrlFactory, loadAsset(), LLPreview::onText(), LLLineEditor::prevalidatePrintableNotPipe(), LLPreview::PREVIEW_ASSET_UNLOADED, reshape(), LLView::setRect(), LLFloater::setTitle(), LLFloater::sHostp, and TRUE.
Definition at line 1143 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLSD::beginArray(), closeIfNeeded(), LLSD::endArray(), llendl, llinfos, LLScriptEdCore::mErrorList, mScriptEd, and LLScriptEdCore::selectFirstError().
Referenced by LLUpdateAgentInventoryResponder::uploadComplete().
| void LLPreviewLSL::callbackLSLCompileSucceeded | ( | ) |  [virtual] | 
Definition at line 1134 of file llpreviewscript.cpp.
References LLScrollListCtrl::addSimpleItem(), closeIfNeeded(), llendl, llinfos, LLScriptEdCore::mErrorList, and mScriptEd.
Referenced by LLUpdateAgentInventoryResponder::uploadComplete().
| BOOL LLPreviewLSL::canClose | ( | ) |  [protected, virtual] | 
Reimplemented from LLFloater.
Definition at line 1215 of file llpreviewscript.cpp.
References LLScriptEdCore::canClose(), and mScriptEd.
| void LLPreviewLSL::closeIfNeeded | ( | ) |  [protected] | 
Definition at line 1220 of file llpreviewscript.cpp.
References LLFloater::close(), LLWindow::decBusyCount(), LLView::getWindow(), LLPreview::mCloseAfterSave, and mPendingUploads.
Referenced by callbackLSLCompileFailed(), and callbackLSLCompileSucceeded().
Definition at line 1075 of file llpreviewscript.cpp.
References HELLO_LSL, HELP_LSL, onLoad(), onSave(), and onSearchReplace().
Referenced by LLPreviewLSL().
| LLPreviewLSL * LLPreviewLSL::getInstance | ( | const LLUUID & | uuid | ) |  [static, protected] | 
Definition at line 1559 of file llpreviewscript.cpp.
References end, NULL, and LLPreview::sInstances.
Referenced by onLoadComplete(), and onSaveBytecodeComplete().
| void LLPreviewLSL::loadAsset | ( | ) |  [protected, virtual] | 
Reimplemented from LLPreview.
Definition at line 1160 of file llpreviewscript.cpp.
References LLAgent::allowOperation(), LLPanel::childGetText(), LLPanel::childSetEnabled(), LLPanel::childSetVisible(), FALSE, gAgent, gAssetStorage, LLInventoryItem::getAssetUUID(), LLAgent::getID(), LLAgent::getInventoryRootID(), LLAssetStorage::getInvItemAsset(), LLPreview::getItem(), LLInventoryModel::getItem(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLAgent::getSessionID(), LLInventoryObject::getType(), LLInventoryObject::getUUID(), gInventory, GP_OBJECT_MANIPULATE, HELLO_LSL, LLHost::invalid, LLAgent::isGodlike(), LLInventoryModel::isObjectDescendentOf(), LLTextEditor::makePristine(), LLPreview::mAssetStatus, LLScriptEdCore::mEditor, LLScriptEdCore::mFunctions, LLPreview::mItemUUID, mScriptEd, LLUUID::null, onLoadComplete(), PERM_COPY, PERM_MODIFY, LLPreview::PREVIEW_ASSET_LOADED, LLPreview::PREVIEW_ASSET_LOADING, LLComboBox::setEnabled(), LLTextEditor::setEnabled(), LLTextEditor::setText(), and TRUE.
Referenced by LLPreviewLSL().
| void LLPreviewLSL::onLoadComplete | ( | LLVFS * | vfs, | |
| const LLUUID & | uuid, | |||
| LLAssetType::EType | type, | |||
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 1497 of file llpreviewscript.cpp.
References LLAgent::allowOperation(), FALSE, gAgent, getInstance(), LLInventoryModel::getItem(), LLInventoryItem::getPermissions(), LLVFile::getSize(), gInventory, GP_OBJECT_MANIPULATE, gViewerStats, LLViewerStats::incStat(), LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_ERR_FILE_EMPTY, LL_ERR_INSUFFICIENT_PERMISSIONS, lldebugs, llendl, llwarns, LLTextEditor::makePristine(), LLPreview::mAssetStatus, LLScriptEdCore::mEditor, mScriptEd, PERM_MODIFY, LLPreview::PREVIEW_ASSET_ERROR, LLPreview::PREVIEW_ASSET_LOADED, LLVFile::read(), S32, LLTextEditor::setEnabled(), LLTextEditor::setText(), LLNotifyBox::showXml(), LLViewerStats::ST_DOWNLOAD_FAILED, and TRUE.
Referenced by loadAsset().
| void LLPreviewLSL::onSaveBytecodeComplete | ( | const LLUUID & | asset_uuid, | |
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 1459 of file llpreviewscript.cpp.
References LLViewerWindow::alertXml(), LLAssetStorage::getErrorString(), getInstance(), gViewerWindow, llendl, llwarns, and NULL.
Referenced by uploadAssetLegacy().
| void LLPreviewLSL::onSaveComplete | ( | const LLUUID & | uuid, | |
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) |  [static, protected] | 
Definition at line 1410 of file llpreviewscript.cpp.
References LLViewerWindow::alertXml(), LLWindow::decBusyCount(), FALSE, LLPreview::find(), LLAssetStorage::getErrorString(), LLInventoryModel::getItem(), LLView::getWindow(), gInventory, gViewerWindow, llendl, llwarns, LLInventoryModel::notifyObservers(), and LLInventoryModel::updateItem().
Referenced by uploadAssetLegacy().
Definition at line 1237 of file llpreviewscript.cpp.
References LLFloaterScriptSearch::show().
Referenced by createScriptEdPanel().
| void LLPreviewLSL::open | ( | ) |  [virtual] | 
Reimplemented from LLPreview.
Definition at line 1232 of file llpreviewscript.cpp.
References LLFloater::open().
| void LLPreviewLSL::reshape | ( | S32 | width, | |
| S32 | height, | |||
| BOOL | called_from_parent = TRUE | |||
| ) |  [protected, virtual] | 
Reimplemented from LLView.
Definition at line 1570 of file llpreviewscript.cpp.
References gSavedSettings, LLFloater::isMinimized(), LLView::mRect, LLView::reshape(), and LLControlGroup::setRect().
Referenced by LLPreviewLSL().
| void LLPreviewLSL::saveIfNeeded | ( | ) |  [protected] | 
Definition at line 1263 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLUUID::asString(), LLScrollListCtrl::deleteAllItems(), LLFile::fopen(), gAgent, gAssetStorage, gDirUtilp, LLUUID::generate(), LLViewerRegion::getCapability(), LLDir::getExpandedFilename(), LLPreview::getItem(), LLAgent::getRegion(), LLAgent::getSecureSessionID(), LLTextEditor::getText(), LLView::getWindow(), LLWindow::incBusyCount(), LLTextEditor::isPristine(), LL_PATH_CACHE, llendl, llformat(), llwarns, LLTransactionID::makeAssetID(), LLTextEditor::makePristine(), LLScriptEdCore::mEditor, LLScriptEdCore::mErrorList, LLPreview::mItemUUID, mPendingUploads, mScriptEd, NULL, uploadAssetLegacy(), and uploadAssetViaCaps().
| void LLPreviewLSL::uploadAssetLegacy | ( | const std::string & | filename, | |
| const LLUUID & | item_id, | |||
| const LLTransactionID & | tid | |||
| ) |  [protected] | 
Definition at line 1327 of file llpreviewscript.cpp.
References LLScrollListCtrl::addElement(), LLUUID::asString(), LLAssetType::AT_LSL_BYTECODE, LLAssetType::AT_LSL_TEXT, LLFile::fopen(), gAgent, gAssetStorage, gDirUtilp, LLDir::getExpandedFilename(), LLUICtrlFactory::getLineEditorByName(), LLAgent::getSecureSessionID(), LLLineEditor::getText(), LLView::getWindow(), LLWindow::incBusyCount(), LLAgent::isGodlike(), LL_PATH_CACHE, llendl, llformat(), llinfos, lscript_compile(), LLTransactionID::makeAssetID(), MAX_STRING, LLScriptEdCore::mErrorList, LLPreview::mItemUUID, mPendingUploads, mScriptEd, NULL, onSaveBytecodeComplete(), onSaveComplete(), LLFile::remove(), LLScriptEdCore::selectFirstError(), LLAssetStorage::storeAssetData(), and LLStringBase< char >::stripNonprintable().
Referenced by saveIfNeeded().
| void LLPreviewLSL::uploadAssetViaCaps | ( | const std::string & | url, | |
| const std::string & | filename, | |||
| const LLUUID & | item_id | |||
| ) |  [protected] | 
Definition at line 1317 of file llpreviewscript.cpp.
References llendl, llinfos, and LLHTTPClient::post().
Referenced by saveIfNeeded().
| S32 LLPreviewLSL::mPendingUploads  [protected] | 
Definition at line 194 of file llpreviewscript.h.
Referenced by closeIfNeeded(), saveIfNeeded(), and uploadAssetLegacy().
| LLScriptEdCore* LLPreviewLSL::mScriptEd  [protected] | 
Definition at line 192 of file llpreviewscript.h.
Referenced by callbackLSLCompileFailed(), callbackLSLCompileSucceeded(), canClose(), loadAsset(), onLoadComplete(), saveIfNeeded(), and uploadAssetLegacy().
 1.4.7
 1.4.7