summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltooldraganddrop.h')
-rw-r--r--indra/newview/lltooldraganddrop.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index e1536acf75..79b2bc32a3 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -33,6 +33,7 @@
#ifndef LL_TOOLDRAGANDDROP_H
#define LL_TOOLDRAGANDDROP_H
+#include "lldictionary.h"
#include "lltool.h"
#include "llview.h"
#include "lluuid.h"
@@ -102,6 +103,7 @@ protected:
DT_COUNT = 5
};
+protected:
// dragOrDrop3dImpl points to a member of LLToolDragAndDrop that
// takes parameters (LLViewerObject* obj, S32 face, MASK, BOOL
// drop) and returns a BOOL if drop is ok
@@ -112,7 +114,9 @@ protected:
EAcceptance* acceptance);
void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop,
EAcceptance* acceptance);
+
static void pickCallback(const LLPickInfo& pick_info);
+ void pick(const LLPickInfo& pick_info);
protected:
@@ -137,10 +141,6 @@ protected:
enddrag_signal_t mEndDragSignal;
- // array of pointers to functions that implement the logic to
- // dragging and dropping into the simulator.
- static dragOrDrop3dImpl sDragAndDrop3d[DAD_COUNT][DT_COUNT];
-
protected:
// 3d drop functions. these call down into the static functions
// named drop<ThingToDrop> if drop is TRUE and permissions allow
@@ -272,6 +272,25 @@ public:
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept);
+
+ // Classes used for determining 3d drag and drop types.
+private:
+ struct DragAndDropEntry : public LLDictionaryEntry
+ {
+ DragAndDropEntry(dragOrDrop3dImpl f_none,
+ dragOrDrop3dImpl f_self,
+ dragOrDrop3dImpl f_avatar,
+ dragOrDrop3dImpl f_object,
+ dragOrDrop3dImpl f_land);
+ dragOrDrop3dImpl mFunctions[DT_COUNT];
+ };
+ class LLDragAndDropDictionary : public LLSingleton<LLDragAndDropDictionary>,
+ public LLDictionary<EDragAndDropType, DragAndDropEntry>
+ {
+ public:
+ LLDragAndDropDictionary();
+ dragOrDrop3dImpl get(EDragAndDropType dad_type, EDropTarget drop_target);
+ };
};
// utility functions