aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llresizebar.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llresizebar.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llresizebar.cpp')
-rw-r--r--linden/indra/llui/llresizebar.cpp42
1 files changed, 30 insertions, 12 deletions
diff --git a/linden/indra/llui/llresizebar.cpp b/linden/indra/llui/llresizebar.cpp
index e6ce03b..b4933bd 100644
--- a/linden/indra/llui/llresizebar.cpp
+++ b/linden/indra/llui/llresizebar.cpp
@@ -33,8 +33,6 @@
33 33
34#include "llresizebar.h" 34#include "llresizebar.h"
35 35
36//#include "llviewermenu.h"
37//#include "llviewerimagelist.h"
38#include "llmath.h" 36#include "llmath.h"
39#include "llui.h" 37#include "llui.h"
40#include "llmenugl.h" 38#include "llmenugl.h"
@@ -87,7 +85,7 @@ LLResizeBar::LLResizeBar( const LLString& name, LLView* resizing_view, const LLR
87 85
88BOOL LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask) 86BOOL LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask)
89{ 87{
90 if( mEnabled ) 88 if( getEnabled() )
91 { 89 {
92 // Route future Mouse messages here preemptively. (Release on mouse up.) 90 // Route future Mouse messages here preemptively. (Release on mouse up.)
93 // No handler needed for focus lost since this clas has no state that depends on it. 91 // No handler needed for focus lost since this clas has no state that depends on it.
@@ -119,15 +117,6 @@ BOOL LLResizeBar::handleMouseUp(S32 x, S32 y, MASK mask)
119 return handled; 117 return handled;
120} 118}
121 119
122EWidgetType LLResizeBar::getWidgetType() const
123{
124 return WIDGET_TYPE_RESIZE_BAR;
125}
126
127LLString LLResizeBar::getWidgetTag() const
128{
129 return LL_RESIZE_BAR_TAG;
130}
131 120
132BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) 121BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
133{ 122{
@@ -267,5 +256,34 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
267 } 256 }
268 257
269 return handled; 258 return handled;
259} // end LLResizeBar::handleHover
260
261BOOL LLResizeBar::handleDoubleClick(S32 x, S32 y, MASK mask)
262{
263 LLRect orig_rect = mResizingView->getRect();
264 LLRect scaled_rect = orig_rect;
265
266 if (mSnappingEnabled)
267 {
268 switch( mSide )
269 {
270 case LEFT:
271 mResizingView->findSnapEdge(scaled_rect.mLeft, LLCoordGL(0, 0), SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, S32_MAX);
272 break;
273 case TOP:
274 mResizingView->findSnapEdge(scaled_rect.mTop, LLCoordGL(0, 0), SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, S32_MAX);
275 break;
276 case RIGHT:
277 mResizingView->findSnapEdge(scaled_rect.mRight, LLCoordGL(0, 0), SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, S32_MAX);
278 break;
279 case BOTTOM:
280 mResizingView->findSnapEdge(scaled_rect.mBottom, LLCoordGL(0, 0), SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, S32_MAX);
281 break;
282 }
283 }
284
285 mResizingView->reshape(scaled_rect.getWidth(), scaled_rect.getHeight());
286 mResizingView->setOrigin(scaled_rect.mLeft, scaled_rect.mBottom);
287 return TRUE;
270} 288}
271 289