imstutils/imconversationview/imcvuiapp/src/cimcvapplayoutinfo.cpp
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  layout info class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include	"cimcvapplayoutinfo.h"
       
    22 #include	<AknUtils.h>
       
    23 #include	<applayout.cdl.h> //cdl
       
    24 #include	<f32file.h>
       
    25 #include    <aknlayoutscalable_apps.cdl.h>
       
    26 #include 	"imcvlogger.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // ================= MEMBER FUNCTIONS =======================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CIMCVAppLayoutInfo::NewL
       
    34 // Two-phased constructor.
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CIMCVAppLayoutInfo* CIMCVAppLayoutInfo::NewL( TChatListBoxLayout::TLayout aLayoutID )
       
    38     {
       
    39     IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::NewL()	start" ));
       
    40     CIMCVAppLayoutInfo* self = new (ELeave) CIMCVAppLayoutInfo( aLayoutID );
       
    41     CleanupStack::PushL( self );
       
    42     self->ConstructL();
       
    43     CleanupStack::Pop( self );
       
    44     IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::NewL()	end" ));
       
    45     return self;
       
    46   
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CIMCVAppLayoutInfo::~CIMCVAppLayoutInfo
       
    51 // Destructor
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CIMCVAppLayoutInfo::~CIMCVAppLayoutInfo()
       
    55     {
       
    56 	if ( iReadingPane )
       
    57 		{
       
    58 		iReadingPane->Reset();
       
    59 		delete iReadingPane;
       
    60 		}
       
    61 
       
    62 	if ( iWrittingPane )
       
    63 		{
       
    64 		iWrittingPane->Reset();
       
    65 		delete iWrittingPane;
       
    66 		}
       
    67 
       
    68 	if ( iReadingField )
       
    69 		{
       
    70 		iReadingField->Reset();
       
    71 		delete iReadingField;
       
    72 		}
       
    73 
       
    74 	if ( iReadingPaneTextsLine1 )
       
    75 		{
       
    76 		iReadingPaneTextsLine1->Reset();
       
    77 		delete iReadingPaneTextsLine1;
       
    78 		}
       
    79 
       
    80 	if ( iIMTextElements )
       
    81 		{
       
    82 		iIMTextElements->Reset();
       
    83 		delete iIMTextElements;
       
    84 		}
       
    85 
       
    86 	if ( iWrittingPaneTextsLine )
       
    87 		{
       
    88 		iWrittingPaneTextsLine->Reset();
       
    89 		delete iWrittingPaneTextsLine;
       
    90 		}
       
    91 
       
    92 	if ( iIMWritingFieldLine1 )
       
    93 		{
       
    94 		iIMWritingFieldLine1->Reset();
       
    95 		delete iIMWritingFieldLine1;
       
    96 		}
       
    97 
       
    98 	if ( iIMWritingFieldLine3 )
       
    99 		{
       
   100 		iIMWritingFieldLine3->Reset();
       
   101 		delete iIMWritingFieldLine3;
       
   102 		}
       
   103 
       
   104 	if ( iIMNaviPaneTextsLine1 )
       
   105 		{
       
   106 		iIMNaviPaneTextsLine1->Reset();
       
   107 		delete iIMNaviPaneTextsLine1;
       
   108 		}
       
   109 
       
   110 	if ( iIMNaviPaneTextsLine2 )
       
   111 		{
       
   112 		iIMNaviPaneTextsLine2->Reset();
       
   113 		delete iIMNaviPaneTextsLine2;
       
   114 		}
       
   115     }
       
   116 
       
   117 // -----------------------------------------------------------------------------
       
   118 // CIMCVAppLayoutInfo::CIMCVAppLayoutInfo
       
   119 // C++ constructor can NOT contain any code, that might leave.
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 CIMCVAppLayoutInfo::CIMCVAppLayoutInfo( TChatListBoxLayout::TLayout aLayoutID ) :
       
   123 	iLayoutID( aLayoutID )
       
   124     {
       
   125     IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::CIMCVAppLayoutInfo()	start" ));
       
   126     IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::CIMCVAppLayoutInfo()	end" ));
       
   127     }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // CIMCVAppLayoutInfo::ConstructL
       
   131 // Second phase constructor
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 void CIMCVAppLayoutInfo::ConstructL()
       
   135     {
       
   136     IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::ConstructL()	start" ));
       
   137 	SetupMainPaneRect();
       
   138 	FillLayoutL();
       
   139 	LogLayoutL();
       
   140 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::ConstructL()	end" ));
       
   141     }
       
   142 
       
   143 // ---------------------------------------------------------
       
   144 // CIMCVAppLayoutInfo::LayoutChangedL
       
   145 // (other items were commented in a header).
       
   146 // ---------------------------------------------------------
       
   147 //
       
   148 void CIMCVAppLayoutInfo::LayoutChangedL( TInt /*aType = 0*/ )
       
   149 	{
       
   150 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::LayoutChangedL()	start" ));
       
   151 	FillLayoutL();
       
   152 
       
   153 	TAknLayoutRect myLayoutRect;
       
   154 
       
   155 	TAknLayoutRect myLine;
       
   156 
       
   157 	//update MainPaneRect
       
   158 	SetupMainPaneRect();
       
   159 
       
   160 	TAknWindowLineLayout readingPane = im_reading_pane( iLayoutID );
       
   161 
       
   162 	myLayoutRect.LayoutRect( iMainPaneRect, readingPane );
       
   163 
       
   164 	//line height
       
   165 	TAknWindowLineLayout lineLayout = im_reading_field( 0 );
       
   166 
       
   167 	myLine.LayoutRect( myLayoutRect.Rect(), lineLayout );
       
   168 
       
   169 	TAknTextLineLayout myMessageHeaderLayout =
       
   170 		IM_reading_pane_texts_Line_1( 1 );
       
   171 		
       
   172 	TAknLayoutText myTextLayout;
       
   173 	TAknLayoutText myTextLayout2;
       
   174 
       
   175 	myTextLayout.LayoutText( myLine.Rect(), myMessageHeaderLayout);
       
   176 
       
   177 	// IconSkip
       
   178 	myMessageHeaderLayout = IM_reading_pane_texts_Line_1( 2 );
       
   179 
       
   180 	myTextLayout2.LayoutText( myLine.Rect(), myMessageHeaderLayout);
       
   181 
       
   182 	// MsgFont
       
   183 
       
   184 	TAknTextLineLayout myMessageLayout = IM_reading_pane_texts_Line_2();
       
   185 
       
   186 	//normal message text with indent
       
   187 	myTextLayout.LayoutText( myLine.Rect(), myMessageLayout);
       
   188 
       
   189 	//header with full width
       
   190 	myMessageHeaderLayout = IM_reading_pane_texts_Line_1( 1 );
       
   191 	myTextLayout2.LayoutText( myLine.Rect(), myMessageHeaderLayout);
       
   192 
       
   193 	
       
   194 	// MaxNickWidth
       
   195 
       
   196 	myMessageHeaderLayout = IM_reading_pane_texts_Line_1( 0 );
       
   197 
       
   198 	myTextLayout.LayoutText( myLine.Rect(), myMessageHeaderLayout);
       
   199 
       
   200 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::LayoutChangedL()	end" ));
       
   201 	}
       
   202 
       
   203 
       
   204 // CIMCVAppLayoutInfo::MainPaneRect
       
   205 // (other items were commented in a header).
       
   206 // ---------------------------------------------------------
       
   207 //
       
   208 TRect CIMCVAppLayoutInfo::MainPaneRect()
       
   209 	{
       
   210 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::MainPaneRect()	start" ));
       
   211 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::MainPaneRect()	end" ));
       
   212 	return TRect( iMainPaneRect );
       
   213 	}
       
   214 // ---------------------------------------------------------
       
   215 // CIMCVAppLayoutInfo::SetLayoutID
       
   216 // (other items were commented in a header).
       
   217 // ---------------------------------------------------------
       
   218 //
       
   219 void CIMCVAppLayoutInfo::SetLayoutID( TChatListBoxLayout::TLayout aLayout )
       
   220 	{
       
   221 	iLayoutID = aLayout;
       
   222 	TRAPD( err, LayoutChangedL() );
       
   223 	if( err != KErrNone )
       
   224 		{
       
   225 		CActiveScheduler::Current()->Error( err );
       
   226 		}
       
   227 	}
       
   228 
       
   229 
       
   230 // ---------------------------------------------------------
       
   231 // CIMCVAppLayoutInfo::ScreenRect
       
   232 // (other items were commented in a header).
       
   233 // ---------------------------------------------------------
       
   234 //
       
   235 TRect CIMCVAppLayoutInfo::ScreenRect()
       
   236 	{
       
   237 	return iScreenRect;
       
   238 	}
       
   239 
       
   240 // ---------------------------------------------------------
       
   241 // CIMCVAppLayoutInfo::SetEditorVisibility
       
   242 // (other items were commented in a header).
       
   243 // ---------------------------------------------------------
       
   244 //
       
   245 void CIMCVAppLayoutInfo::SetEditorVisibility( TBool aVisible )
       
   246 	{
       
   247 	iEditorVisibility = aVisible;
       
   248 	}
       
   249 
       
   250 // ---------------------------------------------------------
       
   251 // CIMCVAppLayoutInfo::EditorVisibility
       
   252 // (other items were commented in a header).
       
   253 // ---------------------------------------------------------
       
   254 //
       
   255 TBool CIMCVAppLayoutInfo::EditorVisibility()
       
   256 	{
       
   257 	return iEditorVisibility;
       
   258 	}
       
   259 
       
   260 // CIMCVAppLayoutInfo::SetupMainPaneRect
       
   261 // (other items were commented in a header).
       
   262 // ---------------------------------------------------------
       
   263 //
       
   264 void CIMCVAppLayoutInfo::SetupMainPaneRect()
       
   265 	{
       
   266 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::SetupMainPaneRect()	start" ));
       
   267 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
       
   268 		iMainPaneRect );
       
   269 	_LIT( KMain, "MainPane");
       
   270 
       
   271 	iMainPaneRect.Move( -iMainPaneRect.iTl.iX, -iMainPaneRect.iTl.iY );
       
   272 
       
   273 	DPRect( KMain, iMainPaneRect );
       
   274 
       
   275 	TRect myControlPane;
       
   276 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EControlPane,
       
   277 		myControlPane );
       
   278 	_LIT( KControlPane, "ControlPane");
       
   279 	DPRect( KControlPane, myControlPane );
       
   280 	//this is screen relative lets move back to origin.
       
   281 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::SetupMainPaneRect()	end" ));
       
   282 	}
       
   283 
       
   284 // ---------------------------------------------------------
       
   285 // CIMCVAppLayoutInfo::im_reading_pane
       
   286 // (other items were commented in a header).
       
   287 // ---------------------------------------------------------
       
   288 //
       
   289 TAknWindowLineLayout CIMCVAppLayoutInfo::im_reading_pane(TInt aIndex_H)
       
   290 	{
       
   291 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::im_reading_pane()	start" ));
       
   292 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::im_reading_pane()	end" ));
       
   293 	return (*iReadingPane)[ aIndex_H ];
       
   294 	}
       
   295 
       
   296 // ---------------------------------------------------------
       
   297 // CIMCVAppLayoutInfo::im_reading_field
       
   298 // (other items were commented in a header).
       
   299 // ---------------------------------------------------------
       
   300 //
       
   301 TAknWindowLineLayout CIMCVAppLayoutInfo::im_reading_field(TInt aIndex_t)
       
   302 	{
       
   303 	return (*iReadingField)[ aIndex_t ];
       
   304 	}
       
   305 
       
   306 // ---------------------------------------------------------
       
   307 // CIMCVAppLayoutInfo::IM_text_elements
       
   308 // (other items were commented in a header).
       
   309 // ---------------------------------------------------------
       
   310 //
       
   311 TAknWindowLineLayout CIMCVAppLayoutInfo::IM_text_elements(TInt aLineIndex)
       
   312 	{
       
   313 	return (*iIMTextElements)[ aLineIndex ];
       
   314 	}
       
   315 
       
   316 // ---------------------------------------------------------
       
   317 // CIMCVAppLayoutInfo::IM_reading_pane_texts_Line_1
       
   318 // (other items were commented in a header).
       
   319 // ---------------------------------------------------------
       
   320 //
       
   321 TAknTextLineLayout CIMCVAppLayoutInfo::IM_reading_pane_texts_Line_1(TInt aCommon1)
       
   322 	{
       
   323 	return (*iReadingPaneTextsLine1)[ aCommon1 ];
       
   324 	}
       
   325 
       
   326 // ---------------------------------------------------------
       
   327 // CIMCVAppLayoutInfo::IM_reading_pane_texts_Line_2
       
   328 // (other items were commented in a header).
       
   329 // ---------------------------------------------------------
       
   330 //
       
   331 TAknTextLineLayout CIMCVAppLayoutInfo::IM_reading_pane_texts_Line_2()
       
   332 	{
       
   333 	return iReadingPaneTextsLine2;
       
   334 	}
       
   335 
       
   336 // CIMCVAppLayoutInfo::im_writing_pane
       
   337 // (other items were commented in a header).
       
   338 // ---------------------------------------------------------
       
   339 //
       
   340 TAknWindowLineLayout CIMCVAppLayoutInfo::im_writing_pane( TInt aCommon1 )
       
   341 	{
       
   342 	return (*iWrittingPane)[ aCommon1 ];
       
   343 	}
       
   344 
       
   345 // ---------------------------------------------------------
       
   346 // CIMCVAppLayoutInfo::IM_writing_field_elements_Line_1
       
   347 // (other items were commented in a header).
       
   348 // ---------------------------------------------------------
       
   349 //
       
   350 TAknWindowLineLayout CIMCVAppLayoutInfo::IM_writing_field_elements_Line_1(
       
   351 		TInt aIndex_H )
       
   352 	{
       
   353 	return (*iIMWritingFieldLine1)[ aIndex_H ];
       
   354 	}
       
   355 
       
   356 // ---------------------------------------------------------
       
   357 // CIMCVAppLayoutInfo::IM_writing_field_elements_Line_2
       
   358 // (other items were commented in a header).
       
   359 // ---------------------------------------------------------
       
   360 //
       
   361 TAknWindowLineLayout CIMCVAppLayoutInfo::IM_writing_field_elements_Line_2()
       
   362 	{
       
   363 	return iIMWritingFieldLine2;
       
   364 	}
       
   365 
       
   366 // ---------------------------------------------------------
       
   367 // CIMCVAppLayoutInfo::IM_writing_field_elements_Line_3
       
   368 // (other items were commented in a header).
       
   369 // ---------------------------------------------------------
       
   370 //
       
   371 TAknWindowLineLayout CIMCVAppLayoutInfo::IM_writing_field_elements_Line_3(
       
   372 		TInt aIndex_H )
       
   373 	{
       
   374 	return (*iIMWritingFieldLine3)[ aIndex_H ];
       
   375 	}
       
   376 
       
   377 // ---------------------------------------------------------
       
   378 // CIMCVAppLayoutInfo::Multiline_IM_writing_pane_texts_Line_1
       
   379 // (other items were commented in a header).
       
   380 // ---------------------------------------------------------
       
   381 //
       
   382 TAknMultiLineTextLayout CIMCVAppLayoutInfo::Multiline_IM_writing_pane_texts_Line_1(
       
   383 		TInt aNumberOfLinesShown)
       
   384 	{
       
   385 	return (*iWrittingPaneTextsLine)[ aNumberOfLinesShown ];
       
   386 	}
       
   387 
       
   388 // ---------------------------------------------------------
       
   389 // CIMCVAppLayoutInfo::IM_navi_pane_texts_Line_1
       
   390 // (other items were commented in a header).
       
   391 // ---------------------------------------------------------
       
   392 //
       
   393 TAknTextLineLayout CIMCVAppLayoutInfo::IM_navi_pane_texts_Line_1(
       
   394 		TInt aIndex_C, TInt /*aIndex_W*/)
       
   395 	{
       
   396 	return (*iIMNaviPaneTextsLine1)[ aIndex_C ];
       
   397 	}
       
   398 
       
   399 // ---------------------------------------------------------
       
   400 // CIMCVAppLayoutInfo::LogLayout
       
   401 // (other items were commented in a header).
       
   402 // ---------------------------------------------------------
       
   403 //
       
   404 void CIMCVAppLayoutInfo::LogLayoutL()
       
   405 	{
       
   406 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::LogLayoutL()	start" ));
       
   407 #ifdef _DEBUG
       
   408 
       
   409 	_LIT( K1,"im_reading_pane( 0 ) ");
       
   410 	DPLayout( K1, AppLayout::im_reading_pane( 0 ) );
       
   411 	DPLayout( K1, im_reading_pane( 0 ) );
       
   412 	_LIT( K2,"im_reading_pane( 1 ) ");
       
   413 	DPLayout( K2, AppLayout::im_reading_pane( 1 ) );
       
   414 	DPLayout( K2, im_reading_pane( 1 ) );
       
   415 	_LIT( K3,"im_reading_pane( 2 ) ");
       
   416 	DPLayout( K3, AppLayout::im_reading_pane( 2 ) );
       
   417 	DPLayout( K3, im_reading_pane( 2 ) );
       
   418 
       
   419 	_LIT( KWP1,"im_writing_pane( 0 )");
       
   420 	DPLayout( KWP1, AppLayout::im_writing_pane( 0 ) );
       
   421 	DPLayout( KWP1, im_writing_pane( 0 ) );
       
   422 	_LIT( KWP2,"im_writing_pane( 1 )");
       
   423 	DPLayout( KWP2, AppLayout::im_writing_pane( 1 ) );
       
   424 	DPLayout( KWP2, im_writing_pane( 1 ) );
       
   425 
       
   426 	_LIT( K4,"im_reading_field( 0 ) ");
       
   427 	DPLayout( K4, AppLayout::im_reading_field( 0 ) );
       
   428 	DPLayout( K4, im_reading_field( 0 ) );
       
   429 	_LIT( K5,"im_reading_field( 1 ) ");
       
   430 	DPLayout( K5, AppLayout::im_reading_field( 1 ) );
       
   431 	DPLayout( K5, im_reading_field( 1 ) );
       
   432 	_LIT( K6,"im_reading_field( 2 ) ");
       
   433 	DPLayout( K6, AppLayout::im_reading_field( 2 ) );
       
   434 	DPLayout( K6, im_reading_field( 2 ) );
       
   435 	_LIT( K7,"im_reading_field( 3 ) ");
       
   436 	DPLayout( K7, AppLayout::im_reading_field( 3 ) );
       
   437 	DPLayout( K7, im_reading_field( 3 ) );
       
   438 	_LIT( K8,"im_reading_field( 4 ) ");
       
   439 	DPLayout( K8, AppLayout::im_reading_field( 4 ) );
       
   440 	DPLayout( K8, im_reading_field( 4 ) );
       
   441 	_LIT( K9,"im_reading_field( 5 ) ");
       
   442 	DPLayout( K9, AppLayout::im_reading_field( 5 ) );
       
   443 	DPLayout( K9, im_reading_field( 5 ) );
       
   444 	_LIT( K10,"im_reading_field( 6 ) ");
       
   445 	DPLayout( K10, AppLayout::im_reading_field( 6 ) );
       
   446 	DPLayout( K10, im_reading_field( 6 ) );
       
   447 	
       
   448     TAknLayoutScalableParameterLimits limits( 
       
   449         AknLayoutScalable_Apps::list_im_single_pane_ParamLimits() );
       
   450 
       
   451     if( 7 <= limits.LastRow() )
       
   452         {
       
   453         _LIT( K11,"im_reading_field( 7 ) ");
       
   454     	DPLayout( K11, AppLayout::im_reading_field( 7 ) );
       
   455     	DPLayout( K11, im_reading_field( 7 ) );    
       
   456         }
       
   457 
       
   458 	_LIT( KRPT0,"IM_reading_pane_texts_Line_1( 0 )");
       
   459 	DPLayout( KRPT0, AppLayout::IM_reading_pane_texts_Line_1( 0 ) );
       
   460 	DPLayout( KRPT0, IM_reading_pane_texts_Line_1( 0 ) );
       
   461 	_LIT( KRPT1,"IM_reading_pane_texts_Line_1( 1 )");
       
   462 	DPLayout( KRPT1, AppLayout::IM_reading_pane_texts_Line_1( 1 ) );
       
   463 	DPLayout( KRPT1, IM_reading_pane_texts_Line_1( 1 ) );
       
   464 	_LIT( KRPT2,"IM_reading_pane_texts_Line_1( 2 )");
       
   465 	DPLayout( KRPT2, AppLayout::IM_reading_pane_texts_Line_1( 2 ) );
       
   466 	DPLayout( KRPT2, IM_reading_pane_texts_Line_1( 2 ) );
       
   467 	_LIT( KRPT3,"IM_reading_pane_texts_Line_2()");
       
   468 	DPLayout( KRPT3, AppLayout::IM_reading_pane_texts_Line_2() );
       
   469 	DPLayout( KRPT3, IM_reading_pane_texts_Line_2() );
       
   470 
       
   471 	_LIT( KIMT1,"IM_text_elements( 0 )");
       
   472 	DPLayout( KIMT1, AppLayout::IM_text_elements( 0 ) );
       
   473 	DPLayout( KIMT1, IM_text_elements( 0 ) );
       
   474 	_LIT( KIMT2,"IM_text_elements( 1 )");
       
   475 	DPLayout( KIMT2, AppLayout::IM_text_elements( 1 ) );
       
   476 	DPLayout( KIMT2, IM_text_elements( 1 ) );
       
   477 	_LIT( KIMT3,"IM_text_elements( 2 )");
       
   478 	DPLayout( KIMT3, AppLayout::IM_text_elements( 2 ) );
       
   479 	DPLayout( KIMT3, IM_text_elements( 2 ) );
       
   480 
       
   481 	_LIT( KMWPT0,"Multiline_IM_writing_pane_texts_Line_1( 0 )");
       
   482 	DPLayout( KMWPT0, AppLayout::Multiline_IM_writing_pane_texts_Line_1( 0 ) );
       
   483 	DPLayout( KMWPT0, Multiline_IM_writing_pane_texts_Line_1( 0 ) );
       
   484 
       
   485 	_LIT( KMWPT1,"Multiline_IM_writing_pane_texts_Line_1( 1 )");
       
   486 	DPLayout( KMWPT1, AppLayout::Multiline_IM_writing_pane_texts_Line_1( 1 ) );
       
   487 	DPLayout( KMWPT1, Multiline_IM_writing_pane_texts_Line_1( 1 ) );
       
   488 
       
   489 	_LIT( KMWPT2,"Multiline_IM_writing_pane_texts_Line_1( 2 )");
       
   490 	DPLayout( KMWPT2, AppLayout::Multiline_IM_writing_pane_texts_Line_1( 2 ) );
       
   491 	DPLayout( KMWPT2, Multiline_IM_writing_pane_texts_Line_1( 2 ) );
       
   492 
       
   493 	_LIT( KWFL10,"IM_writing_field_elements_Line_1( 0 )");
       
   494 	DPLayout( KWFL10, AppLayout::IM_writing_field_elements_Line_1( 0 ) );
       
   495 	DPLayout( KWFL10, IM_writing_field_elements_Line_1( 0 ) );
       
   496 
       
   497 	_LIT( KWFL11,"IM_writing_field_elements_Line_1( 1 )");
       
   498 	DPLayout( KWFL11, AppLayout::IM_writing_field_elements_Line_1( 1 ) );
       
   499 	DPLayout( KWFL11, IM_writing_field_elements_Line_1( 1 ) );
       
   500 
       
   501 	_LIT( KWFL2,"IM_writing_field_elements_Line_2()");
       
   502 	DPLayout( KWFL2, AppLayout::IM_writing_field_elements_Line_2() );
       
   503 	DPLayout( KWFL2, IM_writing_field_elements_Line_2() );
       
   504 
       
   505 	_LIT( KWFL30,"IM_writing_field_elements_Line_3( 0 )");
       
   506 	DPLayout( KWFL30, AppLayout::IM_writing_field_elements_Line_3( 0 ) );
       
   507 	DPLayout( KWFL30, IM_writing_field_elements_Line_3( 0 ) );
       
   508 
       
   509 	_LIT( KWFL31,"IM_writing_field_elements_Line_3( 1 )");
       
   510 	DPLayout( KWFL31, AppLayout::IM_writing_field_elements_Line_3( 1 ) );
       
   511 	DPLayout( KWFL31, IM_writing_field_elements_Line_3( 1 ) );
       
   512 
       
   513 	HBufC* myStr = HBufC::NewLC( 60 );
       
   514 	TPtr myPtr = myStr->Des();
       
   515 
       
   516 	_LIT( KNPTL,"IM_navi_pane_texts_Line_1( ");
       
   517 	_LIT( KNPTL0,"AppLayout::");
       
   518 	_LIT( KNPTL1,", 0 )");
       
   519 	_LIT( KNPTL2,", 1 )");
       
   520 	TInt i(0);
       
   521 	for( i=0; i<10; i++ )
       
   522 		{
       
   523 		myPtr.Copy( KNPTL0() );
       
   524 		myPtr.Append( KNPTL() );
       
   525 		myPtr.AppendNum( i );
       
   526 		myPtr.Append( KNPTL1() );
       
   527 		DPLayout( myPtr, IM_navi_pane_texts_Line_1( i ,0 ) );
       
   528 
       
   529 		myPtr.Copy( KNPTL() );
       
   530 		myPtr.AppendNum( i );
       
   531 		myPtr.Append( KNPTL1() );
       
   532 		DPLayout( myPtr, IM_navi_pane_texts_Line_1( i ,0 ) );
       
   533 		}
       
   534 	for( i =0; i<10; i++ )
       
   535 		{
       
   536 		myPtr.Copy( KNPTL0() );
       
   537 		myPtr.Append( KNPTL() );
       
   538 		myPtr.AppendNum( i );
       
   539 		myPtr.Append( KNPTL2() );
       
   540 		DPLayout( myPtr, IM_navi_pane_texts_Line_1( i ,1 ) );
       
   541 
       
   542 		myPtr.Copy( KNPTL() );
       
   543 		myPtr.AppendNum( i );
       
   544 		myPtr.Append( KNPTL2() );
       
   545 		DPLayout( myPtr, IM_navi_pane_texts_Line_1( i ,1 ) );
       
   546 		}
       
   547 
       
   548 	CleanupStack::PopAndDestroy( myStr );
       
   549 
       
   550 #endif // _DEBUG
       
   551 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::LogLayoutL()	end" ));
       
   552 	}
       
   553 
       
   554 // ---------------------------------------------------------
       
   555 // CIMCVAppLayoutInfo::DPLayout
       
   556 // (other items were commented in a header).
       
   557 // ---------------------------------------------------------
       
   558 //
       
   559 void CIMCVAppLayoutInfo::DPLayout( const TDesC& /*aStr*/, const TAknTextLineLayout /*aLayout*/ )
       
   560 	{
       
   561 	}
       
   562 
       
   563 // ---------------------------------------------------------
       
   564 // CIMCVAppLayoutInfo::DPLayout
       
   565 // (other items were commented in a header).
       
   566 // ---------------------------------------------------------
       
   567 //
       
   568 void CIMCVAppLayoutInfo::DPLayout( const TDesC& /*aStr*/,
       
   569 		const TAknWindowLineLayout /*aLayout*/ )
       
   570 	{
       
   571 	}
       
   572 
       
   573 // ---------------------------------------------------------
       
   574 // CIMCVAppLayoutInfo::DPRect
       
   575 // (other items were commented in a header).
       
   576 // ---------------------------------------------------------
       
   577 //
       
   578 void CIMCVAppLayoutInfo::DPRect( const TDesC& /*aStr*/, const TRect& /*aRect*/ )
       
   579 	{
       
   580 	}
       
   581 
       
   582 // ---------------------------------------------------------
       
   583 // CIMCVAppLayoutInfo::FillLayoutL
       
   584 // (other items were commented in a header).
       
   585 // ---------------------------------------------------------
       
   586 //
       
   587 void CIMCVAppLayoutInfo::FillLayoutL()
       
   588 	{
       
   589 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillLayoutL()	start" ));
       
   590 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, iScreenRect );
       
   591 	if ( iLastScreenRect != iScreenRect )
       
   592 		{
       
   593 		FillReadingPaneL();
       
   594 		FillWrittingPaneL();
       
   595 		FillReadingFieldL();
       
   596 		FillReadingPaneTextsLine1L();
       
   597 		FillReadingPaneTextsLine2();
       
   598 		FillIMTextElementsL();
       
   599 		FillWrittingPaneTextsLineL();
       
   600 		FillIMWritingFieldLine1L();
       
   601 		FillIMWritingFieldLine2();
       
   602 		FillIMWritingFieldLine3L();
       
   603 		FillIMNaviPaneTextsLineL();
       
   604 		}
       
   605 	iLastScreenRect = iScreenRect;
       
   606 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillLayoutL()	end" ));
       
   607 	}
       
   608 
       
   609 // ---------------------------------------------------------
       
   610 // CIMCVAppLayoutInfo::FillReadingPaneL
       
   611 // (other items were commented in a header).
       
   612 // ---------------------------------------------------------
       
   613 //
       
   614 void CIMCVAppLayoutInfo::FillReadingPaneL()
       
   615 	{
       
   616 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneL()	start" ));
       
   617 	if ( iReadingPane )
       
   618 		{
       
   619 		iReadingPane->Reset();
       
   620 		delete iReadingPane;
       
   621 		iReadingPane = NULL;
       
   622 		}
       
   623 
       
   624 	iReadingPane = new( ELeave )CArrayFixFlat<TAknWindowLineLayout>( 3 );
       
   625 	for( TInt i(0); i < 3; i++ )
       
   626 		{
       
   627 		iReadingPane->AppendL( AppLayout::im_reading_pane( i ) );
       
   628 		}
       
   629 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneL()	end" ));
       
   630 	}
       
   631 
       
   632 // ---------------------------------------------------------
       
   633 // CIMCVAppLayoutInfo::FillReadingFieldL
       
   634 // (other items were commented in a header).
       
   635 // ---------------------------------------------------------
       
   636 //
       
   637 void CIMCVAppLayoutInfo::FillReadingFieldL()
       
   638 	{
       
   639 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingFieldL()	start" ));
       
   640 	if ( iReadingField )
       
   641 		{
       
   642 		iReadingField->Reset();
       
   643 		delete iReadingField;
       
   644 		iReadingField = NULL;
       
   645 		}
       
   646 
       
   647     TAknLayoutScalableParameterLimits limits( 
       
   648         AknLayoutScalable_Apps::list_im_single_pane_ParamLimits() );
       
   649 
       
   650     // items from FirstRow to LastRow
       
   651 	iReadingField = new( ELeave )CArrayFixFlat<TAknWindowLineLayout>( 
       
   652 	        limits.LastRow() - limits.FirstRow() + 1 );
       
   653     
       
   654 	for( TInt i( limits.FirstRow() ); i <= limits.LastRow(); ++i )
       
   655 		{
       
   656 		iReadingField->AppendL( AppLayout::im_reading_field( i ) );
       
   657 		}
       
   658 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingFieldL()	end" ));
       
   659 	}
       
   660 
       
   661 // ---------------------------------------------------------
       
   662 // CIMCVAppLayoutInfo::FillReadingPaneTextsLine1
       
   663 // (other items were commented in a header).
       
   664 // ---------------------------------------------------------
       
   665 //
       
   666 void CIMCVAppLayoutInfo::FillReadingPaneTextsLine1L()
       
   667 	{
       
   668 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneTextsLine1L()	start" ));
       
   669 	if ( iReadingPaneTextsLine1 )
       
   670 		{
       
   671 		iReadingPaneTextsLine1->Reset();
       
   672 		delete iReadingPaneTextsLine1;
       
   673 		iReadingPaneTextsLine1 = NULL;
       
   674 		}
       
   675 
       
   676 	iReadingPaneTextsLine1 = new( ELeave )CArrayFixFlat<TAknTextLineLayout>( 3 );
       
   677 	for( TInt i(0); i < 3; i++ )
       
   678 		{
       
   679 		iReadingPaneTextsLine1->AppendL(
       
   680 			AppLayout::IM_reading_pane_texts_Line_1( i ) );
       
   681 		}
       
   682 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneTextsLine1L()	end" ));
       
   683 	}
       
   684 
       
   685 // ---------------------------------------------------------
       
   686 // CIMCVAppLayoutInfo::FillIMTextElementsL
       
   687 // (other items were commented in a header).
       
   688 // ---------------------------------------------------------
       
   689 //
       
   690 void CIMCVAppLayoutInfo::FillIMTextElementsL()
       
   691 	{
       
   692 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMTextElementsL()	start" ));
       
   693 	if ( iIMTextElements )
       
   694 		{
       
   695 		iIMTextElements->Reset();
       
   696 		delete iIMTextElements;
       
   697 		iIMTextElements = NULL;
       
   698 		}
       
   699 
       
   700 	iIMTextElements = new( ELeave )CArrayFixFlat<TAknWindowLineLayout>( 3 );
       
   701 	for( TInt i(0); i < 3; i++ )
       
   702 		{
       
   703 		iIMTextElements->AppendL( AppLayout::IM_text_elements( i ) );
       
   704 		}
       
   705 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMTextElementsL()	end" ));
       
   706 	}
       
   707 
       
   708 // ---------------------------------------------------------
       
   709 // CIMCVAppLayoutInfo::FillReadingPaneTextsLine2
       
   710 // (other items were commented in a header).
       
   711 // ---------------------------------------------------------
       
   712 //
       
   713 void CIMCVAppLayoutInfo::FillReadingPaneTextsLine2()
       
   714 	{
       
   715 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneTextsLine2()	start" ));
       
   716 	iReadingPaneTextsLine2 = AppLayout::IM_reading_pane_texts_Line_2();
       
   717 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillReadingPaneTextsLine2()	end" ));
       
   718 	}
       
   719 
       
   720 // ---------------------------------------------------------
       
   721 // CIMCVAppLayoutInfo::FillWrittingPaneTextsLineL
       
   722 // (other items were commented in a header).
       
   723 // ---------------------------------------------------------
       
   724 //
       
   725 void CIMCVAppLayoutInfo::FillWrittingPaneTextsLineL()
       
   726 	{
       
   727 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillWrittingPaneTextsLineL()	start" ));
       
   728 	if ( iWrittingPaneTextsLine )
       
   729 		{
       
   730 		iWrittingPaneTextsLine->Reset();
       
   731 		delete iWrittingPaneTextsLine;
       
   732 		iWrittingPaneTextsLine = NULL;
       
   733 		}
       
   734 
       
   735 	iWrittingPaneTextsLine = new( ELeave )CArrayFixFlat<TAknMultiLineTextLayout>( 3 );
       
   736 	for( TInt i(0); i < 3; i++ )
       
   737 		{
       
   738 		iWrittingPaneTextsLine->AppendL(
       
   739 			AppLayout::Multiline_IM_writing_pane_texts_Line_1( i ) );
       
   740 		}
       
   741 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillWrittingPaneTextsLineL()	end" ));
       
   742 	}
       
   743 
       
   744 // ---------------------------------------------------------
       
   745 // CIMCVAppLayoutInfo::FillIMWritingFieldLine1
       
   746 // (other items were commented in a header).
       
   747 // ---------------------------------------------------------
       
   748 //
       
   749 void CIMCVAppLayoutInfo::FillIMWritingFieldLine1L()
       
   750 	{
       
   751 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine1L()	start" ));
       
   752 	if ( iIMWritingFieldLine1 )
       
   753 		{
       
   754 		iIMWritingFieldLine1->Reset();
       
   755 		delete iIMWritingFieldLine1;
       
   756 		iIMWritingFieldLine1 = NULL;
       
   757 		}
       
   758 
       
   759 	iIMWritingFieldLine1 = new( ELeave )CArrayFixFlat<TAknWindowLineLayout>( 3 );
       
   760 	for( TInt i(0); i < 2; i++ )
       
   761 		{
       
   762 		iIMWritingFieldLine1->AppendL(
       
   763 			AppLayout::IM_writing_field_elements_Line_1( i ) );
       
   764 		}
       
   765 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine1L()	end" ));
       
   766 	}
       
   767 
       
   768 // ---------------------------------------------------------
       
   769 // CIMCVAppLayoutInfo::FillIMWritingFieldLine2
       
   770 // (other items were commented in a header).
       
   771 // ---------------------------------------------------------
       
   772 //
       
   773 void CIMCVAppLayoutInfo::FillIMWritingFieldLine2()
       
   774 	{
       
   775 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine2()	start" ));
       
   776 	iIMWritingFieldLine2 =
       
   777 		AppLayout::IM_writing_field_elements_Line_2();
       
   778 	iIMWritingFieldLine2.iH = 1;
       
   779 	iIMWritingFieldLine2.iW = ELayoutP;
       
   780 	iIMWritingFieldLine2.iC = 221;
       
   781 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine2()	end" ));
       
   782 	}
       
   783 
       
   784 // ---------------------------------------------------------
       
   785 // CIMCVAppLayoutInfo::FillIMWritingFieldLine3L
       
   786 // (other items were commented in a header).
       
   787 // ---------------------------------------------------------
       
   788 //
       
   789 void CIMCVAppLayoutInfo::FillIMWritingFieldLine3L()
       
   790 	{
       
   791 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine3L()	start" ));
       
   792 	if ( iIMWritingFieldLine3 )
       
   793 		{
       
   794 		iIMWritingFieldLine3->Reset();
       
   795 		delete iIMWritingFieldLine3;
       
   796 		iIMWritingFieldLine3 = NULL;
       
   797 		}
       
   798 
       
   799 	iIMWritingFieldLine3 = new ( ELeave ) CArrayFixFlat< TAknWindowLineLayout >(
       
   800 		 3 );
       
   801 	for( TInt i(0); i < 2; i++ )
       
   802 		{
       
   803 		iIMWritingFieldLine3->AppendL(
       
   804 			AppLayout::IM_writing_field_elements_Line_3( i ) );
       
   805 		}
       
   806 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMWritingFieldLine3L()	end" ));
       
   807 	}
       
   808 
       
   809 // ---------------------------------------------------------
       
   810 // CIMCVAppLayoutInfo::FillWrittingPaneL
       
   811 // (other items were commented in a header).
       
   812 // ---------------------------------------------------------
       
   813 //
       
   814 void CIMCVAppLayoutInfo::FillWrittingPaneL()
       
   815 	{
       
   816 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillWrittingPaneL()	start" ));
       
   817 	if ( iWrittingPane )
       
   818 		{
       
   819 		iWrittingPane->Reset();
       
   820 		delete iWrittingPane;
       
   821 		iWrittingPane = NULL;
       
   822 		}
       
   823 
       
   824 	iWrittingPane = new( ELeave )CArrayFixFlat<TAknWindowLineLayout>( 2 );
       
   825 	for( TInt i(0); i < 2; i++ )
       
   826 		{
       
   827 		iWrittingPane->AppendL( AppLayout::im_writing_pane( i ) );
       
   828 		}
       
   829 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillWrittingPaneL()	end" ));
       
   830 	}
       
   831 
       
   832 // ---------------------------------------------------------
       
   833 // CIMCVAppLayoutInfo::FillIMNaviPaneTextsLine
       
   834 // (other items were commented in a header).
       
   835 // ---------------------------------------------------------
       
   836 //
       
   837 void CIMCVAppLayoutInfo::FillIMNaviPaneTextsLineL()
       
   838 	{
       
   839 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMNaviPaneTextsLineL()	start" ));
       
   840 	// fader colors from LAF. These are hardcoded as the LAF (impl.) adviced. 
       
   841 	const TInt16 colors[] = { 234, 232, 230, 228, 226, 0, 226, 227, 228, 229 };
       
   842 
       
   843 	if ( iIMNaviPaneTextsLine1 )
       
   844 		{
       
   845 		iIMNaviPaneTextsLine1->Reset();
       
   846 		delete iIMNaviPaneTextsLine1;
       
   847 		iIMNaviPaneTextsLine1 = NULL;
       
   848 		}
       
   849 
       
   850 	iIMNaviPaneTextsLine1 = 
       
   851 	    new ( ELeave ) CArrayFixFlat<TAknTextLineLayout>( 10 );
       
   852     
       
   853     TAknTextLineLayout text;
       
   854 	for( TInt i(0); i < 10; i++ )
       
   855 		{
       
   856 		text = AknLayoutScalable_Apps::navi_pane_im_t1();
       
   857 		text.iC = colors[ i ];
       
   858 		iIMNaviPaneTextsLine1->AppendL( text );
       
   859 		}
       
   860 	IM_CV_LOGS(TXT("CIMCVAppLayoutInfo::FillIMNaviPaneTextsLineL()	end" ));
       
   861 	}
       
   862 
       
   863 // End of File