m_movingWindows.clear();
buildDependSet( m_movingWindows, &rWindow );
-#ifdef WIN32
- if( config_GetInt( getIntf(), "skins2-transparency" ) )
+ if( var_InheritBool( getIntf(), "skins2-transparency" ) )
{
// Change the opacity of the moving windows
WinSet_t::const_iterator it;
- for( it = m_movingWindows.begin(); it != m_movingWindows.end(); it++ )
+ for( it = m_movingWindows.begin(); it != m_movingWindows.end(); ++it )
{
(*it)->setOpacity( m_moveAlpha );
}
// FIXME: We need to refresh the windows, because if 2 windows overlap
// and one of them becomes transparent, the other one is not refreshed
// automatically. I don't know why... -- Ipkiss
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
(*it)->refresh( 0, 0, (*it)->getWidth(), (*it)->getHeight() );
}
}
-#endif
}
WinSet_t::const_iterator itWin1, itWin2;
AncList_t::const_iterator itAnc1, itAnc2;
-#ifdef WIN32
- if( config_GetInt( getIntf(), "skins2-transparency" ) )
+ if( var_InheritBool( getIntf(), "skins2-transparency" ) )
{
// Restore the opacity of the moving windows
WinSet_t::const_iterator it;
- for( it = m_movingWindows.begin(); it != m_movingWindows.end(); it++ )
+ for( it = m_movingWindows.begin(); it != m_movingWindows.end(); ++it )
{
(*it)->setOpacity( m_alpha );
}
}
-#endif
// Delete the dependencies
m_dependencies.clear();
// Now we rebuild the dependencies.
// Iterate through all the windows
- for( itWin1 = m_allWindows.begin(); itWin1 != m_allWindows.end(); itWin1++ )
+ for( itWin1 = m_allWindows.begin(); itWin1 != m_allWindows.end(); ++itWin1 )
{
// Get the anchors of the layout associated to the window
const AncList_t &ancList1 =
(*itWin1)->getActiveLayout().getAnchorList();
// Iterate through all the windows, starting with (*itWin1)
- for( itWin2 = itWin1; itWin2 != m_allWindows.end(); itWin2++ )
+ for( itWin2 = itWin1; itWin2 != m_allWindows.end(); ++itWin2 )
{
// A window can't anchor itself...
if( (*itWin2) == (*itWin1) )
// Now, check for anchoring between the 2 windows
const AncList_t &ancList2 =
(*itWin2)->getActiveLayout().getAnchorList();
- for( itAnc1 = ancList1.begin(); itAnc1 != ancList1.end(); itAnc1++ )
+ for( itAnc1 = ancList1.begin(); itAnc1 != ancList1.end(); ++itAnc1 )
{
for( itAnc2 = ancList2.begin();
- itAnc2 != ancList2.end(); itAnc2++ )
+ itAnc2 != ancList2.end(); ++itAnc2 )
{
if( (*itAnc1)->isHanging( **itAnc2 ) )
{
// Move all the windows
WinSet_t::const_iterator it;
- for( it = m_movingWindows.begin(); it != m_movingWindows.end(); it++ )
+ for( it = m_movingWindows.begin(); it != m_movingWindows.end(); ++it )
{
(*it)->move( (*it)->getLeft() + xOffset, (*it)->getTop() + yOffset );
}
// Iterate through all the hanged windows
for( itWin = m_dependencies[rLayout.getWindow()].begin();
- itWin != m_dependencies[rLayout.getWindow()].end(); itWin++ )
+ itWin != m_dependencies[rLayout.getWindow()].end(); ++itWin )
{
// Now, check for anchoring between the 2 windows
const AncList_t &ancList2 =
(*itWin)->getActiveLayout().getAnchorList();
- for( itAnc1 = ancList1.begin(); itAnc1 != ancList1.end(); itAnc1++ )
+ for( itAnc1 = ancList1.begin(); itAnc1 != ancList1.end(); ++itAnc1 )
{
for( itAnc2 = ancList2.begin();
- itAnc2 != ancList2.end(); itAnc2++ )
+ itAnc2 != ancList2.end(); ++itAnc2 )
{
if( (*itAnc1)->isHanging( **itAnc2 ) )
{
if( m_direction == kResizeE ||
m_direction == kResizeSE )
{
- for( it = m_resizeMovingE.begin(); it != m_resizeMovingE.end(); it++ )
+ for( it = m_resizeMovingE.begin(); it != m_resizeMovingE.end(); ++it )
{
(*it)->move( (*it)->getLeft() + xNewOffset,
(*it)->getTop() );
if( m_direction == kResizeE ||
m_direction == kResizeSE )
{
- for( it = m_resizeMovingS.begin(); it != m_resizeMovingS.end(); it++ )
+ for( it = m_resizeMovingS.begin(); it != m_resizeMovingS.end(); ++it )
{
(*it)->move( (*it)->getLeft(),
(*it)->getTop( )+ yNewOffset );
m_direction == kResizeS ||
m_direction == kResizeSE )
{
- for( it = m_resizeMovingSE.begin(); it != m_resizeMovingSE.end(); it++ )
+ for( it = m_resizeMovingSE.begin(); it != m_resizeMovingSE.end(); ++it )
{
(*it)->move( (*it)->getLeft() + xNewOffset,
(*it)->getTop() + yNewOffset );
void WindowManager::maximize( TopWindow &rWindow )
{
// Save the current position/size of the window, to be able to restore it
- m_maximizeRect = Rect( rWindow.getLeft(), rWindow.getTop(),
- rWindow.getLeft() + rWindow.getWidth(),
- rWindow.getTop() + rWindow.getHeight() );
+ m_maximizeRect = SkinsRect( rWindow.getLeft(), rWindow.getTop(),
+ rWindow.getLeft() + rWindow.getWidth(),
+ rWindow.getTop() + rWindow.getHeight() );
- Rect workArea = OSFactory::instance( getIntf() )->getWorkArea();
+ SkinsRect workArea = OSFactory::instance( getIntf() )->getWorkArea();
// Move the window
startMove( rWindow );
move( rWindow, workArea.getLeft(), workArea.getTop() );
void WindowManager::synchVisibility() const
{
WinSet_t::const_iterator it;
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
// Show the window if it has to be visible
if( (*it)->getVisibleVar().get() )
{
WinSet_t::const_iterator it;
m_savedWindows.clear();
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
// Remember the window if it is visible
if( (*it)->getVisibleVar().get() )
}
WinSet_t::const_iterator it;
- for( it = m_savedWindows.begin(); it != m_savedWindows.end(); it++)
+ for( it = m_savedWindows.begin(); it != m_savedWindows.end(); ++it )
{
(*it)->show();
}
{
// Raise all the windows
WinSet_t::const_iterator it;
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
(*it)->raise();
}
{
// Show all the windows
WinSet_t::const_iterator it;
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
// When the theme is opened for the first time,
// only show the window if set as visible in the XML
{
(*it)->show();
}
- (*it)->setOpacity( m_alpha );
}
}
void WindowManager::hideAll() const
{
WinSet_t::const_iterator it;
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
(*it)->hide();
}
}
-void WindowManager::toggleOnTop()
+void WindowManager::setOnTop( bool b_ontop )
{
// Update the boolean variable
VarBoolImpl *pVarOnTop = (VarBoolImpl*)m_cVarOnTop.get();
- pVarOnTop->set( !pVarOnTop->get() );
+ pVarOnTop->set( b_ontop );
- // Toggle the "on top" status
+ // set/unset the "on top" status
WinSet_t::const_iterator it;
- for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
+ for( it = m_allWindows.begin(); it != m_allWindows.end(); ++it )
{
- (*it)->toggleOnTop( pVarOnTop->get() );
+ (*it)->toggleOnTop( b_ontop );
}
}
+void WindowManager::toggleOnTop()
+{
+ VarBoolImpl *pVarOnTop = (VarBoolImpl*)m_cVarOnTop.get();
+
+ setOnTop( !pVarOnTop->get() );
+}
+
+
void WindowManager::buildDependSet( WinSet_t &rWinSet,
TopWindow *pWindow )
{
// Iterate through the anchored windows
const WinSet_t &anchored = m_dependencies[pWindow];
WinSet_t::const_iterator iter;
- for( iter = anchored.begin(); iter != anchored.end(); iter++ )
+ for( iter = anchored.begin(); iter != anchored.end(); ++iter )
{
// Check that the window isn't already in the set before adding it
if( rWinSet.find( *iter ) == rWinSet.end() )
AncList_t::const_iterator itAncMov, itAncSta;
// Check magnetism with screen edges first (actually it is the work area)
- Rect workArea = OSFactory::instance( getIntf() )->getWorkArea();
+ SkinsRect workArea = OSFactory::instance( getIntf() )->getWorkArea();
// Iterate through the moving windows
for( itMov = m_movingWindows.begin();
- itMov != m_movingWindows.end(); itMov++ )
+ itMov != m_movingWindows.end(); ++itMov )
{
// Skip the invisible windows
if( ! (*itMov)->getVisibleVar().get() )
// Iterate through the moving windows
for( itMov = m_movingWindows.begin();
- itMov != m_movingWindows.end(); itMov++ )
+ itMov != m_movingWindows.end(); ++itMov )
{
// Skip the invisible windows
if( ! (*itMov)->getVisibleVar().get() )
// Iterate through the static windows
for( itSta = m_allWindows.begin();
- itSta != m_allWindows.end(); itSta++ )
+ itSta != m_allWindows.end(); ++itSta )
{
// Skip the moving windows and the invisible ones
if( m_movingWindows.find( (*itSta) ) != m_movingWindows.end() ||
// Check if there is an anchoring between one of the movAnchors
// and one of the staAnchors
for( itAncMov = movAnchors.begin();
- itAncMov != movAnchors.end(); itAncMov++ )
+ itAncMov != movAnchors.end(); ++itAncMov )
{
for( itAncSta = staAnchors.begin();
- itAncSta != staAnchors.end(); itAncSta++ )
+ itAncSta != staAnchors.end(); ++itAncSta )
{
if( (*itAncSta)->canHang( **itAncMov, xOffset, yOffset ) )
{
// Rebuild the dependencies
stopMove();
}
+