summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp35
1 files changed, 8 insertions, 27 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 0922de70af..1f71de1c87 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -279,7 +279,6 @@ void LLFloater::init(const LLString& title,
mRect.getHeight() - LLPANEL_BORDER_WIDTH - close_box_size);
mDragHandle = new LLDragHandleLeft("drag", drag_handle_rect, title );
}
- mDragHandle->setSaveToXML(false);
addChild(mDragHandle);
// Resize Handle
@@ -295,28 +294,24 @@ void LLFloater::init(const LLString& title,
"resizebar_left",
LLRect( 0, mRect.getHeight(), RESIZE_BAR_THICKNESS, 0),
min_width, min_height, LLResizeBar::LEFT );
- mResizeBar[0]->setSaveToXML(false);
addChild( mResizeBar[0] );
mResizeBar[1] = new LLResizeBar(
"resizebar_top",
LLRect( 0, mRect.getHeight(), mRect.getWidth(), mRect.getHeight() - RESIZE_BAR_THICKNESS),
min_width, min_height, LLResizeBar::TOP );
- mResizeBar[1]->setSaveToXML(false);
addChild( mResizeBar[1] );
mResizeBar[2] = new LLResizeBar(
"resizebar_right",
LLRect( mRect.getWidth() - RESIZE_BAR_THICKNESS, mRect.getHeight(), mRect.getWidth(), 0),
min_width, min_height, LLResizeBar::RIGHT );
- mResizeBar[2]->setSaveToXML(false);
addChild( mResizeBar[2] );
mResizeBar[3] = new LLResizeBar(
"resizebar_bottom",
LLRect( 0, RESIZE_BAR_THICKNESS, mRect.getWidth(), 0),
min_width, min_height, LLResizeBar::BOTTOM );
- mResizeBar[3]->setSaveToXML(false);
addChild( mResizeBar[3] );
@@ -327,7 +322,6 @@ void LLFloater::init(const LLString& title,
min_width,
min_height,
LLResizeHandle::RIGHT_BOTTOM);
- mResizeHandle[0]->setSaveToXML(false);
addChild(mResizeHandle[0]);
mResizeHandle[1] = new LLResizeHandle( "resize",
@@ -335,7 +329,6 @@ void LLFloater::init(const LLString& title,
min_width,
min_height,
LLResizeHandle::RIGHT_TOP );
- mResizeHandle[1]->setSaveToXML(false);
addChild(mResizeHandle[1]);
mResizeHandle[2] = new LLResizeHandle( "resize",
@@ -343,7 +336,6 @@ void LLFloater::init(const LLString& title,
min_width,
min_height,
LLResizeHandle::LEFT_BOTTOM );
- mResizeHandle[2]->setSaveToXML(false);
addChild(mResizeHandle[2]);
mResizeHandle[3] = new LLResizeHandle( "resize",
@@ -351,7 +343,6 @@ void LLFloater::init(const LLString& title,
min_width,
min_height,
LLResizeHandle::LEFT_TOP );
- mResizeHandle[3]->setSaveToXML(false);
addChild(mResizeHandle[3]);
}
else
@@ -463,14 +454,14 @@ void LLFloater::setVisible( BOOL visible )
if( !visible )
{
- if( gFocusMgr.childIsTopView( this ) )
+ if( gFocusMgr.childIsTopCtrl( this ) )
{
- gFocusMgr.setTopView(NULL, NULL);
+ gFocusMgr.setTopCtrl(NULL);
}
if( gFocusMgr.childHasMouseCapture( this ) )
{
- gFocusMgr.setMouseCapture(NULL, NULL);
+ gFocusMgr.setMouseCapture(NULL);
}
}
@@ -584,9 +575,9 @@ void LLFloater::close(bool app_quitting)
void LLFloater::releaseFocus()
{
- if( gFocusMgr.childIsTopView( this ) )
+ if( gFocusMgr.childIsTopCtrl( this ) )
{
- gFocusMgr.setTopView(NULL, NULL);
+ gFocusMgr.setTopCtrl(NULL);
}
if( gFocusMgr.childHasKeyboardFocus( this ) )
@@ -596,7 +587,7 @@ void LLFloater::releaseFocus()
if( gFocusMgr.childHasMouseCapture( this ) )
{
- gFocusMgr.setMouseCapture(NULL, NULL);
+ gFocusMgr.setMouseCapture(NULL);
}
}
@@ -1464,28 +1455,24 @@ void LLFloater::setCanResize(BOOL can_resize)
"resizebar_left",
LLRect( 0, mRect.getHeight(), RESIZE_BAR_THICKNESS, 0),
mMinWidth, mMinHeight, LLResizeBar::LEFT );
- mResizeBar[0]->setSaveToXML(false);
addChild( mResizeBar[0] );
mResizeBar[1] = new LLResizeBar(
"resizebar_top",
LLRect( 0, mRect.getHeight(), mRect.getWidth(), mRect.getHeight() - RESIZE_BAR_THICKNESS),
mMinWidth, mMinHeight, LLResizeBar::TOP );
- mResizeBar[1]->setSaveToXML(false);
addChild( mResizeBar[1] );
mResizeBar[2] = new LLResizeBar(
"resizebar_right",
LLRect( mRect.getWidth() - RESIZE_BAR_THICKNESS, mRect.getHeight(), mRect.getWidth(), 0),
mMinWidth, mMinHeight, LLResizeBar::RIGHT );
- mResizeBar[2]->setSaveToXML(false);
addChild( mResizeBar[2] );
mResizeBar[3] = new LLResizeBar(
"resizebar_bottom",
LLRect( 0, RESIZE_BAR_THICKNESS, mRect.getWidth(), 0),
mMinWidth, mMinHeight, LLResizeBar::BOTTOM );
- mResizeBar[3]->setSaveToXML(false);
addChild( mResizeBar[3] );
@@ -1496,7 +1483,6 @@ void LLFloater::setCanResize(BOOL can_resize)
mMinWidth,
mMinHeight,
LLResizeHandle::RIGHT_BOTTOM);
- mResizeHandle[0]->setSaveToXML(false);
addChild(mResizeHandle[0]);
mResizeHandle[1] = new LLResizeHandle( "resize",
@@ -1504,7 +1490,6 @@ void LLFloater::setCanResize(BOOL can_resize)
mMinWidth,
mMinHeight,
LLResizeHandle::RIGHT_TOP );
- mResizeHandle[1]->setSaveToXML(false);
addChild(mResizeHandle[1]);
mResizeHandle[2] = new LLResizeHandle( "resize",
@@ -1512,7 +1497,6 @@ void LLFloater::setCanResize(BOOL can_resize)
mMinWidth,
mMinHeight,
LLResizeHandle::LEFT_BOTTOM );
- mResizeHandle[2]->setSaveToXML(false);
addChild(mResizeHandle[2]);
mResizeHandle[3] = new LLResizeHandle( "resize",
@@ -1520,7 +1504,6 @@ void LLFloater::setCanResize(BOOL can_resize)
mMinWidth,
mMinHeight,
LLResizeHandle::LEFT_TOP );
- mResizeHandle[3]->setSaveToXML(false);
addChild(mResizeHandle[3]);
}
mResizable = can_resize;
@@ -2022,8 +2005,7 @@ void LLFloaterView::focusFrontFloater()
void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
{
S32 col = 0;
- LLRect snap_rect_local = getSnapRect();
- snap_rect_local.translate(-mRect.mLeft, -mRect.mBottom);
+ LLRect snap_rect_local = getLocalSnapRect();
for(S32 row = snap_rect_local.mBottom;
row < snap_rect_local.getHeight() - LLFLOATER_HEADER_SIZE;
row += LLFLOATER_HEADER_SIZE ) //loop rows
@@ -2146,8 +2128,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
S32 screen_width = getSnapRect().getWidth();
S32 screen_height = getSnapRect().getHeight();
// convert to local coordinate frame
- LLRect snap_rect_local = getSnapRect();
- snap_rect_local.translate(-mRect.mLeft, -mRect.mBottom);
+ LLRect snap_rect_local = getLocalSnapRect();
if( floater->isResizable() )
{