summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewnotecard.h')
-rw-r--r--indra/newview/llpreviewnotecard.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 46a6d0ef50..d9c14815c1 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -29,6 +29,7 @@
#include "llpreview.h"
#include "llassetstorage.h"
+#include "llpreviewscript.h"
#include "lliconctrl.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -47,18 +48,18 @@ public:
virtual ~LLPreviewNotecard();
bool saveItem();
- void setObjectID(const LLUUID& object_id);
+ void setObjectID(const LLUUID& object_id) override;
// llview
- virtual void draw();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
- virtual void setEnabled( BOOL enabled );
+ void draw() override;
+ BOOL handleKeyHere(KEY key, MASK mask) override;
+ void setEnabled( BOOL enabled ) override;
// llfloater
- virtual BOOL canClose();
+ BOOL canClose() override;
// llpanel
- virtual BOOL postBuild();
+ BOOL postBuild() override;
// reach into the text editor, and grab the drag item
const LLInventoryItem* getDragItem();
@@ -72,11 +73,13 @@ public:
// asset system. :(
void refreshFromInventory(const LLUUID& item_id = LLUUID::null);
+ void syncExternal();
+
protected:
- void updateTitleButtons();
- virtual void loadAsset();
- bool saveIfNeeded(LLInventoryItem* copyitem = NULL);
+ void updateTitleButtons() override;
+ void loadAsset() override;
+ bool saveIfNeeded(LLInventoryItem* copyitem = NULL, bool sync = true);
void deleteNotecard();
@@ -89,6 +92,8 @@ protected:
static void onClickDelete(void* data);
+ static void onClickEdit(void* data);
+
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
S32 status, LLExtStat ext_status);
@@ -99,6 +104,12 @@ protected:
static void finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId);
static void finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUID taskId);
+ void openInExternalEditor();
+ bool onExternalChange(const std::string& filename);
+ bool loadNotecardText(const std::string& filename);
+ bool writeToFile(const std::string& filename);
+ std::string getTmpFileName();
+
protected:
LLViewerTextEditor* mEditor;
LLButton* mSaveBtn;
@@ -106,6 +117,8 @@ protected:
LLUUID mAssetID;
LLUUID mObjectID;
+
+ LLLiveLSLFile* mLiveFile;
};