diff options
Diffstat (limited to 'linden/indra/newview/llviewertexteditor.h')
-rw-r--r-- | linden/indra/newview/llviewertexteditor.h | 41 |
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 | ||
37 | class LLInventoryItem; | ||
38 | class LLEmbeddedItems; | ||
39 | class LLEmbeddedNotecardOpener; | ||
40 | 37 | ||
41 | // | 38 | // |
42 | // Classes | 39 | // Classes |
43 | // | 40 | // |
44 | class LLViewerTextEditor : public LLTextEditor | 41 | class LLViewerTextEditor : public LLTextEditor |
45 | { | 42 | { |
46 | friend class LLEmbeddedItems; | ||
47 | friend class LLTextCmdInsertEmbeddedItem; | ||
48 | 43 | ||
49 | public: | 44 | public: |
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 | ||
102 | protected: | 97 | private: |
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 | ||
123 | protected: | ||
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 |