diff options
Diffstat (limited to 'indra/newview/lltoolselectrect.h')
-rw-r--r-- | indra/newview/lltoolselectrect.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/indra/newview/lltoolselectrect.h b/indra/newview/lltoolselectrect.h new file mode 100644 index 0000000000..fb6355460e --- /dev/null +++ b/indra/newview/lltoolselectrect.h @@ -0,0 +1,44 @@ +/** + * @file lltoolselectrect.h + * @brief A tool to select multiple objects with a screen-space rectangle. + * + * Copyright (c) 2001-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +#ifndef LL_LLTOOLSELECTRECT_H +#define LL_LLTOOLSELECTRECT_H + +#include "lltool.h" +#include "lltoolselect.h" + +class LLToolSelectRect +: public LLToolSelect +{ +public: + LLToolSelectRect( LLToolComposite* composite ); + + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleHover(S32 x, S32 y, MASK mask); + virtual void draw(); // draw the select rectangle + +protected: + void handleRectangleSelection(S32 x, S32 y, MASK mask); // true if you selected one + BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); + +protected: + S32 mDragStartX; // screen coords, from left + S32 mDragStartY; // screen coords, from bottom + + S32 mDragEndX; + S32 mDragEndY; + + S32 mDragLastWidth; + S32 mDragLastHeight; + + BOOL mMouseOutsideSlop; // has mouse ever gone outside slop region? +}; + + +#endif |