llresizebar.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_RESIZEBAR_H
00033 #define LL_RESIZEBAR_H
00034 
00035 #include "llview.h"
00036 #include "llcoord.h"
00037 
00038 class LLResizeBar : public LLView
00039 {
00040 public:
00041         enum Side { LEFT, TOP, RIGHT, BOTTOM };
00042 
00043         LLResizeBar(const LLString& name, LLView* resizing_view, const LLRect& rect, S32 min_size, S32 max_size, Side side );
00044 
00045         virtual EWidgetType getWidgetType() const;
00046         virtual LLString getWidgetTag() const;
00047 
00048 //      virtual void    draw();  No appearance
00049         virtual BOOL    handleHover(S32 x, S32 y, MASK mask);
00050         virtual BOOL    handleMouseDown(S32 x, S32 y, MASK mask);
00051         virtual BOOL    handleMouseUp(S32 x, S32 y, MASK mask);
00052 
00053         void                    setResizeLimits( S32 min_size, S32 max_size ) { mMinSize = min_size; mMaxSize = max_size; }
00054         void                    setEnableSnapping(BOOL enable) { mSnappingEnabled = enable; }
00055 
00056 protected:
00057         S32                             mDragLastScreenX;
00058         S32                             mDragLastScreenY;
00059         S32                             mLastMouseScreenX;
00060         S32                             mLastMouseScreenY;
00061         LLCoordGL               mLastMouseDir;
00062         S32                             mMinSize;
00063         S32                             mMaxSize;
00064         Side                    mSide;
00065         BOOL                    mSnappingEnabled;
00066         LLView*                 mResizingView;
00067 };
00068 
00069 const S32 RESIZE_BAR_HEIGHT = 3;
00070 
00071 #endif  // LL_RESIZEBAR_H
00072 
00073 

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