uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomfntlay/src/bctestdomlayoutsystemcase.cpp
changeset 21 558113899881
parent 0 2f259fa3e83a
equal deleted inserted replaced
14:3320e4e6e8bb 21:558113899881
    30 #include "bctestdomfntlaycontainer.h"
    30 #include "bctestdomfntlaycontainer.h"
    31 #include "bctestdomfntlay.hrh"
    31 #include "bctestdomfntlay.hrh"
    32 #include "bctestdomadapter.h"
    32 #include "bctestdomadapter.h"
    33 
    33 
    34 //constant variable define
    34 //constant variable define
    35 const TInt KTableIndex( 2 );
       
    36 const TUint8  KByteCodedData[] = {
    35 const TUint8  KByteCodedData[] = {
    37 // 0x0000 for Screen
    36 // 0x0000 for Screen
    38 0x02,0xfe,0x00,0x00,0xfe,0xfe,0xf0,0xff,0x01,0x40,
    37 0x02,0xfe,0x00,0x00,0xfe,0xfe,0xf0,0xff,0x01,0x40,
    39 // 0x000a for application_window
    38 // 0x000a for application_window
    40 0x04,0xfe,0x00,0x00,0x00,0x00,0xf0,0xff,0x01,0x40,
    39 0x04,0xfe,0x00,0x00,0x00,0x00,0xf0,0xff,0x01,0x40,
   132 
   131 
   133 0x2fd0,	// main_browser_pane
   132 0x2fd0,	// main_browser_pane
   134 
   133 
   135 0x2fd0,	// main_burst_pane
   134 0x2fd0,	// main_burst_pane
   136 
   135 
   137 0x01c0,
   136 0x01c0
   138 
       
   139 0x0001, //19
       
   140 KTableIndex,
       
   141 0x016e
       
   142 };
   137 };
   143 
   138 
   144 
   139 
   145 // ======== MEMBER FUNCTIONS ========
   140 // ======== MEMBER FUNCTIONS ========
   146 
   141 
   239 // CBCTestDomLayoutSystemCase::TestLayout2AdaptationDataDefL
   234 // CBCTestDomLayoutSystemCase::TestLayout2AdaptationDataDefL
   240 // ---------------------------------------------------------------------------
   235 // ---------------------------------------------------------------------------
   241 //
   236 //
   242 void CBCTestDomLayoutSystemCase::TestLayout2AdaptationDataDefL()
   237 void CBCTestDomLayoutSystemCase::TestLayout2AdaptationDataDefL()
   243     {
   238     {
   244     
       
   245     TRect rect( TPoint( 1, 1 ), TSize( 20, 20 ) );
   239     TRect rect( TPoint( 1, 1 ), TSize( 20, 20 ) );
   246     CBCTestDomAdapter* testAdapter = CBCTestDomAdapter::NewL();
   240     CBCTestDomAdapter* testAdapter = CBCTestDomAdapter::NewL();
   247     CleanupStack::PushL( testAdapter ); 
   241     CleanupStack::PushL( testAdapter ); 
   248     TUint* dataLookup = testAdapter->GetAdpDataLookup();  
   242     TUint* dataLookup = testAdapter->GetAdpDataLookup();  
   249 
   243 
   251     AknLayoutAdaptationDecodeSupport::MultiLineTextLine(
   245     AknLayoutAdaptationDecodeSupport::MultiLineTextLine(
   252         txtLineLayout, dataLookup, 4, 1, 2, 3, 4 ); 
   246         txtLineLayout, dataLookup, 4, 1, 2, 3, 4 ); 
   253     _LIT( KTxtMultiLineTextLine,
   247     _LIT( KTxtMultiLineTextLine,
   254         "AknLayoutAdaptationDecodeSupport::MultiLineTextLine" );
   248         "AknLayoutAdaptationDecodeSupport::MultiLineTextLine" );
   255     AssertTrueL( ETrue, KTxtMultiLineTextLine );
   249     AssertTrueL( ETrue, KTxtMultiLineTextLine );
   256     
   250 
   257     dataLookup += 1;
       
   258     
       
   259     TAknWindowLineLayout winLineLayout;
   251     TAknWindowLineLayout winLineLayout;
   260     AknLayoutAdaptationDecodeSupport::WindowTable(
   252     AknLayoutAdaptationDecodeSupport::WindowTable(
   261         winLineLayout, dataLookup, 0, 0, 0, 0, 0, 0 ); 
   253         winLineLayout, dataLookup, 0, 0, 0, 0, 0, 0 ); 
   262     _LIT( KTxtWindowTable,
   254     _LIT( KTxtWindowTable,
   263         "AknLayoutAdaptationDecodeSupport::WindowTable" );
   255         "AknLayoutAdaptationDecodeSupport::WindowTable" );
   264     AssertTrueL( ETrue, KTxtWindowTable );
   256     AssertTrueL( ETrue, KTxtWindowTable );
   265        
   257 
   266     AknLayoutAdaptationDecodeSupport::WindowTable(
   258     AknLayoutAdaptationDecodeSupport::WindowTable(
   267         winLineLayout, dataLookup, 1, rect, 1, 1, 0, 0, 4 ); 
   259         winLineLayout, dataLookup, 0, rect, 1, 1, 0, 0, 4 ); 
   268     _LIT( KTxtWindowTable2,
   260     _LIT( KTxtWindowTable2,
   269         "AknLayoutAdaptationDecodeSupport::WindowTable2" );
   261         "AknLayoutAdaptationDecodeSupport::WindowTable2" );
   270     AssertTrueL( ETrue, KTxtWindowTable2 ); 
   262     AssertTrueL( ETrue, KTxtWindowTable2 ); 
   271 
   263 
   272     const TUint * dataLookup2 = dataLookup + 4; 
   264     const TUint * dataLookup2 = dataLookup + 5; 
   273 
   265 
   274     AknLayoutAdaptationDecodeSupport::TextTable(
   266     AknLayoutAdaptationDecodeSupport::TextTable(
   275         txtLineLayout, dataLookup2, 1, 1, 1, 0, 0, 0 ); 
   267         txtLineLayout, dataLookup2, 0, 0, 0, 0, 0, 0 ); 
   276     _LIT( KTxtTextTable,
   268     _LIT( KTxtTextTable,
   277         "AknLayoutAdaptationDecodeSupport::TextTable" );
   269         "AknLayoutAdaptationDecodeSupport::TextTable" );
   278     AssertTrueL( ETrue, KTxtTextTable );
   270     AssertTrueL( ETrue, KTxtTextTable );
   279 
   271 
   280     TAknLayoutTableLimits layTableLim = 
   272     TAknLayoutTableLimits layTableLim = 
   281         AknLayoutAdaptationDecodeSupport::TableLimits( dataLookup2 ); 
   273         AknLayoutAdaptationDecodeSupport::TableLimits( dataLookup2 ); 
   282     _LIT( KTxtTableLimits,
   274     _LIT( KTxtTableLimits,
   283         "AknLayoutAdaptationDecodeSupport::TableLimits" );
   275         "AknLayoutAdaptationDecodeSupport::TableLimits" );
   284     AssertTrueL( ETrue, KTxtTableLimits );
   276     AssertTrueL( ETrue, KTxtTableLimits );
   285 
   277 
   286     CleanupStack::PopAndDestroy( testAdapter ); 
   278     CleanupStack::PopAndDestroy( testAdapter );   
   287     
       
   288     }
   279     }
   289     
   280     
   290 // ---------------------------------------------------------------------------
   281 // ---------------------------------------------------------------------------
   291 // CBCTestDomLayoutSystemCase::TestLayout2DataDefL
   282 // CBCTestDomLayoutSystemCase::TestLayout2DataDefL
   292 // ---------------------------------------------------------------------------
   283 // ---------------------------------------------------------------------------
   354         &implData, rect, 0, 0, 0, 0, 0 );
   345         &implData, rect, 0, 0, 0, 0, 0 );
   355     _LIT( KTxtMultiLineTextLine2,
   346     _LIT( KTxtMultiLineTextLine2,
   356         "AknLayoutDecodeSupport::MultiLineTextLine2" );
   347         "AknLayoutDecodeSupport::MultiLineTextLine2" );
   357     AssertTrueL( ETrue, KTxtMultiLineTextLine2 );  
   348     AssertTrueL( ETrue, KTxtMultiLineTextLine2 );  
   358 
   349 
   359     implData.iDataLookup += 19;
   350 
   360     AknLayoutDecodeSupport::WindowTable( winLineLayImp2,
       
   361         &implData, 0, 0, 0, 0, 0, 0 );
       
   362     _LIT( KTxtWindowTable,
       
   363         "AknLayoutDecodeSupport::WindowTable" );
       
   364     AssertTrueL( ETrue, KTxtWindowTable );  
       
   365 
       
   366     AknLayoutDecodeSupport::WindowTable( winLineLayImp2,
       
   367         &implData, 0, rect, 0, 0, 0, 0, 0 );
       
   368     _LIT( KTxtWindowTable2,
       
   369         "AknLayoutDecodeSupport::WindowTable2" );
       
   370     AssertTrueL( ETrue, KTxtWindowTable2 );  
       
   371 
       
   372     AknLayoutDecodeSupport::TextTable( txtLineLayImp2,
       
   373         &implData, 0, 0, 0, 0, 0, 0 );
       
   374     _LIT( KTxtTextTable,
       
   375         "AknLayoutDecodeSupport::TextTable" );
       
   376     AssertTrueL( ETrue, KTxtTextTable );
       
   377 
       
   378     AknLayoutDecodeSupport::TextTable( txtLineLayImp2,
       
   379         &implData, 0, rect, 0, 0, 0, 0, 0 );
       
   380     _LIT( KTxtTextTable2,
       
   381         "AknLayoutDecodeSupport::TextTable2" );
       
   382     AssertTrueL( ETrue, KTxtTextTable2 );   
       
   383 
       
   384     TAknLayoutTableLimits layTableLims =
       
   385         AknLayoutDecodeSupport::TableLimits( implData.iDataLookup );
       
   386     _LIT( KTxtTableLimits,
       
   387         "AknLayoutDecodeSupport::TableLimits" );
       
   388     AssertTrueL( ETrue, KTxtTableLimits );    
       
   389     }
   351     }
   390     
   352     
   391 // ---------------------------------------------------------------------------
   353 // ---------------------------------------------------------------------------
   392 // CBCTestDomLayoutSystemCase::TestLayout2HierarchyL
   354 // CBCTestDomLayoutSystemCase::TestLayout2HierarchyL
   393 // ---------------------------------------------------------------------------
   355 // ---------------------------------------------------------------------------