aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewscript.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpreviewscript.h')
-rw-r--r--linden/indra/newview/llpreviewscript.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h
index e4c165f..977b9ce 100644
--- a/linden/indra/newview/llpreviewscript.h
+++ b/linden/indra/newview/llpreviewscript.h
@@ -118,19 +118,20 @@ public:
118 void selectFirstError(); 118 void selectFirstError();
119 119
120 virtual BOOL handleKeyHere(KEY key, MASK mask); 120 virtual BOOL handleKeyHere(KEY key, MASK mask);
121
122 void enableSave(BOOL b) {mEnableSave = b;}
121 123
122protected: 124protected:
123 void deleteBridges(); 125 void deleteBridges();
124 void setHelpPage(const LLString& help_string); 126 void setHelpPage(const std::string& help_string);
125 void updateDynamicHelp(BOOL immediate = FALSE); 127 void updateDynamicHelp(BOOL immediate = FALSE);
126 void addHelpItemToHistory(const LLString& help_string); 128 void addHelpItemToHistory(const std::string& help_string);
127
128 static void onErrorList(LLUICtrl*, void* user_data); 129 static void onErrorList(LLUICtrl*, void* user_data);
129 130
130 virtual const char *getTitleName() const { return "Script"; } 131 virtual const char *getTitleName() const { return "Script"; }
131 132
132private: 133private:
133 LLString mSampleText; 134 std::string mSampleText;
134 std::string mHelpFile; 135 std::string mHelpFile;
135 LLTextEditor* mEditor; 136 LLTextEditor* mEditor;
136 void (*mLoadCallback)(void* userdata); 137 void (*mLoadCallback)(void* userdata);
@@ -147,6 +148,7 @@ private:
147 LLKeywordToken* mLastHelpToken; 148 LLKeywordToken* mLastHelpToken;
148 LLFrameTimer mLiveHelpTimer; 149 LLFrameTimer mLiveHelpTimer;
149 S32 mLiveHelpHistorySize; 150 S32 mLiveHelpHistorySize;
151 BOOL mEnableSave;
150}; 152};
151 153
152 154
@@ -184,8 +186,9 @@ protected:
184 void* user_data, S32 status, LLExtStat ext_status); 186 void* user_data, S32 status, LLExtStat ext_status);
185 static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status); 187 static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status);
186 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); 188 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
189public:
187 static LLPreviewLSL* getInstance(const LLUUID& uuid); 190 static LLPreviewLSL* getInstance(const LLUUID& uuid);
188 191protected:
189 static void* createScriptEdPanel(void* userdata); 192 static void* createScriptEdPanel(void* userdata);
190 193
191 194
@@ -195,6 +198,7 @@ protected:
195 LLScriptEdCore* mScriptEd; 198 LLScriptEdCore* mScriptEd;
196 // Can safely close only after both text and bytecode are uploaded 199 // Can safely close only after both text and bytecode are uploaded
197 S32 mPendingUploads; 200 S32 mPendingUploads;
201
198}; 202};
199 203
200 204
@@ -253,7 +257,7 @@ protected:
253 static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); 257 static void onRunningCheckboxClicked(LLUICtrl*, void* userdata);
254 static void onReset(void* userdata); 258 static void onReset(void* userdata);
255 259
256 void loadScriptText(const char* filename); 260// void loadScriptText(const std::string& filename); // unused
257 void loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type); 261 void loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type);
258 262
259 static void onErrorList(LLUICtrl*, void* user_data); 263 static void onErrorList(LLUICtrl*, void* user_data);
@@ -277,9 +281,15 @@ protected:
277 S32 mPendingUploads; 281 S32 mPendingUploads;
278 282
279 static LLMap<LLUUID, LLLiveLSLEditor*> sInstances; 283 static LLMap<LLUUID, LLLiveLSLEditor*> sInstances;
280}; 284 BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
285
286private:
281 287
282// name of help file for lsl 288 static void onMonoCheckboxClicked(LLUICtrl*, void* userdata);
283extern const char HELP_LSL[]; 289 BOOL monoChecked() const;
290
291 LLCheckBoxCtrl* mMonoCheckbox;
292 BOOL mIsModifiable;
293};
284 294
285#endif // LL_LLPREVIEWSCRIPT_H 295#endif // LL_LLPREVIEWSCRIPT_H