mobilemessaging/postcard/postcardsrc/PostcardLaf.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  PostcardLaf implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <aknenv.h>
       
    23 #include <AknUtils.h>
       
    24 #include <AknsUtils.h>
       
    25 #include <aknlayout.cdl.h>
       
    26 #include <applayout.cdl.h>
       
    27 #include <aknlayoutscalable_apps.cdl.h>
       
    28 #include <aknlayoutscalable_avkon.cdl.h>
       
    29 #include <layoutmetadata.cdl.h>
       
    30 #include <MsgEditorCommon.h>
       
    31 #include "PostcardLaf.h"
       
    32 
       
    33 // ============================ MEMBER FUNCTIONS ===============================
       
    34 
       
    35 // ---------------------------------------------------------
       
    36 // MainPostcardPane
       
    37 // ---------------------------------------------------------
       
    38 TRect PostcardLaf::MainPostcardPane( )
       
    39     {
       
    40     TRect mainPane;
       
    41     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
       
    42     TRect mainPostcardLayout(mainPane);
       
    43     TAknLayoutRect mainPostcardLayoutRect;
       
    44     mainPostcardLayoutRect.LayoutRect(
       
    45         mainPane,
       
    46         AknLayoutScalable_Apps::main_postcard_pane( ).LayoutLine() );
       
    47     mainPostcardLayout = mainPostcardLayoutRect.Rect( );
       
    48     return mainPostcardLayout;
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------
       
    52 // RelativeMainPostcardPane
       
    53 // ---------------------------------------------------------
       
    54 TRect PostcardLaf::RelativeMainPostcardPane( )
       
    55     {
       
    56     TRect mainPane;
       
    57     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
       
    58     TRect mainPostcardLayout(mainPane);
       
    59     TAknLayoutRect mainPostcardLayoutRect;
       
    60     mainPostcardLayoutRect.LayoutRect(
       
    61         mainPane,
       
    62         AknLayoutScalable_Apps::main_postcard_pane( ).LayoutLine() );
       
    63         mainPostcardLayout = mainPostcardLayoutRect.Rect( );
       
    64     // This is needed at least when touch pane is there.
       
    65 	mainPostcardLayout.Move( -mainPostcardLayout.iTl.iX, -mainPostcardLayout.iTl.iY );
       
    66     return mainPostcardLayout;
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------
       
    70 // PostcardPane
       
    71 // ---------------------------------------------------------
       
    72 TRect PostcardLaf::PostcardPane( )
       
    73     {
       
    74     TRect mainPostcardPane = PostcardLaf::MainPostcardPane();
       
    75     TRect postcardPaneLayout(mainPostcardPane);
       
    76     TAknLayoutRect postcardPaneLayoutRect;
       
    77     TInt index = 0;
       
    78     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
    79         {
       
    80         index = 1;
       
    81         }
       
    82     postcardPaneLayoutRect.LayoutRect(
       
    83         mainPostcardPane,
       
    84         AknLayoutScalable_Apps::postcard_pane( index ).LayoutLine() );
       
    85     postcardPaneLayout = postcardPaneLayoutRect.Rect( );
       
    86     return postcardPaneLayout;
       
    87     }
       
    88 
       
    89 // ---------------------------------------------------------
       
    90 // RelativePostcardPane
       
    91 // ---------------------------------------------------------
       
    92 TRect PostcardLaf::RelativePostcardPane( )
       
    93     {
       
    94     TRect mainPostcardPane = PostcardLaf::RelativeMainPostcardPane();
       
    95     TRect postcardPaneLayout(mainPostcardPane);
       
    96     TInt index = 0;
       
    97     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
    98         {
       
    99         index = 1;
       
   100         }
       
   101     TAknLayoutRect postcardPaneLayoutRect;
       
   102     postcardPaneLayoutRect.LayoutRect(
       
   103         mainPostcardPane,
       
   104         AknLayoutScalable_Apps::postcard_pane( index ).LayoutLine() );
       
   105     postcardPaneLayout = postcardPaneLayoutRect.Rect( );
       
   106     return postcardPaneLayout;
       
   107     }
       
   108 
       
   109 // ---------------------------------------------------------
       
   110 // UpperArrow
       
   111 // ---------------------------------------------------------
       
   112 TRect PostcardLaf::UpperArrow( )
       
   113     {
       
   114     TRect mainPostcardPane = PostcardLaf::RelativeMainPostcardPane();
       
   115     TRect layout(mainPostcardPane);
       
   116     TInt index = 0;
       
   117     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   118         {
       
   119         index = 1;
       
   120         }
       
   121     TAknLayoutRect layoutRect;
       
   122     layoutRect.LayoutRect(
       
   123         mainPostcardPane,
       
   124         AknLayoutScalable_Apps::main_postcard_pane_g5( index ).LayoutLine() );
       
   125     layout = layoutRect.Rect( );
       
   126     return layout;
       
   127     }
       
   128 
       
   129 // ---------------------------------------------------------
       
   130 // LowerArrow
       
   131 // ---------------------------------------------------------
       
   132 TRect PostcardLaf::LowerArrow( )
       
   133     {
       
   134     TRect mainPostcardPane = PostcardLaf::RelativeMainPostcardPane( );
       
   135     TRect layout(mainPostcardPane);
       
   136     TInt index = 0;
       
   137     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   138         {
       
   139         index = 1;
       
   140         }
       
   141     TAknLayoutRect layoutRect;
       
   142     layoutRect.LayoutRect(
       
   143         mainPostcardPane,
       
   144         AknLayoutScalable_Apps::main_postcard_pane_g6( index ).LayoutLine() );
       
   145     layout = layoutRect.Rect( );
       
   146     return layout;
       
   147     }
       
   148 
       
   149 // ---------------------------------------------------------
       
   150 // BackBackground
       
   151 // ---------------------------------------------------------
       
   152 TRect PostcardLaf::BackBackground( )
       
   153     {
       
   154     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   155     TRect layout(postcardPane);
       
   156     TInt index = 0;
       
   157     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   158         {
       
   159         index = 1;
       
   160         }
       
   161     TAknLayoutRect layoutRect;
       
   162     layoutRect.LayoutRect(
       
   163         postcardPane,
       
   164         AknLayoutScalable_Apps::postcard_pane_g1( index ).LayoutLine() );
       
   165     layout = layoutRect.Rect( );
       
   166     return layout;
       
   167     }
       
   168 
       
   169 // ---------------------------------------------------------
       
   170 // FrontBackground
       
   171 // ---------------------------------------------------------
       
   172 TRect PostcardLaf::FrontBackground( )
       
   173     {
       
   174     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   175     TRect layout(postcardPane);
       
   176     TAknLayoutRect layoutRect;
       
   177     layoutRect.LayoutRect(
       
   178         postcardPane,
       
   179         AknLayoutScalable_Apps::postcard_pane_g7( 0 ).LayoutLine() );
       
   180     layout = layoutRect.Rect( );
       
   181     return layout;
       
   182     }
       
   183 
       
   184 // ---------------------------------------------------------
       
   185 // FrontBackgroundWithoutImage
       
   186 // ---------------------------------------------------------
       
   187 TRect PostcardLaf::FrontBackgroundWithoutImage( )
       
   188     {
       
   189     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   190     TRect layout(postcardPane);
       
   191     TAknLayoutRect layoutRect;
       
   192     layoutRect.LayoutRect(
       
   193         postcardPane,
       
   194         AknLayoutScalable_Apps::postcard_pane_g7( 1 ).LayoutLine() );
       
   195     layout = layoutRect.Rect( );
       
   196     return layout;
       
   197     }
       
   198 
       
   199 // ---------------------------------------------------------
       
   200 // Stamp
       
   201 // ---------------------------------------------------------
       
   202 TRect PostcardLaf::Stamp( )
       
   203     {
       
   204     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   205     TRect layout(postcardPane);
       
   206     TInt index = 0;
       
   207     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   208         {
       
   209         index = 1;
       
   210         }
       
   211     TAknLayoutRect layoutRect;
       
   212     layoutRect.LayoutRect(
       
   213         postcardPane,
       
   214         AknLayoutScalable_Apps::postcard_pane_g2( index ).LayoutLine() );
       
   215     layout = layoutRect.Rect( );
       
   216     return layout;
       
   217     }
       
   218 
       
   219 // ---------------------------------------------------------
       
   220 // InsertImageIcon
       
   221 // ---------------------------------------------------------
       
   222 TRect PostcardLaf::InsertImageIcon( )
       
   223     {
       
   224     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   225     TRect layout(postcardPane);
       
   226     TAknLayoutRect layoutRect;
       
   227     layoutRect.LayoutRect(
       
   228         postcardPane,
       
   229         AknLayoutScalable_Apps::postcard_pane_g3( 0 ).LayoutLine() );
       
   230     layout = layoutRect.Rect( );
       
   231     return layout;
       
   232     }
       
   233 
       
   234 // ---------------------------------------------------------
       
   235 // Image
       
   236 // ---------------------------------------------------------
       
   237 TRect PostcardLaf::Image( )
       
   238     {
       
   239     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   240     TRect layout(postcardPane);
       
   241     TAknLayoutRect layoutRect;
       
   242     layoutRect.LayoutRect(
       
   243         postcardPane,
       
   244         AknLayoutScalable_Apps::postcard_pane_g4( 0 ).LayoutLine() );
       
   245     layout = layoutRect.Rect( );
       
   246     return layout;
       
   247     }
       
   248 
       
   249 // ---------------------------------------------------------
       
   250 // Address
       
   251 // ---------------------------------------------------------
       
   252 TRect PostcardLaf::Address( )
       
   253     {
       
   254     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   255     TRect layout(postcardPane);
       
   256     TInt index = 0;
       
   257     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   258         {
       
   259         index = 1;
       
   260         }
       
   261     TAknLayoutRect layoutRect;
       
   262     layoutRect.LayoutRect(
       
   263         postcardPane,
       
   264         AknLayoutScalable_Apps::postcard_pane_g5( index ).LayoutLine() );
       
   265     layout = layoutRect.Rect( );
       
   266     return layout;
       
   267     }
       
   268 
       
   269 // ---------------------------------------------------------
       
   270 // Address
       
   271 // ---------------------------------------------------------
       
   272 TRect PostcardLaf::AddressFocus( )
       
   273     {
       
   274     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   275     TRect layout(postcardPane);
       
   276     TInt index = 0;
       
   277     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   278         {
       
   279         index = 1;
       
   280         }
       
   281     TAknLayoutRect layoutRect;
       
   282     layoutRect.LayoutRect(
       
   283         postcardPane,
       
   284         AknLayoutScalable_Apps::postcard_address2_pane( index ).LayoutLine() );
       
   285     layout = layoutRect.Rect( );
       
   286     return layout;
       
   287     }
       
   288 
       
   289 // ---------------------------------------------------------
       
   290 // GreetingText
       
   291 // ---------------------------------------------------------
       
   292 TRect PostcardLaf::GreetingText( )
       
   293     {
       
   294     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   295     TRect layout(postcardPane);
       
   296     TInt index = 0;
       
   297     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   298         {
       
   299         index = 1;
       
   300         }
       
   301     TAknLayoutRect layoutRect;
       
   302     layoutRect.LayoutRect(
       
   303         postcardPane,
       
   304         AknLayoutScalable_Apps::postcard_pane_g6( index ).LayoutLine() );
       
   305     layout = layoutRect.Rect( );
       
   306     return layout;
       
   307     }
       
   308 
       
   309 // ---------------------------------------------------------
       
   310 // GreetingText
       
   311 // ---------------------------------------------------------
       
   312 TRect PostcardLaf::GreetingTextFocus( )
       
   313     {
       
   314     TRect postcardPane = PostcardLaf::RelativePostcardPane( );
       
   315     TRect layout(postcardPane);
       
   316     TInt index = 0;
       
   317     if( Layout_Meta_Data::IsLandscapeOrientation( ) )
       
   318         {
       
   319         index = 1;
       
   320         }
       
   321     TAknLayoutRect layoutRect;
       
   322     layoutRect.LayoutRect(
       
   323         postcardPane,
       
   324         AknLayoutScalable_Apps::postcard_message2_pane( index ).LayoutLine() );
       
   325     layout = layoutRect.Rect( );
       
   326     return layout;
       
   327     }
       
   328 
       
   329 // ---------------------------------------------------------
       
   330 // WholeMainPaneForDialogs
       
   331 // ---------------------------------------------------------
       
   332 TRect PostcardLaf::WholeMainPaneForDialogs( )
       
   333 	{
       
   334     TRect mainPane;
       
   335     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
       
   336     mainPane.Move( -mainPane.iTl.iX, -mainPane.iTl.iY );
       
   337 	return mainPane;	
       
   338 	}
       
   339 
       
   340 // ---------------------------------------------------------
       
   341 // ActiveFont
       
   342 // ---------------------------------------------------------
       
   343 void PostcardLaf::ActiveFont( TCharFormat& aChar, TCharFormatMask& aCharMask,
       
   344 						CParaFormat& aPara, TParaFormatMask& aParaMask )
       
   345 	{
       
   346     TRect mainPane;
       
   347     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
       
   348     TAknLayoutText textLayout;
       
   349     textLayout.LayoutText(
       
   350         mainPane,
       
   351         AknLayoutScalable_Apps::msg_body_pane_t1( 0 ) );
       
   352         
       
   353 	aPara.iLineSpacingControl = CParaFormat::ELineSpacingExactlyInPixels;
       
   354 	aParaMask.SetAttrib( EAttLineSpacingControl );
       
   355 	aPara.iLineSpacingInTwips = MsgEditorCommons::MsgBaseLineDelta();
       
   356 	aParaMask.SetAttrib( EAttLineSpacing );
       
   357 	aPara.iHorizontalAlignment = CParaFormat::ELeftAlign;
       
   358 	aParaMask.SetAttrib( EAttAlignment );
       
   359 	
       
   360 	aChar.iFontSpec = textLayout.Font( )->FontSpecInTwips();
       
   361     aCharMask.SetAttrib( EAttFontTypeface );
       
   362     aCharMask.SetAttrib( EAttFontHeight );
       
   363 
       
   364     TRgb textColor;
       
   365     if ( AknsUtils::GetCachedColor(
       
   366 	    AknsUtils::SkinInstance(),
       
   367         textColor,
       
   368         KAknsIIDQsnTextColors,
       
   369         EAknsCIQsnTextColorsCG6 ) != KErrNone )
       
   370 	    {
       
   371 	    textColor = AKN_LAF_COLOR_STATIC( 215 );
       
   372 	    }
       
   373 
       
   374 	aChar.iFontPresentation.iTextColor = textColor;
       
   375     aCharMask.SetAttrib( EAttColor );	
       
   376 	}
       
   377 
       
   378 // ---------------------------------------------------------
       
   379 // MiniatureFont
       
   380 // ---------------------------------------------------------
       
   381 void PostcardLaf::MiniatureFont( TCharFormat& aChar, TCharFormatMask& aCharMask,
       
   382 						CParaFormat& aPara, TParaFormatMask& aParaMask )
       
   383 	{
       
   384 	TRect postcardPane = PostcardLaf::GreetingText( );
       
   385     
       
   386     // 1st row
       
   387     TAknLayoutRect rectLayout;
       
   388     rectLayout.LayoutRect(
       
   389         postcardPane,
       
   390         AknLayoutScalable_Apps::message2_row_pane( 1 ).LayoutLine() );
       
   391 
       
   392     TRect rowPane = rectLayout.Rect();
       
   393 
       
   394     TAknLayoutText textLayout;
       
   395     textLayout.LayoutText(
       
   396         rowPane,
       
   397         AknLayoutScalable_Apps::postcard_message2_row_pane_t1() );
       
   398     
       
   399 	aPara.iLineSpacingControl = CParaFormat::ELineSpacingExactlyInPixels;
       
   400 	aParaMask.SetAttrib( EAttLineSpacingControl );
       
   401 	aPara.iLineSpacingInTwips = PostcardLaf::BaselineDelta( );
       
   402 	aParaMask.SetAttrib( EAttLineSpacing );
       
   403 	aPara.iHorizontalAlignment = CParaFormat::ELeftAlign;
       
   404 	aParaMask.SetAttrib( EAttAlignment );
       
   405 	
       
   406 	aChar.iFontSpec = textLayout.Font( )->FontSpecInTwips();
       
   407     aCharMask.SetAttrib( EAttFontTypeface );
       
   408     aCharMask.SetAttrib( EAttFontHeight );
       
   409 	aChar.iFontPresentation.iTextColor = AKN_LAF_COLOR_STATIC( 215 );
       
   410     aCharMask.SetAttrib( EAttColor );	
       
   411 	}
       
   412 
       
   413 // ---------------------------------------------------------
       
   414 // BaselineDelta
       
   415 // ---------------------------------------------------------
       
   416 TInt PostcardLaf::BaselineDelta( )
       
   417     {
       
   418     TRect postcardPane = PostcardLaf::GreetingText( );
       
   419     TRect layout(postcardPane);
       
   420     TRect layout2(postcardPane);
       
   421     
       
   422     // 1st row
       
   423     TAknLayoutRect rectLayout;
       
   424     rectLayout.LayoutRect(
       
   425         postcardPane,
       
   426         AknLayoutScalable_Apps::message2_row_pane( 1 ).LayoutLine() );
       
   427 
       
   428     TRect rowPane = rectLayout.Rect();
       
   429     
       
   430     TAknLayoutRect textLayout;
       
   431     textLayout.LayoutRect(
       
   432         rowPane,
       
   433         AknLayoutScalable_Apps::postcard_message2_row_pane_g1() );
       
   434     layout = textLayout.Rect();
       
   435     
       
   436     // 2nd row
       
   437     TAknLayoutRect rectLayout2;
       
   438     rectLayout2.LayoutRect(
       
   439         postcardPane,
       
   440         AknLayoutScalable_Apps::message2_row_pane( 2 ).LayoutLine() );
       
   441 
       
   442     TRect rowPane2 = rectLayout2.Rect();
       
   443 
       
   444     TAknLayoutRect textLayout2;
       
   445     textLayout2.LayoutRect(
       
   446         rowPane2,
       
   447         AknLayoutScalable_Apps::postcard_message2_row_pane_g1() );
       
   448     layout2 = textLayout2.Rect();
       
   449     
       
   450     return layout2.iTl.iY - layout.iTl.iY;
       
   451     }
       
   452 
       
   453 // ---------------------------------------------------------
       
   454 // BaselineTop
       
   455 // ---------------------------------------------------------
       
   456 TInt PostcardLaf::BaselineTop( )
       
   457     {
       
   458     TRect postcardPane = PostcardLaf::GreetingText( );
       
   459     TRect layout(postcardPane);
       
   460     
       
   461     // 1st row
       
   462     TAknLayoutRect rectLayout;
       
   463     rectLayout.LayoutRect(
       
   464         postcardPane,
       
   465         AknLayoutScalable_Apps::message2_row_pane( 1 ).LayoutLine() );
       
   466 
       
   467     TRect rowPane = rectLayout.Rect();
       
   468 
       
   469     TAknLayoutText textLayout;
       
   470     textLayout.LayoutText(
       
   471         rowPane,
       
   472         AknLayoutScalable_Apps::postcard_message2_row_pane_t1() );
       
   473     layout = textLayout.TextRect( );
       
   474     
       
   475     return layout.iTl.iY - postcardPane.iTl.iY;
       
   476     }
       
   477 
       
   478 // ---------------------------------------------------------
       
   479 // LeftMargin
       
   480 // ---------------------------------------------------------
       
   481 TInt PostcardLaf::LeftMargin( )
       
   482     {
       
   483     TRect postcardPane = PostcardLaf::GreetingText( );
       
   484     TRect layout(postcardPane);
       
   485 
       
   486     // 1st row
       
   487     TAknLayoutRect rectLayout;
       
   488     rectLayout.LayoutRect(
       
   489         postcardPane,
       
   490         AknLayoutScalable_Apps::message2_row_pane( 1 ).LayoutLine() );
       
   491 
       
   492     TRect rowPane = rectLayout.Rect();
       
   493 
       
   494     TAknLayoutText textLayout;
       
   495     textLayout.LayoutText(
       
   496         rowPane,
       
   497         AknLayoutScalable_Apps::postcard_message2_row_pane_t1() );
       
   498     layout = textLayout.TextRect( );
       
   499 
       
   500     return layout.iTl.iX - postcardPane.iTl.iX;
       
   501     }
       
   502 
       
   503 // ---------------------------------------------------------
       
   504 // ScrollBarWidth
       
   505 // ---------------------------------------------------------
       
   506 TInt PostcardLaf::ScrollBarWidth( )
       
   507 	{
       
   508     TRect mainPane;
       
   509     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
       
   510 
       
   511     TRect listScrollGenPaneLayout(mainPane);
       
   512     if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
       
   513         {
       
   514 	    TAknLayoutRect listScrollGenPaneLayoutRect;
       
   515 	    listScrollGenPaneLayoutRect.LayoutRect(
       
   516 	        mainPane,
       
   517 	        AknLayoutScalable_Avkon::main_pane( 0 ).LayoutLine() );
       
   518 	    listScrollGenPaneLayout = listScrollGenPaneLayoutRect.Rect( );
       
   519         }
       
   520 
       
   521     TRect scrollPaneLayout(listScrollGenPaneLayout);
       
   522     if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
       
   523         {
       
   524 	    TAknLayoutRect scrollPaneLayoutRect;
       
   525 	    scrollPaneLayoutRect.LayoutRect(
       
   526 	        scrollPaneLayout,
       
   527 	        AknLayoutScalable_Avkon::scroll_pane( ).LayoutLine() );
       
   528 	    scrollPaneLayout = scrollPaneLayoutRect.Rect( );
       
   529         }
       
   530 
       
   531     TRect bgScrollPaneLayout(scrollPaneLayout);
       
   532     if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
       
   533         {
       
   534 	    TAknLayoutRect bgScrollPaneLayoutRect;
       
   535 	    bgScrollPaneLayoutRect.LayoutRect(
       
   536 	        bgScrollPaneLayout,
       
   537 	        AknLayoutScalable_Avkon::bg_scroll_pane( ).LayoutLine() );
       
   538 	    bgScrollPaneLayout = bgScrollPaneLayoutRect.Rect( );
       
   539         }
       
   540 
       
   541 	return bgScrollPaneLayout.Width( );
       
   542 	}
       
   543 
       
   544 // ---------------------------------------------------------
       
   545 // GreetingFocusLineCount
       
   546 // ---------------------------------------------------------
       
   547 TInt PostcardLaf::GreetingFocusLineCount()
       
   548     {
       
   549     TAknLayoutScalableParameterLimits limits = AknLayoutScalable_Apps::message2_row_pane_ParamLimits();
       
   550     return limits.LastRow();
       
   551     }
       
   552 //  End of File