llresizehandle.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_RESIZEHANDLE_H
00033 #define LL_RESIZEHANDLE_H
00034 
00035 #include "stdtypes.h"
00036 #include "llview.h"
00037 #include "llimagegl.h"
00038 #include "llcoord.h"
00039 
00040 
00041 class LLResizeHandle : public LLView
00042 {
00043 public:
00044         enum ECorner { LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM };
00045 
00046         
00047         LLResizeHandle(const LLString& name, const LLRect& rect, S32 min_width, S32 min_height, ECorner corner = RIGHT_BOTTOM );
00048 
00049         virtual void    draw();
00050         virtual BOOL    handleHover(S32 x, S32 y, MASK mask);
00051         virtual BOOL    handleMouseDown(S32 x, S32 y, MASK mask);
00052         virtual BOOL    handleMouseUp(S32 x, S32 y, MASK mask);
00053 
00054         void                    setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; }
00055 
00056 private:
00057         BOOL                    pointInHandle( S32 x, S32 y );
00058 
00059         S32                             mDragLastScreenX;
00060         S32                             mDragLastScreenY;
00061         S32                             mLastMouseScreenX;
00062         S32                             mLastMouseScreenY;
00063         LLCoordGL               mLastMouseDir;
00064         LLPointer<LLUIImage>    mImage;
00065         S32                             mMinWidth;
00066         S32                             mMinHeight;
00067         const ECorner   mCorner;
00068 };
00069 
00070 const S32 RESIZE_HANDLE_HEIGHT = 16;
00071 const S32 RESIZE_HANDLE_WIDTH = 16;
00072 
00073 #endif  // LL_RESIZEHANDLE_H
00074 
00075 

Generated on Fri May 16 08:32:56 2008 for SecondLife by  doxygen 1.5.5