summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolgrab.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolgrab.h')
-rw-r--r--indra/newview/lltoolgrab.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index 5d24c8813e..02ed5c26d7 100644
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -45,12 +45,17 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick);
-
-class LLToolGrab : public LLTool, public LLSingleton<LLToolGrab>
+/**
+ * LLToolGrabBase contains most of the semantics of LLToolGrab. It's just that
+ * LLToolGrab is an LLSingleton, but we also explicitly instantiate
+ * LLToolGrabBase as part of LLToolCompGun. You can't just make an extra
+ * instance of an LLSingleton!
+ */
+class LLToolGrabBase : public LLTool
{
public:
- LLToolGrab( LLToolComposite* composite = NULL );
- ~LLToolGrab();
+ LLToolGrabBase(LLToolComposite* composite=NULL);
+ ~LLToolGrabBase();
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -140,10 +145,14 @@ private:
BOOL mClickedInMouselook;
};
+/// This is the LLSingleton instance of LLToolGrab.
+class LLToolGrab : public LLToolGrabBase, public LLSingleton<LLToolGrab>
+{
+ LLSINGLETON_EMPTY_CTOR(LLToolGrab);
+};
+
extern BOOL gGrabBtnVertical;
extern BOOL gGrabBtnSpin;
extern LLTool* gGrabTransientTool;
#endif // LL_TOOLGRAB_H
-
-