uifw/AvKon/src/aknlists.cpp
branchRCL_3
changeset 9 aabf2c525e0f
parent 4 8ca85d2f0db7
child 10 9f56a4e1b8ab
equal deleted inserted replaced
4:8ca85d2f0db7 9:aabf2c525e0f
     1 /*
     1 /*
     2 * Copyright (c) 2002-2009 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".
  1422     {
  1422     {
  1423     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
  1423     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
  1424     }
  1424     }
  1425 
  1425 
  1426 // -----------------------------------------------------------------------------
  1426 // -----------------------------------------------------------------------------
       
  1427 // SetupListL
       
  1428 // -----------------------------------------------------------------------------
       
  1429 //
       
  1430 static void SetupListL( CEikFormattedCellListBox* aListBox,
       
  1431                         const TAknWindowComponentLayout& aNormalLayout )
       
  1432     {
       
  1433     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
       
  1434     }
       
  1435 
       
  1436 // -----------------------------------------------------------------------------
  1427 // ShowAllRows
  1437 // ShowAllRows
  1428 // -----------------------------------------------------------------------------
  1438 // -----------------------------------------------------------------------------
  1429 //
  1439 //
  1430 #ifdef RD_LIST_STRETCH
  1440 #ifdef RD_LIST_STRETCH
  1431 static TBool ShowAllRows( CFormattedCellListBoxData* aData )
  1441 static TBool ShowAllRows( CFormattedCellListBoxData* aData )
  3480     _AKNTRACE_FUNC_ENTER;
  3490     _AKNTRACE_FUNC_ENTER;
  3481     CFormattedCellListBoxItemDrawer *itemDrawer( ItemDrawer() );
  3491     CFormattedCellListBoxItemDrawer *itemDrawer( ItemDrawer() );
  3482     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  3492     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  3483     if ( !formattedCellData->SecondRowHidden() )
  3493     if ( !formattedCellData->SecondRowHidden() )
  3484         {
  3494         {
  3485         SetupStretchableListL( this,
  3495         SetupListL( this, AknLayoutScalable_Avkon::list_double_pane( 0 ) );
  3486                               AknLayoutScalable_Avkon::list_double_pane( 0 ),
       
  3487                               AknLayoutScalable_Avkon::list_double_pane_vc( 0 ) );
       
  3488         }
  3496         }
  3489     else
  3497     else
  3490         {
  3498         {
  3491         SetupStretchableListL( this,
  3499         SetupListL( this, AknLayoutScalable_Avkon::list_single_pane( 0 ) );
  3492                               AknLayoutScalable_Avkon::list_single_pane( 0 ),
       
  3493                               AknLayoutScalable_Avkon::list_double_pane_vc( 0 ) );
       
  3494         }
  3500         }
  3495 
  3501 
  3496     SetSeparatorLinePosition( this, EAColumn );
  3502     SetSeparatorLinePosition( this, EAColumn );
  3497 
  3503 
  3498     if ( ShowAllRows( formattedCellData ) )
  3504     if ( ShowAllRows( formattedCellData ) )
  3499         {
  3505         {
  3500         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3506         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3501         // this cell does not exist.
  3507         // this cell does not exist.
  3502         formattedCellData->SetStretchableTextSubCellL( 0,
  3508         formattedCellData->SetTextSubCellL( 0,
  3503             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ),
  3509             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ) );
  3504             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3510 
  3505 
  3511         formattedCellData->SetTextSubCellL( 1,
  3506         formattedCellData->SetStretchableTextSubCellL( 1,
  3512             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ) );
  3507             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ),
  3513 
  3508             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3514         formattedCellData->SetTextSubCellL( 2,
  3509 
  3515             AknLayoutScalable_Avkon::list_double_pane_t2( 0 ) );
  3510         formattedCellData->SetStretchableTextSubCellL( 2,
       
  3511             AknLayoutScalable_Avkon::list_double_pane_t2( 0 ),
       
  3512             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 0 ) );
       
  3513             
  3516             
  3514         formattedCellData->SetStretchableGraphicSubCellL( 3,
  3517         formattedCellData->SetGraphicSubCellL( 3,
  3515             AknLayoutScalable_Avkon::list_double_pane_g1( 0 ),
  3518             AknLayoutScalable_Avkon::list_double_pane_g1( 0 ) );
  3516             AknLayoutScalable_Avkon::list_double_pane_vc_g1( 0 ) );
  3519 
  3517 
  3520         formattedCellData->SetGraphicSubCellL( 4,
  3518         formattedCellData->SetStretchableGraphicSubCellL( 4,
  3521             AknLayoutScalable_Avkon::list_double_pane_g2( 0 ) );
  3519             AknLayoutScalable_Avkon::list_double_pane_g2( 0 ),
       
  3520             AknLayoutScalable_Avkon::list_double_pane_vc_g2( 0 ) );
       
  3521 
  3522 
  3522         // Conditional subcells must be added in priority order!
  3523         // Conditional subcells must be added in priority order!
  3523         formattedCellData->SetStretchableConditionalSubCellL( 4,
  3524         formattedCellData->SetConditionalSubCellL( 4,
  3524             AknLayoutScalable_Avkon::list_double_pane_t1( 2 ),
  3525             AknLayoutScalable_Avkon::list_double_pane_t1( 2 ), 1 );
  3525             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 2 ), 1, 2 );
  3526 
  3526 
  3527         formattedCellData->SetConditionalSubCellL( 3,
  3527         formattedCellData->SetStretchableConditionalSubCellL( 3,
  3528             AknLayoutScalable_Avkon::list_double_pane_t1( 1 ), 1 );
  3528             AknLayoutScalable_Avkon::list_double_pane_t1( 1 ),
       
  3529             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 1 ), 1, 2 );
       
  3530         }
  3529         }
  3531     else
  3530     else
  3532         {
  3531         {
  3533         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3532         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3534         // this cell does not exist.
  3533         // this cell does not exist.
  3535         formattedCellData->SetStretchableTextSubCellL( 0,
  3534         formattedCellData->SetTextSubCellL( 0,
  3536             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ),
  3535             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ) );
  3537             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3536 
  3538 
  3537         formattedCellData->SetTextSubCellL( 1,
  3539         formattedCellData->SetStretchableTextSubCellL( 1,
  3538             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ) );
  3540             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ),
       
  3541             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
       
  3542         }        
  3539         }        
  3543 
  3540 
  3544     itemDrawer->SetItemMarkReverse( ETrue );
  3541     itemDrawer->SetItemMarkReverse( ETrue );
  3545     itemDrawer->SetItemMarkPosition( 3 );
  3542     itemDrawer->SetItemMarkPosition( 3 );
  3546     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
  3543     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );