aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltooldraganddrop.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/lltooldraganddrop.h
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lltooldraganddrop.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/linden/indra/newview/lltooldraganddrop.h b/linden/indra/newview/lltooldraganddrop.h
index eb99aa9..7e96b81 100644
--- a/linden/indra/newview/lltooldraganddrop.h
+++ b/linden/indra/newview/lltooldraganddrop.h
@@ -45,6 +45,7 @@
45class LLToolDragAndDrop; 45class LLToolDragAndDrop;
46class LLViewerRegion; 46class LLViewerRegion;
47class LLVOAvatar; 47class LLVOAvatar;
48class LLPickInfo;
48 49
49class LLToolDragAndDrop : public LLTool, public LLSingleton<LLToolDragAndDrop> 50class LLToolDragAndDrop : public LLTool, public LLSingleton<LLToolDragAndDrop>
50{ 51{
@@ -55,7 +56,7 @@ public:
55 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); 56 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
56 virtual BOOL handleHover(S32 x, S32 y, MASK mask); 57 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
57 virtual BOOL handleKey(KEY key, MASK mask); 58 virtual BOOL handleKey(KEY key, MASK mask);
58 virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect *sticky_rect_screen); 59 virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky_rect_screen);
59 virtual void onMouseCaptureLost(); 60 virtual void onMouseCaptureLost();
60 virtual void handleDeselect(); 61 virtual void handleDeselect();
61 62
@@ -106,7 +107,7 @@ protected:
106 EAcceptance* acceptance); 107 EAcceptance* acceptance);
107 void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop, 108 void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop,
108 EAcceptance* acceptance); 109 EAcceptance* acceptance);
109 static void pickCallback(S32 x, S32 y, MASK mask); 110 static void pickCallback(const LLPickInfo& pick_info);
110 111
111protected: 112protected:
112 113
@@ -127,7 +128,7 @@ protected:
127 EAcceptance mLastAccept; 128 EAcceptance mLastAccept;
128 BOOL mDrop; 129 BOOL mDrop;
129 S32 mCurItemIndex; 130 S32 mCurItemIndex;
130 LLString mToolTipMsg; 131 std::string mToolTipMsg;
131 132
132 // array of pointers to functions that implement the logic to 133 // array of pointers to functions that implement the logic to
133 // dragging and dropping into the simulator. 134 // dragging and dropping into the simulator.
@@ -177,6 +178,9 @@ protected:
177 EAcceptance dad3dActivateGesture(LLViewerObject *obj, S32 face, 178 EAcceptance dad3dActivateGesture(LLViewerObject *obj, S32 face,
178 MASK mask, BOOL drop); 179 MASK mask, BOOL drop);
179 180
181 // set the LLToolDragAndDrop's cursor based on the given acceptance
182 ECursorType acceptanceToCursor( EAcceptance acceptance );
183
180 // This method converts mCargoID to an inventory item or 184 // This method converts mCargoID to an inventory item or
181 // folder. If no item or category is found, both pointers will be 185 // folder. If no item or category is found, both pointers will be
182 // returned NULL. 186 // returned NULL.
@@ -187,11 +191,10 @@ protected:
187 // LLViewerInventoryCategory::cat_array_t& cats, 191 // LLViewerInventoryCategory::cat_array_t& cats,
188 // LLViewerInventoryItem::item_array_t& items); 192 // LLViewerInventoryItem::item_array_t& items);
189 193
190 void createContainer(LLViewerInventoryItem::item_array_t &items, const char* preferred_name);
191 void dropObject(LLViewerObject* raycast_target, 194 void dropObject(LLViewerObject* raycast_target,
192 BOOL bypass_sim_raycast, 195 BOOL bypass_sim_raycast,
193 BOOL from_task_inventory, 196 BOOL from_task_inventory,
194 BOOL remove_from_inventory); 197 BOOL remove_from_inventory);
195 198
196 // accessor that looks at permissions, copyability, and names of 199 // accessor that looks at permissions, copyability, and names of
197 // inventory items to determine if a drop would be ok. 200 // inventory items to determine if a drop would be ok.
@@ -200,9 +203,9 @@ protected:
200 // deal with permissions of object, etc. returns TRUE if drop can 203 // deal with permissions of object, etc. returns TRUE if drop can
201 // proceed, otherwise FALSE. 204 // proceed, otherwise FALSE.
202 static BOOL handleDropTextureProtections(LLViewerObject* hit_obj, 205 static BOOL handleDropTextureProtections(LLViewerObject* hit_obj,
203 LLInventoryItem* item, 206 LLInventoryItem* item,
204 LLToolDragAndDrop::ESource source, 207 LLToolDragAndDrop::ESource source,
205 const LLUUID& src_id); 208 const LLUUID& src_id);
206 209
207 210
208 // give inventory item functionality 211 // give inventory item functionality
@@ -213,7 +216,7 @@ protected:
213 // give inventory category functionality 216 // give inventory category functionality
214 static void handleCopyProtectedCategory(S32 option, void* data); 217 static void handleCopyProtectedCategory(S32 option, void* data);
215 static void commitGiveInventoryCategory(const LLUUID& to_agent, 218 static void commitGiveInventoryCategory(const LLUUID& to_agent,
216 LLInventoryCategory* cat); 219 LLInventoryCategory* cat);
217public: 220public:
218 // helper functions 221 // helper functions
219 static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); } 222 static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); }