uifw/AvKon/src/aknnavi.cpp
branchCompilerCompatibility
changeset 8 b57f3d42a10e
parent 4 8ca85d2f0db7
child 9 aabf2c525e0f
equal deleted inserted replaced
6:05fbbb041e1f 8:b57f3d42a10e
     1 /*
     1 /*
     2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1394                  CAknNavigationDecorator::ENaviVolume )
  1394                  CAknNavigationDecorator::ENaviVolume )
  1395             {
  1395             {
  1396             // Volume popup's position must be set here.
  1396             // Volume popup's position must be set here.
  1397             iNaviPaneControls->At( last )->iDecoratedControl->SetRect(
  1397             iNaviPaneControls->At( last )->iDecoratedControl->SetRect(
  1398                 VolumePopupRect() );
  1398                 VolumePopupRect() );
  1399             if( last - 1 >= 0 )
  1399             if( last - 1 >= 0 && iNaviPaneControls->At( last - 1 ) )
  1400             	{
  1400             	{
  1401             		iNaviPaneControls->At( last - 1 )->SetRect( rect );
  1401             		iNaviPaneControls->At( last - 1 )->SetRect( rect );
  1402             	}
  1402             	}
  1403             }
  1403             }
  1404         else
  1404         else
  1582     if ( iExtension->iIsActiveIdle )
  1582     if ( iExtension->iIsActiveIdle )
  1583         {
  1583         {
  1584         return;
  1584         return;
  1585         }
  1585         }
  1586 
  1586 
       
  1587     // Don't allow normal background drawing if
       
  1588     // background is already drawn with a background drawer.
       
  1589     TBool drawBackground( ETrue );
       
  1590     const MCoeControlBackground* backgroundDrawer = FindBackground();
       
  1591     if ( backgroundDrawer )
       
  1592         {
       
  1593         drawBackground = EFalse;
       
  1594         }
       
  1595 
  1587     CWindowGc& gc = SystemGc();
  1596     CWindowGc& gc = SystemGc();
  1588 
  1597 
  1589     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
  1598     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
  1590 
  1599 
  1591     if( !skin )
  1600     if( !skin )
  1605         {
  1614         {
  1606         //
  1615         //
  1607         // - Navi wipe is never used
  1616         // - Navi wipe is never used
  1608         // - No offset in right, left or top
  1617         // - No offset in right, left or top
  1609         //
  1618         //
  1610         if( !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1619         if ( drawBackground &&
       
  1620              !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1611             {
  1621             {
  1612             gc.SetPenStyle( CGraphicsContext::ENullPen );
  1622             gc.SetPenStyle( CGraphicsContext::ENullPen );
  1613             gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1623             gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1614             gc.SetBrushColor(
  1624             gc.SetBrushColor(
  1615                 AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1625                 AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1631         gc.SetPenStyle( CGraphicsContext::ENullPen );
  1641         gc.SetPenStyle( CGraphicsContext::ENullPen );
  1632         gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1642         gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1633         gc.SetBrushColor(
  1643         gc.SetBrushColor(
  1634             AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1644             AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1635 
  1645 
  1636         if( !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1646         if ( drawBackground &&
       
  1647              !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1637             {
  1648             {
  1638             gc.DrawRect( rect );
  1649             gc.DrawRect( rect );
  1639             }
  1650             }
  1640         return;
  1651         return;
  1641         }
  1652         }
  1646         {
  1657         {
  1647         //
  1658         //
  1648         // - Navi wipe is never used
  1659         // - Navi wipe is never used
  1649         // - No offset in right, left or top
  1660         // - No offset in right, left or top
  1650         //
  1661         //
  1651         if( !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1662         if ( drawBackground &&
       
  1663              !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
  1652             {
  1664             {
  1653             gc.SetPenStyle( CGraphicsContext::ENullPen );
  1665             gc.SetPenStyle( CGraphicsContext::ENullPen );
  1654             gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1666             gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
  1655             gc.SetBrushColor(
  1667             gc.SetBrushColor(
  1656                 AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1668                 AKN_LAF_COLOR( KStatusPaneBackgroundGraphicsColorUsual ) );
  1746     //
  1758     //
  1747     // Navi pane is located in NORMAL STATUSPANE
  1759     // Navi pane is located in NORMAL STATUSPANE
  1748     //
  1760     //
  1749     else
  1761     else
  1750         {
  1762         {
  1751         TBool naviWipeUsed = NaviWipeUsed();
  1763         if ( drawBackground )
  1752 
  1764             {
  1753         TBool skinnedNaviWipeDrawn  = EFalse;
  1765             TBool naviWipeUsed = NaviWipeUsed();
  1754         TBool skinnedNaviSolidDrawn = EFalse;
  1766 
  1755         TBool defaultNaviWipeDrawn  = EFalse;
  1767             TBool skinnedNaviWipeDrawn  = EFalse;
  1756         TBool defaultNaviSolidDrawn = EFalse;
  1768             TBool skinnedNaviSolidDrawn = EFalse;
  1757 
  1769             TBool defaultNaviWipeDrawn  = EFalse;
  1758         // If naviwipe is to be used, try first skinned draw...
  1770             TBool defaultNaviSolidDrawn = EFalse;
  1759         if ( naviWipeUsed )
  1771 
  1760             {
  1772             // If naviwipe is to be used, try first skinned draw...
  1761             skinnedNaviWipeDrawn = DrawSkinnedNaviWipe( gc, rect, skin, cc );
  1773             if ( naviWipeUsed )
  1762             }
  1774                 {
  1763 
  1775                 skinnedNaviWipeDrawn = DrawSkinnedNaviWipe( gc, rect, skin, cc );
  1764         // If naviwipe is to be used and skinned draw failed,
  1776                 }
  1765         // draw default wipe draw...
  1777 
  1766         if ( naviWipeUsed && !skinnedNaviWipeDrawn )
  1778             // If naviwipe is to be used and skinned draw failed,
  1767             {
  1779             // draw default wipe draw...
  1768             defaultNaviWipeDrawn = DrawDefaultNaviWipe( gc, rect );
  1780             if ( naviWipeUsed && !skinnedNaviWipeDrawn )
  1769             }
  1781                 {
  1770 
  1782                 defaultNaviWipeDrawn = DrawDefaultNaviWipe( gc, rect );
  1771         // If naviwipe is not to be drawn or the nawiwipe draws has failed for
  1783                 }
  1772         // some reason then draw solid. Try skinned solid draw first...
  1784 
  1773         if ( !skinnedNaviWipeDrawn && !defaultNaviWipeDrawn )
  1785             // If naviwipe is not to be drawn or the nawiwipe draws has failed for
  1774             {
  1786             // some reason then draw solid. Try skinned solid draw first...
  1775             skinnedNaviSolidDrawn = DrawSkinnedNaviSolid( gc, rect, skin, cc );
  1787             if ( !skinnedNaviWipeDrawn && !defaultNaviWipeDrawn )
  1776             }
  1788                 {
  1777 
  1789                 skinnedNaviSolidDrawn = DrawSkinnedNaviSolid( gc, rect, skin, cc );
  1778         // If not any above is the case, then draw the default solid here.
  1790                 }
  1779         if ( !skinnedNaviWipeDrawn &&
  1791 
  1780              !defaultNaviWipeDrawn &&
  1792             // If not any above is the case, then draw the default solid here.
  1781              !skinnedNaviSolidDrawn &&
  1793             if ( !skinnedNaviWipeDrawn &&
  1782              !defaultNaviSolidDrawn )
  1794                  !defaultNaviWipeDrawn &&
  1783             {
  1795                  !skinnedNaviSolidDrawn &&
  1784             defaultNaviSolidDrawn = DrawDefaultNaviSolid( gc, rect );
  1796                  !defaultNaviSolidDrawn )
       
  1797                 {
       
  1798                 defaultNaviSolidDrawn = DrawDefaultNaviSolid( gc, rect );
       
  1799                 }
  1785             }
  1800             }
  1786         }
  1801         }
  1787     }
  1802     }
  1788 
  1803 
  1789 
  1804