lltoolselectland.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLTOOLSELECTLAND_H
00033 #define LL_LLTOOLSELECTLAND_H
00034 
00035 #include "lltool.h"
00036 #include "v3dmath.h"
00037 
00038 class LLParcelSelection;
00039 
00040 class LLToolSelectLand
00041 :       public LLTool
00042 {
00043 public:
00044         LLToolSelectLand( );
00045         virtual ~LLToolSelectLand();
00046 
00047         /*virtual*/ BOOL                handleMouseDown(S32 x, S32 y, MASK mask);
00048         /*virtual*/ BOOL                handleDoubleClick(S32 x, S32 y, MASK mask);
00049         /*virtual*/ BOOL                handleMouseUp(S32 x, S32 y, MASK mask);
00050         /*virtual*/ BOOL                handleHover(S32 x, S32 y, MASK mask);
00051         /*virtual*/ void                render();                               // draw the select rectangle
00052         /*virtual*/ BOOL                isAlwaysRendered()              { return TRUE; }
00053 
00054         /*virtual*/ void                handleSelect();
00055         /*virtual*/ void                handleDeselect();
00056 
00057 protected:
00058         BOOL                    outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
00059         void                    roundXY(LLVector3d& vec);
00060 
00061 protected:
00062         LLVector3d              mDragStartGlobal;               // global coords
00063         LLVector3d              mDragEndGlobal;                 // global coords
00064         BOOL                    mDragEndValid;                  // is drag end a valid point in the world?
00065 
00066         S32                             mDragStartX;                    // screen coords, from left
00067         S32                             mDragStartY;                    // screen coords, from bottom
00068 
00069         S32                             mDragEndX;
00070         S32                             mDragEndY;
00071 
00072         BOOL                    mMouseOutsideSlop;              // has mouse ever gone outside slop region?
00073 
00074         LLVector3d              mWestSouthBottom;               // global coords, from drag
00075         LLVector3d              mEastNorthTop;                  // global coords, from drag
00076 
00077         BOOL                    mLastShowParcelOwners;  // store last Show Parcel Owners setting
00078         LLHandle<LLParcelSelection> mSelection;         // hold on to a parcel selection
00079 };
00080 
00081 extern LLToolSelectLand *gToolParcel;
00082 
00083 #endif

Generated on Thu Jul 1 06:09:22 2010 for Second Life Viewer by  doxygen 1.4.7