summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.h
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-30 17:17:59 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-30 17:17:59 -0500
commit1f1afc253d31e0afc3a0de2718e31d03cfca7f43 (patch)
tree6dfb0ddaf4569d4fc0aafb80ec3ae753a121a31a /indra/newview/lltooldraganddrop.h
parent7e2b88a32b0bed07abcf760bd0adf3403ec2ede2 (diff)
INFRASTRUCTURE: LLToolDragAndDrop cleanup
Includes removal of unused header files. Includes changing big static map into a lldictionary. --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lltooldraganddrop.h')
-rw-r--r--indra/newview/lltooldraganddrop.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index e1536acf75..7f352db15f 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:
@@ -272,6 +276,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