aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewertexteditor.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llviewertexteditor.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llviewertexteditor.h')
-rw-r--r--linden/indra/newview/llviewertexteditor.h41
1 files changed, 22 insertions, 19 deletions
diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h
index b09e92e..9b9bd2f 100644
--- a/linden/indra/newview/llviewertexteditor.h
+++ b/linden/indra/newview/llviewertexteditor.h
@@ -1,6 +1,6 @@
1/** 1/**
2 * @file llviewertexteditor.h 2 * @file llviewertexteditor.h
3 * @brief Text editor widget to let users enter a a multi-line document// 3 * @brief Text editor widget to let users enter a multi-line document//
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
@@ -34,17 +34,12 @@
34 34
35#include "lltexteditor.h" 35#include "lltexteditor.h"
36 36
37class LLInventoryItem;
38class LLEmbeddedItems;
39class LLEmbeddedNotecardOpener;
40 37
41// 38//
42// Classes 39// Classes
43// 40//
44class LLViewerTextEditor : public LLTextEditor 41class LLViewerTextEditor : public LLTextEditor
45{ 42{
46 friend class LLEmbeddedItems;
47 friend class LLTextCmdInsertEmbeddedItem;
48 43
49public: 44public:
50 LLViewerTextEditor(const LLString& name, 45 LLViewerTextEditor(const LLString& name,
@@ -72,7 +67,7 @@ public:
72 BOOL drop, EDragAndDropType cargo_type, 67 BOOL drop, EDragAndDropType cargo_type,
73 void *cargo_data, EAcceptance *accept, LLString& tooltip_msg); 68 void *cargo_data, EAcceptance *accept, LLString& tooltip_msg);
74 69
75 const LLInventoryItem* getDragItem() { return mDragItem; } 70 const class LLInventoryItem* getDragItem() const { return mDragItem; }
76 virtual BOOL importBuffer(const LLString& buffer); 71 virtual BOOL importBuffer(const LLString& buffer);
77 virtual bool importStream(std::istream& str); 72 virtual bool importStream(std::istream& str);
78 virtual BOOL exportBuffer(LLString& buffer); 73 virtual BOOL exportBuffer(LLString& buffer);
@@ -86,9 +81,9 @@ public:
86 void setEmbeddedText(const LLString& instr); 81 void setEmbeddedText(const LLString& instr);
87 LLString getEmbeddedText(); 82 LLString getEmbeddedText();
88 83
84 // Appends Second Life time, small font, grey.
85 // If this starts a line, you need to prepend a newline.
89 LLString appendTime(bool prepend_newline); 86 LLString appendTime(bool prepend_newline);
90 // Appends Second Life time, small font, grey
91 // If this starts a line, you need to prepend a newline.
92 87
93 void copyInventory(const LLInventoryItem* item, U32 callback_id = 0); 88 void copyInventory(const LLInventoryItem* item, U32 callback_id = 0);
94 89
@@ -99,38 +94,46 @@ public:
99 // rather than checking if a re-load is necessary. Phoenix 2007-02-27 94 // rather than checking if a re-load is necessary. Phoenix 2007-02-27
100 bool hasEmbeddedInventory(); 95 bool hasEmbeddedInventory();
101 96
102protected: 97private:
103 // Embedded object operations 98 // Embedded object operations
104 virtual llwchar pasteEmbeddedItem(llwchar ext_char); 99 virtual llwchar pasteEmbeddedItem(llwchar ext_char);
105 virtual void bindEmbeddedChars(const LLFontGL* font); 100 virtual void bindEmbeddedChars(LLFontGL* font) const;
106 virtual void unbindEmbeddedChars(const LLFontGL* font); 101 virtual void unbindEmbeddedChars(LLFontGL* font) const;
107 102
108 BOOL getEmbeddedItemToolTipAtPos(S32 pos, LLWString &wmsg); 103 BOOL getEmbeddedItemToolTipAtPos(S32 pos, LLWString &wmsg) const;
109 BOOL openEmbeddedItemAtPos( S32 pos ); 104 BOOL openEmbeddedItemAtPos( S32 pos );
110 BOOL openEmbeddedItem(LLInventoryItem* item, BOOL saved); 105 BOOL openEmbeddedItem(LLInventoryItem* item);
111 106
112 S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item); 107 S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item);
113 108
114 void openEmbeddedTexture( LLInventoryItem* item ); 109 void openEmbeddedTexture( LLInventoryItem* item );
115 void openEmbeddedSound( LLInventoryItem* item ); 110 void openEmbeddedSound( LLInventoryItem* item );
116 void openEmbeddedLandmark( LLInventoryItem* item ); 111 void openEmbeddedLandmark( LLInventoryItem* item );
117 void openEmbeddedNotecard( LLInventoryItem* item, BOOL saved ); 112 void openEmbeddedNotecard( LLInventoryItem* item);
118 void showCopyToInvDialog( LLInventoryItem* item ); 113 void showCopyToInvDialog( LLInventoryItem* item );
114 void showUnsavedAlertDialog( LLInventoryItem* item );
119 115
120 static void onCopyToInvDialog( S32 option, void* userdata ); 116 static void onCopyToInvDialog( S32 option, void* userdata );
121 static void onNotecardDialog( S32 option, void* userdata ); 117 static void onNotecardDialog( S32 option, void* userdata );
122 118
123protected:
124 LLPointer<LLInventoryItem> mDragItem; 119 LLPointer<LLInventoryItem> mDragItem;
125 BOOL mDragItemSaved; 120 BOOL mDragItemSaved;
126 LLEmbeddedItems* mEmbeddedItemList; 121 class LLEmbeddedItems* mEmbeddedItemList;
127 122
128 LLUUID mObjectID; 123 LLUUID mObjectID;
129 LLUUID mNotecardInventoryID; 124 LLUUID mNotecardInventoryID;
130 125
131 LLPointer<LLEmbeddedNotecardOpener> mInventoryCallback; 126 LLPointer<class LLEmbeddedNotecardOpener> mInventoryCallback;
127
128 // *TODO: Add right click menus for SLURLs
129 //LLHandle<LLView> mPopupMenuHandle;
130
131 //
132 // Inner classes
133 //
134
135 class LLTextCmdInsertEmbeddedItem;
132 136
133 LLViewHandle mPopupMenuHandle;
134}; 137};
135 138
136#endif // LL_VIEWERTEXTEDITOR_H 139#endif // LL_VIEWERTEXTEDITOR_H