From 1f1afc253d31e0afc3a0de2718e31d03cfca7f43 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 30 Nov 2009 17:17:59 -0500 Subject: INFRASTRUCTURE: LLToolDragAndDrop cleanup Includes removal of unused header files. Includes changing big static map into a lldictionary. --HG-- branch : avatar-pipeline --- indra/newview/lltooldraganddrop.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/lltooldraganddrop.h') 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, + public LLDictionary + { + public: + LLDragAndDropDictionary(); + dragOrDrop3dImpl get(EDragAndDropType dad_type, EDropTarget drop_target); + }; }; // utility functions -- cgit v1.2.3