summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum <none@none>2009-10-21 11:01:11 -0700
committercallum <none@none>2009-10-21 11:01:11 -0700
commit2528d3a75f6478e0c179d542b6e74a518628a624 (patch)
tree0fbe8e5f9a1848cf5c812f5b9dbbc43082e07154 /indra/newview
parent19d23352bd955406b23f19959de71f717dceb798 (diff)
Test code to allow drag/drop of *file* (not URLs) into the viewer Window - Will not be pushed to main repository - only committed so I can bundle my changes and share
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp14
-rw-r--r--indra/newview/llviewerwindow.h3
2 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c659e58e47..2bda6eddbc 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -815,6 +815,20 @@ BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MAS
// Always handled as far as the OS is concerned.
return TRUE;
}
+
+BOOL LLViewerWindow::handleDrop(LLWindow *window, LLCoordGL pos, MASK mask, void* data)
+{
+ LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ );
+
+ LLUUID object_id = pick_info.getObjectID();
+ S32 object_face = pick_info.mObjectFace;
+ std::string url = std::string( (char*)data );
+
+ llinfos << "### Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << llendl;
+
+ // Always handled as far as the OS is concerned.
+ return TRUE;
+}
BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index d7c403739e..44704b99e3 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -170,7 +170,8 @@ public:
/*virtual*/ BOOL handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ BOOL handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ BOOL handleDrop(LLWindow *window, LLCoordGL pos, MASK mask, void* data);
+ void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ void handleMouseLeave(LLWindow *window);
/*virtual*/ void handleResize(LLWindow *window, S32 x, S32 y);
/*virtual*/ void handleFocus(LLWindow *window);