00001
00032 #ifndef LL_TOOLPIE_H
00033 #define LL_TOOLPIE_H
00034
00035 #include "lltool.h"
00036 #include "lluuid.h"
00037
00038 class LLViewerObject;
00039 class LLObjectSelection;
00040
00041 class LLToolPie
00042 : public LLTool
00043 {
00044 public:
00045 LLToolPie( );
00046
00047 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
00048 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
00049 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
00050 virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
00051 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
00052 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
00053
00054 virtual void render();
00055
00056 virtual void stopEditing();
00057
00058 virtual void onMouseCaptureLost();
00059 virtual void handleDeselect();
00060 virtual LLTool* getOverrideTool(MASK mask);
00061
00062 static void leftMouseCallback(S32 x, S32 y, MASK mask);
00063 static void rightMouseCallback(S32 x, S32 y, MASK mask);
00064
00065 static void selectionPropertiesReceived();
00066
00067 protected:
00068 BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
00069 BOOL pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL edit_menu);
00070 BOOL useClickAction(BOOL always_show, MASK mask, LLViewerObject* object,
00071 LLViewerObject* parent);
00072
00073 protected:
00074 BOOL mPieMouseButtonDown;
00075 BOOL mGrabMouseButtonDown;
00076 BOOL mHitLand;
00077 LLUUID mHitObjectID;
00078 BOOL mMouseOutsideSlop;
00079 static LLPointer<LLViewerObject> sClickActionObject;
00080 static U8 sClickAction;
00081 static LLHandle<LLObjectSelection> sLeftClickSelection;
00082 };
00083
00084 extern LLToolPie *gToolPie;
00085
00086 #endif