diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2010-11-16 07:01:11 -0800 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2010-11-16 07:01:11 -0800 |
commit | 807007649a32c5276f31c5f73d6fade7d059ce07 (patch) | |
tree | 5730fa254ab3938a2acd4329921a57a551018ad1 /indra/newview/llpreviewscript.h | |
parent | 92a8d93b0d3084c1ccd4fb9cccc285bc14d01404 (diff) | |
parent | e8e1d7e629b9a4a65cde766ed81334140a749428 (diff) |
merge
Diffstat (limited to 'indra/newview/llpreviewscript.h')
-rw-r--r-- | indra/newview/llpreviewscript.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index f4b31e5962..d35c6b8528 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -35,6 +35,7 @@ #include "lliconctrl.h" #include "llframetimer.h" +class LLLiveLSLFile; class LLMessageSystem; class LLTextEditor; class LLButton; @@ -62,6 +63,7 @@ public: const LLHandle<LLFloater>& floater_handle, void (*load_callback)(void* userdata), void (*save_callback)(void* userdata, BOOL close_after_save), + void (*edit_callback)(void*), void (*search_replace_callback)(void* userdata), void* userdata, S32 bottom_pad = 0); // pad below bottom row of buttons @@ -80,6 +82,8 @@ public: bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response); bool handleReloadFromServerDialog(const LLSD& notification, const LLSD& response); + void onEditButtonClick(); + static void onCheckLock(LLUICtrl*, void*); static void onHelpComboCommit(LLUICtrl* ctrl, void* userdata); static void onClickBack(void* userdata); @@ -114,6 +118,7 @@ private: LLTextEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); + void (*mEditCallback)(void* userdata); void (*mSearchReplaceCallback) (void* userdata); void* mUserdata; LLComboBox *mFunctions; @@ -179,6 +184,7 @@ protected: // Used to view and edit an LSL that is attached to an object. class LLLiveLSLEditor : public LLPreview { + friend class LLLiveLSLFile; public: LLLiveLSLEditor(const LLSD& key); ~LLLiveLSLEditor(); @@ -202,7 +208,10 @@ private: virtual void loadAsset(); void loadAsset(BOOL is_new); - void saveIfNeeded(); + void saveIfNeeded(bool sync = true); + void openExternalEditor(); + std::string getTmpFileName(); + bool writeToFile(const std::string& filename); void uploadAssetViaCaps(const std::string& url, const std::string& filename, const LLUUID& task_id, @@ -218,6 +227,7 @@ private: static void onSearchReplace(void* userdata); static void onLoad(void* userdata); static void onSave(void* userdata, BOOL close_after_save); + static void onEdit(void* userdata); static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, @@ -227,7 +237,7 @@ private: static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); static void onReset(void* userdata); -// void loadScriptText(const std::string& filename); // unused + bool loadScriptText(const std::string& filename); void loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type); static void onErrorList(LLUICtrl*, void* user_data); @@ -253,6 +263,7 @@ private: LLCheckBoxCtrl* mMonoCheckbox; BOOL mIsModifiable; + LLLiveLSLFile* mLiveFile; }; #endif // LL_LLPREVIEWSCRIPT_H |