void CConsoleControl::ConstructL(TPoint aTopLeft,const TSize& aSize,TInt aFlags) { TRect rect(aTopLeft,aTopLeft + aSize.AsPoint()); #if EPOC_SDK >= 0x06000000 SetRect(rect); #else SetRectL(rect); #endif iConsole=new(ELeave) CEikConsoleScreen; iConsole->ConstructL(_L("TEST"),aTopLeft,aSize,aFlags,EEikConsWinInPixels); iConsole->SetHistorySizeL(200,0); iHistory=200; }
// ----------------------------------------------------------------------------- // CTestSDKNotes::TestNPIMinimumSizeL // ----------------------------------------------------------------------------- TInt CTestSDKNotes::TestNPIMinimumSizeL( CStifItemParser& /*aItem*/ ) { CEikProgressInfo::SInfo sInfo; CEikProgressInfo* progress = new (ELeave) CEikProgressInfo( sInfo ); CleanupStack::PushL( progress ); STIF_ASSERT_NOT_NULL( progress ); progress->ConstructL(); TSize size = progress->MinimumSize(); TPoint point = size.AsPoint(); STIF_ASSERT_NOT_EQUALS( 0, point.iX ); STIF_ASSERT_NOT_EQUALS( 0, point.iY ); CleanupStack::PopAndDestroy( progress ); return KErrNone; }
// ----------------------------------------------------------------------------- // CTestSDKEditors::TestSEMinimumSizeL // ----------------------------------------------------------------------------- // TInt CTestSDKEditors::TestSEMinimumSizeL( CStifItemParser& /*aItem*/ ) { CEikSecretEditor* secretEditor = new (ELeave) CEikSecretEditor; CleanupStack::PushL( secretEditor ); STIF_ASSERT_NOT_NULL( secretEditor ); TResourceReader reader; CCoeEnv::Static()->CreateResourceReaderLC( reader, R_TESTSDK_SECRETTEXT ); secretEditor->ConstructFromResourceL( reader ); CleanupStack::PopAndDestroy(); TSize size = secretEditor->MinimumSize(); STIF_ASSERT_NOT_EQUALS( 0, size.AsPoint().iX ); STIF_ASSERT_NOT_EQUALS( 0, size.AsPoint().iY ); CleanupStack::PopAndDestroy( secretEditor ); return KErrNone; }