diff options
Diffstat (limited to 'indra/newview/llpreviewscript.h')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llpreviewscript.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 7563cecd9d..66727bceee 100644..100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -27,17 +27,18 @@ #ifndef LL_LLPREVIEWSCRIPT_H #define LL_LLPREVIEWSCRIPT_H -#include "lldarray.h" #include "llpreview.h" #include "lltabcontainer.h" #include "llinventory.h" #include "llcombobox.h" #include "lliconctrl.h" #include "llframetimer.h" +#include "llfloatergotoline.h" +#include "llsyntaxid.h" class LLLiveLSLFile; class LLMessageSystem; -class LLTextEditor; +class LLScriptEditor; class LLButton; class LLCheckBoxCtrl; class LLScrollListCtrl; @@ -49,6 +50,7 @@ class LLKeywordToken; class LLVFS; class LLViewerInventoryItem; class LLScriptEdContainer; +class LLFloaterGotoLine; // Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. class LLScriptEdCore : public LLPanel @@ -58,6 +60,7 @@ class LLScriptEdCore : public LLPanel friend class LLLiveLSLEditor; friend class LLFloaterScriptSearch; friend class LLScriptEdContainer; + friend class LLFloaterGotoLine; protected: // Supposed to be invoked only by the container. @@ -69,11 +72,15 @@ protected: void (*save_callback)(void* userdata, BOOL close_after_save), void (*search_replace_callback)(void* userdata), void* userdata, + bool live, S32 bottom_pad = 0); // pad below bottom row of buttons public: ~LLScriptEdCore(); + void initializeKeywords(); void initMenu(); + void processKeywords(); + void processLoaded(); virtual void draw(); /*virtual*/ BOOL postBuild(); @@ -107,6 +114,8 @@ public: virtual bool hasAccelerators() const { return true; } + void setScriptName(const std::string& name){mScriptName = name;}; + private: void onBtnHelp(); void onBtnDynamicHelp(); @@ -124,12 +133,16 @@ protected: void deleteBridges(); void setHelpPage(const std::string& help_string); void updateDynamicHelp(BOOL immediate = FALSE); + bool isKeyword(LLKeywordToken* token); void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); + bool mLive; + private: std::string mSampleText; - LLTextEditor* mEditor; + std::string mScriptName; + LLScriptEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); void (*mSearchReplaceCallback) (void* userdata); @@ -138,7 +151,7 @@ private: BOOL mForceClose; LLPanel* mCodePanel; LLScrollListCtrl* mErrorList; - LLDynamicArray<LLEntryAndEdCore*> mBridges; + std::vector<LLEntryAndEdCore*> mBridges; LLHandle<LLFloater> mLiveHelpHandle; LLKeywordToken* mLastHelpToken; LLFrameTimer mLiveHelpTimer; @@ -148,6 +161,10 @@ private: LLLiveLSLFile* mLiveFile; LLScriptEdContainer* mContainer; // parent view + +public: + boost::signals2::connection mSyntaxIDConnection; + }; class LLScriptEdContainer : public LLPreview @@ -156,6 +173,7 @@ class LLScriptEdContainer : public LLPreview public: LLScriptEdContainer(const LLSD& key); + LLScriptEdContainer(const LLSD& key, const bool live); protected: std::string getTmpFileName(); @@ -165,7 +183,7 @@ protected: LLScriptEdCore* mScriptEd; }; -// Used to view and edit a LSL from your inventory. +// Used to view and edit an LSL script from your inventory. class LLPreviewLSL : public LLScriptEdContainer { public: @@ -210,7 +228,7 @@ protected: }; -// Used to view and edit an LSL that is attached to an object. +// Used to view and edit an LSL script that is attached to an object. class LLLiveLSLEditor : public LLScriptEdContainer { friend class LLLiveLSLFile; |