diff options
Diffstat (limited to 'indra/llui/llresizebar.h')
-rwxr-xr-x[-rw-r--r--] | indra/llui/llresizebar.h | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 0725fbd846..20a2406484 100644..100755 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -28,7 +28,6 @@ #define LL_RESIZEBAR_H #include "llview.h" -#include "llcoord.h" class LLResizeBar : public LLView { @@ -45,23 +44,15 @@ public: Optional<bool> snapping_enabled; Optional<bool> allow_double_click_snapping; - Params() - : max_size("max_size", S32_MAX), - snapping_enabled("snapping_enabled", true), - resizing_view("resizing_view"), - side("side"), - allow_double_click_snapping("allow_double_click_snapping", true) - { - name = "resize_bar"; - } + Params(); }; protected: LLResizeBar(const LLResizeBar::Params& p); friend class LLUICtrlFactory; + public: -// virtual void draw(); No appearance virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -70,19 +61,26 @@ public: void setResizeLimits( S32 min_size, S32 max_size ) { mMinSize = min_size; mMaxSize = max_size; } void setEnableSnapping(BOOL enable) { mSnappingEnabled = enable; } void setAllowDoubleClickSnapping(BOOL allow) { mAllowDoubleClickSnapping = allow; } + bool canResize() { return getEnabled() && mMaxSize > mMinSize; } + void setResizeListener(boost::function<void(void*)> listener) {mResizeListener = listener;} + void setImagePanel(LLPanel * panelp); + LLPanel * getImagePanel() const; private: - S32 mDragLastScreenX; - S32 mDragLastScreenY; - S32 mLastMouseScreenX; - S32 mLastMouseScreenY; - LLCoordGL mLastMouseDir; - S32 mMinSize; - S32 mMaxSize; - const Side mSide; - BOOL mSnappingEnabled; - BOOL mAllowDoubleClickSnapping; - LLView* mResizingView; + S32 mDragLastScreenX; + S32 mDragLastScreenY; + S32 mLastMouseScreenX; + S32 mLastMouseScreenY; + LLCoordGL mLastMouseDir; + S32 mMinSize; + S32 mMaxSize; + const Side mSide; + bool mSnappingEnabled, + mAllowDoubleClickSnapping; + LLView* mResizingView; + boost::function<void(void*)> mResizeListener; + LLPointer<LLUIImage> mDragHandleImage; + LLPanel * mImagePanel; }; #endif // LL_RESIZEBAR_H |