summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexteditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexteditor.h')
-rw-r--r--indra/newview/llviewertexteditor.h41
1 files changed, 25 insertions, 16 deletions
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 1ed60a57fe..bc373c858a 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -41,21 +41,27 @@
//
class LLViewerTextEditor : public LLTextEditor
{
-
public:
- LLViewerTextEditor(const std::string& name,
- const LLRect& rect,
- S32 max_length,
- const std::string& default_text = std::string(),
- const LLFontGL* glfont = NULL,
- BOOL allow_embedded_items = FALSE);
+ struct Params : public LLInitParam::Block<Params, LLTextEditor::Params>
+ {
+ Optional<bool> allow_html;
+
+ Params()
+ : allow_html("allow_html", false)
+ {
+ name = "text_editor";
+ }
+ };
+protected:
+ LLViewerTextEditor(const Params&);
+ friend class LLUICtrlFactory;
+
+public:
virtual ~LLViewerTextEditor();
virtual void makePristine();
- static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
// mousehandler overrides
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
@@ -74,10 +80,11 @@ public:
virtual BOOL importBuffer(const char* buffer, S32 length);
virtual bool importStream(std::istream& str);
virtual BOOL exportBuffer(std::string& buffer);
- void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id)
+ void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id, const LLUUID& preview_id)
{
mNotecardInventoryID = notecard_item_id;
mObjectID = object_id;
+ mPreviewID = preview_id;
}
void setASCIIEmbeddedText(const std::string& instr);
@@ -105,26 +112,28 @@ private:
BOOL getEmbeddedItemToolTipAtPos(S32 pos, LLWString &wmsg) const;
BOOL openEmbeddedItemAtPos( S32 pos );
- BOOL openEmbeddedItem(LLInventoryItem* item);
+ BOOL openEmbeddedItem(LLInventoryItem* item, llwchar wc);
S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item);
- void openEmbeddedTexture( LLInventoryItem* item );
- void openEmbeddedSound( LLInventoryItem* item );
- void openEmbeddedLandmark( LLInventoryItem* item );
- void openEmbeddedNotecard( LLInventoryItem* item);
- void showCopyToInvDialog( LLInventoryItem* item );
+ void openEmbeddedTexture( LLInventoryItem* item, llwchar wc );
+ void openEmbeddedSound( LLInventoryItem* item, llwchar wc );
+ void openEmbeddedLandmark( LLInventoryItem* item, llwchar wc );
+ void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
+ void showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
void showUnsavedAlertDialog( LLInventoryItem* item );
bool onCopyToInvDialog(const LLSD& notification, const LLSD& response );
static bool onNotecardDialog(const LLSD& notification, const LLSD& response );
LLPointer<LLInventoryItem> mDragItem;
+ llwchar mDragItemChar;
BOOL mDragItemSaved;
class LLEmbeddedItems* mEmbeddedItemList;
LLUUID mObjectID;
LLUUID mNotecardInventoryID;
+ LLUUID mPreviewID;
LLPointer<class LLEmbeddedNotecardOpener> mInventoryCallback;