From 0193a7b74ccc09788e8d2503244f30ac231546cc Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Tue, 16 Apr 2013 04:55:09 +0300 Subject: CHUI-808 FIXED Draggable separator between conversations and message pane is not discoverable: - final solution; --- indra/llui/llresizebar.h | 52 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'indra/llui/llresizebar.h') diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 8190a95a71..bcf8ea0b40 100644 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -27,15 +27,14 @@ #ifndef LL_RESIZEBAR_H #define LL_RESIZEBAR_H -#include "llview.h" -#include "llcoord.h" +#include "llpanel.h" -class LLResizeBar : public LLView +class LLResizeBar : public LLPanel { public: enum Side { LEFT, TOP, RIGHT, BOTTOM }; - struct Params : public LLInitParam::Block + struct Params : public LLInitParam::Block { Mandatory resizing_view; Mandatory side; @@ -44,24 +43,19 @@ public: Optional max_size; Optional snapping_enabled; Optional allow_double_click_snapping; + Optional show_drag_handle; - 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; + + /*virtual*/ BOOL postBuild(); public: -// virtual void draw(); No appearance + virtual void draw(); 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); @@ -72,20 +66,26 @@ public: void setAllowDoubleClickSnapping(BOOL allow) { mAllowDoubleClickSnapping = allow; } bool canResize() { return getEnabled() && mMaxSize > mMinSize; } void setResizeListener(boost::function listener) {mResizeListener = listener;} + BOOL isShowDragHandle() const { return mShowDragHandle; } + 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; - boost::function mResizeListener; + S32 mDragLastScreenX; + S32 mDragLastScreenY; + S32 mLastMouseScreenX; + S32 mLastMouseScreenY; + LLCoordGL mLastMouseDir; + S32 mMinSize; + S32 mMaxSize; + const Side mSide; + BOOL mSnappingEnabled; + BOOL mAllowDoubleClickSnapping; + BOOL mShowDragHandle; + LLView* mResizingView; + boost::function mResizeListener; + LLPointer mDragHandleImage; + LLPanel * mImagePanel; }; #endif // LL_RESIZEBAR_H -- cgit v1.2.3