uifw/EikStd/coctlsrc/eikspmod.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 18 0aa5fbdfbc30
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
     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".
   618 	            case EEikStatusPaneUidBattery: 
   618 	            case EEikStatusPaneUidBattery: 
   619 	                {
   619 	                {
   620 	                if (Layout_Meta_Data::IsLandscapeOrientation())
   620 	                if (Layout_Meta_Data::IsLandscapeOrientation())
   621 	                     {
   621 	                     {
   622 	                     TAknLayoutRect layoutRect;
   622 	                     TAknLayoutRect layoutRect;
   623 	                     TAknWindowComponentLayout parentLayout = aknLayoutScalable_Avkon.area_top_pane(8);
   623 	                     layoutRect.LayoutRect(
   624 	                     layoutRect.LayoutRect(screenRect, parentLayout.LayoutLine());
   624 	                         screenRect,
       
   625 	                         aknLayoutScalable_Avkon.area_top_pane( 2 ) );
   625 	                     parentRect = layoutRect.Rect();
   626 	                     parentRect = layoutRect.Rect();
   626 	                     layout = aknLayoutScalable_Avkon.battery_pane(2).LayoutLine();
   627 	                     layout = aknLayoutScalable_Avkon.battery_pane( 14 ).LayoutLine();
   627 	                     }
   628 	                     }
   628 	                 else
   629 	                 else
   629 	                     {
   630 	                     {
   630 	                     parentRect = usualStatusPaneRect;
   631 	                     parentRect = usualStatusPaneRect;
   631 	                     layout = aknLayout.battery_pane(parentRect);
   632 	                     layout = aknLayout.battery_pane(parentRect);
  1362             if ( Layout_Meta_Data::IsLandscapeOrientation() ) // only usable in landscape
  1363             if ( Layout_Meta_Data::IsLandscapeOrientation() ) // only usable in landscape
  1363 	            {
  1364 	            {
  1364                 TAknLayoutRect layout1ParentRect;
  1365                 TAknLayoutRect layout1ParentRect;
  1365                 layout1ParentRect.LayoutRect(
  1366                 layout1ParentRect.LayoutRect(
  1366                     iLayout->iApplicationWindowRect,
  1367                     iLayout->iApplicationWindowRect,
  1367                     iLayout->iAknLayoutScalable_Avkon.area_top_pane( 19 ).LayoutLine() );
  1368                     iLayout->iAknLayoutScalable_Avkon.area_top_pane( 2 ).LayoutLine() );
  1368                 TAknLayoutRect layout1Rect;
  1369                 TAknLayoutRect layout1Rect;
  1369                 layout1Rect.LayoutRect(
  1370                 layout1Rect.LayoutRect(
  1370                     layout1ParentRect.Rect(),
  1371                     layout1ParentRect.Rect(),
  1371                     iLayout->iAknLayoutScalable_Avkon.status_pane( 4 ).LayoutLine() );
  1372                     iLayout->iAknLayoutScalable_Avkon.status_pane( 1 ).LayoutLine() );
  1372                 parentRect = layout1Rect.Rect();
  1373                 parentRect = layout1Rect.Rect();
  1373                 
  1374                 
  1374                 switch ( aPaneId.iUid )
  1375                 switch ( aPaneId.iUid )
  1375                     {
  1376                     {
  1376                     case EEikStatusPaneUidNavi: 
  1377                     case EEikStatusPaneUidNavi: 
  1380                         break;
  1381                         break;
  1381                         }
  1382                         }
  1382                     case EEikStatusPaneUidSignal:
  1383                     case EEikStatusPaneUidSignal:
  1383                         {
  1384                         {
  1384                         layout =
  1385                         layout =
  1385                             aknLayoutScalable_Avkon.signal_pane( 11 ).LayoutLine();
  1386                             aknLayoutScalable_Avkon.signal_pane( 14 ).LayoutLine();
  1386                         break;
  1387                         break;
  1387                         }
  1388                         }
  1388                     case EEikStatusPaneUidTitle:
  1389                     case EEikStatusPaneUidTitle:
  1389                         {
  1390                         {
  1390                         layout =
  1391                         layout =
  1391                             aknLayoutScalable_Avkon.title_pane( 11 ).LayoutLine();                    
  1392                             aknLayoutScalable_Avkon.title_pane( 11 ).LayoutLine();                    
  1392                         break;
  1393                         break;
  1393                         }
  1394                         }
  1394                     case EEikStatusPaneUidIndic:
  1395                     case EEikStatusPaneUidIndic:
  1395                         {
  1396                         {
       
  1397                         TAknWindowComponentLayout nstaClockIndicPane(
       
  1398                             DoCompose(
       
  1399                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1400                                 DoCompose(
       
  1401                                     aknLayoutScalable_Avkon.control_pane(),
       
  1402                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1403                         TAknLayoutRect layoutRect;
       
  1404                         layoutRect.LayoutRect( applicationWindowRect,
       
  1405                                                nstaClockIndicPane );
       
  1406                         parentRect = layoutRect.Rect();
       
  1407                         
       
  1408                         layout = aknLayoutScalable_Avkon.indicator_nsta_pane_cp().LayoutLine();
       
  1409                         layoutRect.LayoutRect( parentRect, layout );
       
  1410                         paneRect = layoutRect.Rect();
       
  1411                         
       
  1412                         // Digital clock pane resides inside the
       
  1413                         // combined pane, so it must be made relative to the
       
  1414                         // combined pane rectangle instead of the screen.
       
  1415                         paneRect.Move( applicationWindowRect.iTl.iX - parentRect.iTl.iX,
       
  1416                                        applicationWindowRect.iTl.iY - parentRect.iTl.iY );
       
  1417                         break;
       
  1418                         }
       
  1419                     case EEikStatusPaneUidBattery:
       
  1420                         {
  1396                         layout =
  1421                         layout =
  1397                             aknLayoutScalable_Avkon.uni_indicator_pane( 3 ).LayoutLine();
  1422                             aknLayoutScalable_Avkon.battery_pane( 14 ).LayoutLine();
  1398                         break;
  1423                         break;
  1399                         }
  1424                         }
  1400                     case EEikStatusPaneUidBattery:
  1425                     case EEikStatusPaneUidDigitalClock:
  1401                         {
  1426                         {
  1402                         layout =
  1427                         TAknWindowComponentLayout nstaClockIndicPane(
  1403                             aknLayoutScalable_Avkon.battery_pane( 11 ).LayoutLine();
  1428                             DoCompose(
       
  1429                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1430                                 DoCompose(
       
  1431                                     aknLayoutScalable_Avkon.control_pane(),
       
  1432                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1433                         TAknLayoutRect layoutRect;
       
  1434                         layoutRect.LayoutRect( applicationWindowRect,
       
  1435                                                nstaClockIndicPane );
       
  1436                         parentRect = layoutRect.Rect();
       
  1437                         
       
  1438                         layout = aknLayoutScalable_Avkon.clock_nsta_pane_cp().LayoutLine();
       
  1439                         layoutRect.LayoutRect( parentRect, layout );
       
  1440                         paneRect = layoutRect.Rect();
       
  1441                         
       
  1442                         // Digital clock pane resides inside the
       
  1443                         // combined pane, so it must be made relative to the
       
  1444                         // combined pane rectangle instead of the screen.
       
  1445                         paneRect.Move( applicationWindowRect.iTl.iX - parentRect.iTl.iX,
       
  1446                                        applicationWindowRect.iTl.iY - parentRect.iTl.iY );
       
  1447                         break;
       
  1448                         }
       
  1449                     case EEikStatusPaneUidCombined:
       
  1450                         {
       
  1451                         TAknWindowComponentLayout nstaClockIndicPane(
       
  1452                             DoCompose(
       
  1453                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1454                                 DoCompose(
       
  1455                                     aknLayoutScalable_Avkon.control_pane(),
       
  1456                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1457                         layout = nstaClockIndicPane.LayoutLine();
       
  1458                         parentRect = applicationWindowRect;
  1404                         break;
  1459                         break;
  1405                         }
  1460                         }
  1406                     }
  1461                     }
  1407 	            }
  1462 	            }
  1408             break;
  1463             break;
  1424                 
  1479                 
  1425                 switch ( aPaneId.iUid )
  1480                 switch ( aPaneId.iUid )
  1426                     {
  1481                     {
  1427                     case EEikStatusPaneUidNavi: 
  1482                     case EEikStatusPaneUidNavi: 
  1428                         {
  1483                         {
  1429                         layout =
  1484                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
  1430                             aknLayoutScalable_Avkon.navi_pane( 11 ).LayoutLine();
  1485                             {
       
  1486                             layout =
       
  1487                                 aknLayoutScalable_Avkon.navi_pane( 10 ).LayoutLine();
       
  1488                             }
       
  1489                         else
       
  1490                             {
       
  1491                             layout =
       
  1492                                 aknLayoutScalable_Avkon.navi_pane( 11 ).LayoutLine();
       
  1493                             }
  1431                         break;
  1494                         break;
  1432                         }
  1495                         }
  1433                     case EEikStatusPaneUidSignal:
  1496                     case EEikStatusPaneUidSignal:
  1434                         {
  1497                         {
  1435                         layout =
  1498                         layout =
  1436                             aknLayoutScalable_Avkon.signal_pane( 13 ).LayoutLine();
  1499                             aknLayoutScalable_Avkon.signal_pane( 13 ).LayoutLine();
  1437                         break;
  1500                         break;
  1438                         }
  1501                         }
  1439                     case EEikStatusPaneUidTitle:
  1502                     case EEikStatusPaneUidTitle:
  1440                         {
  1503                         {
  1441                         layout =
  1504                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
  1442                             aknLayoutScalable_Avkon.title_pane( 13 ).LayoutLine();                    
  1505                             {
       
  1506                             layout =
       
  1507                                 aknLayoutScalable_Avkon.title_pane( 12 ).LayoutLine();
       
  1508                             }
       
  1509                         else
       
  1510                             {
       
  1511                             layout =
       
  1512                                 aknLayoutScalable_Avkon.title_pane( 13 ).LayoutLine();
       
  1513                             }
  1443                         break;
  1514                         break;
  1444                         }
  1515                         }
  1445                     case EEikStatusPaneUidIndic:
  1516                     case EEikStatusPaneUidIndic:
  1446                         {
  1517                         {
  1447                         layout =
  1518                         layout =