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.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h
index 8e61435..cb9cdf4 100644
--- a/linden/indra/newview/llpreviewscript.h
+++ b/linden/indra/newview/llpreviewscript.h
@@ -40,6 +40,7 @@
40#include "llcombobox.h" 40#include "llcombobox.h"
41#include "lliconctrl.h" 41#include "lliconctrl.h"
42#include "llframetimer.h" 42#include "llframetimer.h"
43#include "lltimer.h"
43 44
44 45
45class LLMessageSystem; 46class LLMessageSystem;
@@ -53,7 +54,7 @@ class LLMenuBarGL;
53class LLKeywordToken; 54class LLKeywordToken;
54 55
55// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. 56// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
56class LLScriptEdCore : public LLPanel 57class LLScriptEdCore : public LLPanel, public LLEventTimer
57{ 58{
58 friend class LLPreviewScript; 59 friend class LLPreviewScript;
59 friend class LLPreviewLSL; 60 friend class LLPreviewLSL;
@@ -96,6 +97,8 @@ public:
96 static void onBtnInsertFunction(LLUICtrl*, void*); 97 static void onBtnInsertFunction(LLUICtrl*, void*);
97 static void doSave( void* userdata, BOOL close_after_save ); 98 static void doSave( void* userdata, BOOL close_after_save );
98 static void onBtnSave(void*); 99 static void onBtnSave(void*);
100 static void onSetExternalEditor(void* data);
101 static void onBtnXEd(void*);
99 static void onBtnUndoChanges(void*); 102 static void onBtnUndoChanges(void*);
100 static void onBtnSaveToDisc(void*); 103 static void onBtnSaveToDisc(void*);
101 static void onBtnLoadFromDisc(void*); 104 static void onBtnLoadFromDisc(void*);
@@ -117,13 +120,21 @@ public:
117 static BOOL enablePasteMenu(void* userdata); 120 static BOOL enablePasteMenu(void* userdata);
118 static BOOL enableSelectAllMenu(void* userdata); 121 static BOOL enableSelectAllMenu(void* userdata);
119 static BOOL enableDeselectMenu(void* userdata); 122 static BOOL enableDeselectMenu(void* userdata);
123 static BOOL enableExternalEditor(void* userdata);
120 124
121 static BOOL hasChanged(void* userdata); 125 static BOOL hasChanged(void* userdata);
122 126
123 void selectFirstError(); 127 void selectFirstError();
128
129 void autoSave();
130 //dim external ed
131 void xedUpdateScript();
132 void xedLaunch();
124 133
125 virtual BOOL handleKeyHere(KEY key, MASK mask); 134 virtual BOOL handleKeyHere(KEY key, MASK mask);
126 135
136 virtual BOOL tick();
137
127 void enableSave(BOOL b) {mEnableSave = b;} 138 void enableSave(BOOL b) {mEnableSave = b;}
128 139
129protected: 140protected:
@@ -137,8 +148,10 @@ protected:
137 148
138private: 149private:
139 std::string mSampleText; 150 std::string mSampleText;
151 std::string mAutosaveFilename;
152 std::string mXfname;
153 llstat mXstbuf;
140 std::string mHelpURL; 154 std::string mHelpURL;
141 std::string mScriptTitle;
142 LLTextEditor* mEditor; 155 LLTextEditor* mEditor;
143 void (*mLoadCallback)(void* userdata); 156 void (*mLoadCallback)(void* userdata);
144 void (*mSaveCallback)(void* userdata, BOOL close_after_save); 157 void (*mSaveCallback)(void* userdata, BOOL close_after_save);
@@ -146,8 +159,7 @@ private:
146 void* mUserdata; 159 void* mUserdata;
147 LLComboBox *mFunctions; 160 LLComboBox *mFunctions;
148 BOOL mForceClose; 161 BOOL mForceClose;
149 //LLPanel* mGuiPanel; 162 //LLPanel* mCodePanel;
150 LLPanel* mCodePanel;
151 LLScrollListCtrl* mErrorList; 163 LLScrollListCtrl* mErrorList;
152 LLDynamicArray<LLEntryAndEdCore*> mBridges; 164 LLDynamicArray<LLEntryAndEdCore*> mBridges;
153 LLHandle<LLFloater> mLiveHelpHandle; 165 LLHandle<LLFloater> mLiveHelpHandle;
@@ -155,6 +167,7 @@ private:
155 LLFrameTimer mLiveHelpTimer; 167 LLFrameTimer mLiveHelpTimer;
156 S32 mLiveHelpHistorySize; 168 S32 mLiveHelpHistorySize;
157 BOOL mEnableSave; 169 BOOL mEnableSave;
170 BOOL mEnableXEd;
158 BOOL mHasScriptData; 171 BOOL mHasScriptData;
159}; 172};
160 173
@@ -165,9 +178,10 @@ class LLPreviewLSL : public LLPreview
165public: 178public:
166 LLPreviewLSL(const std::string& name, const LLRect& rect, const std::string& title, 179 LLPreviewLSL(const std::string& name, const LLRect& rect, const std::string& title,
167 const LLUUID& item_uuid ); 180 const LLUUID& item_uuid );
181 ~LLPreviewLSL();
182
168 virtual void callbackLSLCompileSucceeded(); 183 virtual void callbackLSLCompileSucceeded();
169 virtual void callbackLSLCompileFailed(const LLSD& compile_errors); 184 virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
170
171 /*virtual*/ void open(); /*Flawfinder: ignore*/ 185 /*virtual*/ void open(); /*Flawfinder: ignore*/
172 186
173protected: 187protected: